Plone

published Nov 03, 2021

This is here to serve as contents for the atom/rss feed for Plone, also read by planet.plone.org.

Python web meetup Netherlands

published Jul 04, 2012, last modified Jul 05, 2012

PUN web meetup with presentations.

On Wednesday 4 July, there was a PUN web meetup, formerly known as Dutch Python Django Meeting.

Building Single-page web-applications with Django, Twisted and TxWebsocket

Talk by Jeroen van Veen (Goldmund, Wyldebeast & Wunderliebe, GWW).

Websockets give you a persistent TCP connection from a browser to the server. So: you don't need to do a request every time. The connection is there. You need to decide what to send over that connection. This does not need to be HTTP.

With javascript you can upgrade to a persistent connection. The protocol for the handshake used here is changing but getting more stable. Google for Hybi-16. Both utf-8 encoded data and binary data are supported. You have low latency: no headers need to be sent every time, the connection does not need to be setup for each request. So it has a very small foot print. The preferred way of serialization, for me at least, is with JSON.

There is support for this in Python: TxWebsocket (my preferred library, based on Twisted), Autobahn WS, Gevent-websocket. Supported in browsers: Chrome, Firefox, Opera, Safari, IE 10. As browser fallback you could use Flash Websocket.

When buildout a web application, you have to decide whether to build this multi-page or single-page. Multi-page is of course what most websites are using. For a single-page approach, (almost) everything is done on one page. You bootstrap a page, that sets up the websocket connection using the handshake. In this handshake the sessionid cookie from Django can be reused so you can authenticate.

I want to mimic Django URL routing on the server side. And on the client side too, really, using javascript. I use XRegexp for named group support, which helps here. When clicking on a link, you do not want to end up in a fresh page, but want to stay on the same page. But you can change the URL of the navigation bar anyway with javascript. It starts acting more like a multi-page website then, but can still remain single-page. This is usable with the HTML5 history API, better than for example adding hashes to the url. Using this, you can build a website where you can edit the same document with multiple persons simultaneously.

Django WS arranges the authentication during the handshake with the session cookie. It handles a client transport pool, event subscription, websocket URL-routing protocol; Twisted MultiFile, runws, autoreload; BSD license. It is in development. Modules: core, misc, blog, wiki. It is used in a project now for narrow casting, letting messages appear on screens, possibly for a longer period.

There are some challenges. Cleanup the design and architecture. A usable pluggable reference CMS. Proper documentation. Community. SEO: a web crawler will not index much, as only the contents of the bootstrap page are indexed.

The Django WS Code is on github: https://github.com/phrearch/django-ws-core Find me on Twitter: @jeroen_van_veen.

Audience: look at Tornado, it does something similar.

Document automation (Office) using Django

Talk by Henk Vos: http://www.rapasso.eu

You want to generate for example a Word document by pushing a button on your website and have this document contain some information that comes out of your database. You could install MS Office on your server. But we have Linux, and it is not available there. You could use a different box. Or maybe Google Docs, or the Pyuno bridge to OpenOffice. There is also python-docx.

But really, such a Word document is just an archive with some xml files. So we can use the Django template engine. Put some normal {{Django variables}} literally in your Word document. Extract the important file from the archive, run the Django template engine over it, save it, zip it up again, and let your web server serve it in a request.

DjangoCon Europe

Talk by Reinout van Rees (http://reinout.vanrees.org/)

This year's DjangoCon Europe was in Zürich, inside a stadium, a few weeks ago.

There were several talks about the real-time web. Tricky is that you can end up with two parallel MVC stacks, one in the Django backend and one in the Javascript frontend. Putting a caching server in front to speed things up will not work with web sockets. Idea is at least to always use an API.

Databases. Not everything fits in one kind of database. Files are better handled on the file system. There were tips for Postgres. You could use a big box and store everything. The NoSQL support in Django core is not done yet.

A few talks about diversity. Involving women in the community. Hard discussion. Stereotypes everywhere.

Healthy web apps. dogslow: for tracebacks.

CSS. http://gluecss.com for sprite compression. Preprocessors: hurray!

Security. Login should be done using SSL (so https). Try a restore of your backups some time, otherwise you might as well not make any backups, as you do not know if it actually helps you. django-admin-sso for giving easier access to admins for several servers.

Heroku. It's a 'cloud unix'. Focused apps, one thing. You can only use an API to communicate with the outside world. Plus documentation. They have 2-3 person teams. That was the ideal size for them. Quality comes from solid engineering, so you need time, not deadlines.

Various bits. You need to work with timezone-aware datetimes. Flask micro framework. Django core moved to github, which turned out very well.

See summaries on my website: http://reinout.vanrees.org/ There are videos online too. Check the Heroku talk and the keynote about internationalization.

Rethinking the Django-CMS landscape

Talk by Diederik van der Boor (Edoburu).

Why does everyone create there own CMS (in Django)?

Do one thing and do it well. Tight focus versus feature creep. Don;t be afraid of multiple apps in your website, separate them out. Write for flexibility and distribution.

There are various Django CMSes. You've got Django CMS, FeinCMS, Fiber, Ella, Merengue, Philo and more. Big outside contenders are Wordpress (easy to setup, but plugin hell) and Umbraco (customized UI layouts, customised page node types).

For page contents and a page tree you can use the django-fluent-pages package. That might be the only CMS-like functionality you need in your application, instead of a full blown CMS. You can use plugins, like code highlighting, MarkDown, or create your own.

If you are going to create a blog you could do it as one application, but it should really be several separate applications. Do one thing and do it well: the django-fluent-comments package.

How about user authentication, social media auth, RSS feeds for comments, e-mail subscriptions, spam protection. Those should also be separate packages. Currently, most blog applications have all or some of these thrown together.

So mostly: separate your packages.

There is a balance to strike: a too monolithic one-package approach, versus lots of packages that need lots of glue code.

See the code at https://github.com/edoburu Find me on Twitter: @vdboor and @edoburu.

Audience: a danger is that your application might work today and is broken tomorrow when someone uploads a new release on PyPI that has backwards incompatible changes. You need to keep an eye on that. Freeze your dependencies in production.

TND Dataview and Metaclass Magic in Python

Talk by Maarten ter Horst from Top Notch Development.

Python metaclasses are ideal for frameworks and abstract classes, code that you want to reuse. A metaclass is a class that handles the creation of other classes. So an instance of a metaclass is a class. Normal classes inherit from object but meta classes inherit from type. It creates a new class based on your class. So basically you can use this to have a different base class instead of object and override some basic behaviour. You can for example check if a newly created class conforms to an interface.

We use it to inspect the class definition and add a urls method that lists all other methods that return an HTTP object.

Google 'IBM Python metaclass' for a good tutorial on metaclass programming. The presentation is available soon on Top Notch Development.

PyGrunn

published May 11, 2012

PyGrunn is the Python conference in Groningen, held on Friday 11 May 2012.

See the PyGrunn website for more info about this one-day Python conference in Groningen, The Netherlands.

I will be blogging today about this conference. You may want to check blogs for this day by my brother Reinout too.

Berco Beute, CEO of PayLogic welcomes us, also on behalf of fellow organizers Goldmund Wyldebeast & Wunderliebe. They do a lot with open source, mostly Python. The PyGrunn conference is even more popular now than last year; we are sold out.

Summary of Plone Open Garden 2012

published May 04, 2012

Summary of the PLOG 2012 in Sorrento.

More info about PLOG 2012: http://www.abstract.it/abstract-en/initiative/plone-open-garden-2012/

  • Maurizio: activity for http://plone.com has started. We should be able to do more this month. Should be live before the next conference. We also added some info to http://plone.it. Talked about creating some bundles of often used products.
  • Guido: I started out here with a working prototype of plonesocial.activitystream, based on plone.app.discussion. But there were concerns about performance. We started with the lower end. We experimented with plone.app.async, which should help to avoid write lock contention when there are lots of updates on the sites. In the code we can now override the plone.app.discussion storage, to use our own data structures if needed. The async stuff breaks on a low level though. So we now have a bug reported upstream. We also discussed following/liking/favoriting people, users, pages, other content. So currently we are building on native Plone functionality. We need to be more strict on security, partly just checking that this works as expected. More info: http://pypi.python.org/pypi/plonesocial.activitystream and http://github.com/cosent/plonesocial.activitystream
  • Simone: working on collective.geo. We worked on settings in the control panel. We made it more user friendly. We wrote more documentation, using Sphinx. Final result: currently broken, so a bit of patience please. Also, see collective.geo.usersmap on github. More info: http://pypi.python.org/pypi/collective.geo.bundle and http://plone.org/products/collective.geo
  • Giampiero: worked on a comparative list between Plone and WordPress. Writing about how to migrate from WordPress to Plone, good for people really new to Plone. It is basically a map into the Plone world. Can be good for helping people move to Plone, even if it is just because their boss forces them. Help them make connections, give them some links so they can find their way. More info: https://docs.google.com/spreadsheet/ccc?key=0AjjG4VVlsN-IdG5rRmNnbWJmTjdzZDFaNklKOWoyd0E
  • Matt: we brain stormed a feature list of Plone. I am working on distilling this into a more structured form.
  • David Siedband: we discovered that when migrating to Plone 4, you loose versioning information for files and images during the blob migration. Looking at if this information is then still available somewhere so it can be fixed.

Rob Gietema: Plone conference 2012

published May 04, 2012

Rob Gietema introduces the Ploneconf at the Plone Open Garden.

More info about PLOG 2012: http://www.abstract.it/abstract-en/initiative/plone-open-garden-2012/

The Plone conference 2012 will be helt in Arnhem, The Netherlands. This is a city of about 150,000 people, so everything is basically within walking distance.

There is enough space for everyone, we have several rooms available for various audience sizes. The party will also be helt there. There is food and coffee near all rooms.

Wyn Williams will setup the wireless internet. We are actually getting a new fiber connection on the conference venue.

Airports: Amsterdam (Schiphol) is at about an hour by train from Arnhem. Rotterdam and Düsseldorf are also near.

We will have two days of training, three days of conference, two days of sprints.

Most people in The Netherlands can speak English fairly well.

Rooms are available, but there are is also a big concert stadium nearby, which can lead to more people in hotels, so do book soon. If no rooms are available anymore, contact us and we are glad to help. We can also hire a large boat for this occasion where you can sleep.

If you want to do a presentation like this one on for example your local python group or university, contact us so we can help.

See http://www.ploneconf.org/

Plone roadmap

published May 03, 2012

Matt Hamilton during PLOG 2012 on the Plone roadmap and what we want it to contain.

More info about PLOG 2012: http://www.abstract.it/abstract-en/initiative/plone-open-garden-2012/

See the Plone roadmap document on Google docs.

This is a draft document about the future state of Plone. There is not currently a single consensus about what direction Plone is heading in. This document contains for short and long term what the current thinking is about where Plone is headed.

We have the framework team who decides what really goes into a new version of Plone, via PLone Improvement Proposals (PLIP). This is near team. We now have a roadmap team who can have a longer range view, based also on what customers want and what would need to happen for this to work well. This gives a good idea to for example IT departments so they know if a feature is worth waiting a few months for or if it will take a few years for it to land in core Plone.

Plone is not for everybody. What is the ideal size? We used to say it is fine for a single user website and for a multi billion dollar world wide company. That may not be the best message. Plone is typically best suited for medium to large sites. Some metrics from the document:

  • Complexity: Plone is usually best suited for sites with multiple content authors working on a single site. For single-author sites, Plone is often considered too complex. Multi-site CMS installations, where content is shared between several distinct websites, can be built with Plone, but is not supported out of the box.
  • Duration: Plone projects typically require some ramp-up and initial planning. This means the duration of Plone projects is usually measured in weeks and months, not days. Anecdotal evidence suggests a typical project is 2-6 months long.
  • Cost: Costs vary greatly across geographies and organisations, but it is fair to say that most Plone projects involve a meaningful investment of resources (money, staff, time).

Plone has a few differentiators, like these:

  • Plone is entirely built by a community, which is fairly unique for CMS platforms that Plone is usually compared with.
  • Good security track record. It is easier for us at Netsight to patch one hundred Plone sites than one Wordpress site; and you need to patch Wordpress a lot more often.
  • With Plone 4.2 easier theming will come into the core with Diazo.

We used to say at some point that Plone 4 was going to be evolutionary and Plone 5 revolutionary. But people have been wanting to try the new technologies earlier. Still, Plone 5 might break some backwards compatibility. Trickling some of the Plone 5 technologies into Plone 4 already, may make the upgrade easier.

We are using more outside technologies. For example, instead of Kupu (which was maintained by Plone) we now use TinyMCE (which is maintained outside of Plone).

In the medium term, Plone will separate the user interface from the editing interface, using plone.app.cmsui. Plone will use Chameleon as template engine; there might be incompatibility with some add-ons, but core Plone already works fine with it, using its normal zope pagetemplates. Add five.pt to your eggs now and check if your add-ons keep working; fix them when they do not work.

In the long term we will probably get rid of the Zope Management Interface. Plone is the only major user of Zope 2, so let's make Zope 2 (or Zope 4, or whatever it will be called) what we want it to be. We have several own versions of control panels in the Site Setup already of course.

Have a look at the Plone roadmap document yourself: http://bit.ly/roadmapplone. Note that this is still a draft. Add comments! Get your thoughts in sooner, rather than later.