Loading...

Plone Conference Barcelona 2017

It was awesome to be back at Plone Conference this year. Finally! We have had participation in Plone conferences in 2009, 2011–2012 and 2014–2017, but for me the previous one was years ago: Plone Conference Bristol in 2014. Needless to say that I have missed the warm and welcoming atmosphere of a Plone conferences, and It's my pleasure to report that Barcelona did not let me down. Even the weather was still warm there in this October.

This year there was no single big Plone news at the conference. The latest major release of Plone CMS was released already two years ago, and the next feature release is still waiting for its gold master. Yet, there was still a lot of good news, and putting all the puzzle pieces together resulted in a clear picture of the future of Plone.

Disclaimer: These are obviously just my personal opinions on all these things Plone...

https://4.bp.blogspot.com/-RPnuOC4AJH8/WfWkebmt4lI/AAAAAAAABLI/CRNo1l_VN2kclL7AFq7MD9poEa9-sKMFQCLcBGAs/s1600/DMsDO13WsAAh3zG.jpg%253Alarge.jpeg

Plone Conference Barcelona was so much of fun that I took a piece of it with me back home.

Plone 2020 and beyond

At first, let's say it clear that Plone CMS remains to be a safe bet for a long-term enterprise CMS solution. If there ever was any doubt, whether Plone could make it to Python 3 in-time before the end of Python 2.7 maintenance in 2020, that should be no more. Plone will make it.

All the major blockers seem to have been solved, and the rest is just hard work left for our community (check some related talks by Alexander and Hanno about the recent events on that). Python 3 version of Zope application server powering Plone is already in beta, and it is scheduled to be released within a year. Plone, for sure, has still plenty of packages to be ported from Python 2.7 to Python 3, but there are already many sprints scheduled to continue that work in near future (including the already completed Barcelona Conference sprints). We might even have an alpha version of Plone on Python 3 before end of 2018.

In addition that, it's always good to mention, that Plone Foundation has continued to do its usual great job in all the possible paper work around managing Plone's copyrights and trademarks.

All these should be good and relaxing news for any long-term Plone user.

Let's go frontend!

The greatest challenge for Plone CMS seems to be keeping up with the ever increasing UX expections of the day, while complying with the high accessibility standards. After Plone 5 rewrote the default theme and whole front-end resource management in Plone, there are no longer blockers for using any current front-end tech with Plone. But just being able to use some tech is not enough – also the real work for better UX needs to be done. And even a lot has been done for Plone 5 and 5.1, that work seems to never end.

Plone Conference Barcelona included a great amount of front-end, user experience and accessibility related talks to educate our community. So many that I can only mention a few.

At first, there were talks regarding the current Plone user interface: Johannes gave a bit technical, but very comprehensive talk how the new frontend resource registries in Plone 5 really work. My talk instructed, how to combine the ancient powers of Zope application server with the modern Plone 5 theming support to achieve shorter iterations and faster deployments when developing new UX features. Our Rikupekka talked about our migration experiences from Plone 4 to Plone 5, and gave a demo about of the UI features we have developed using the approach I discussed in my talk. Finally, I want to mention Wildcards' Kim's talk about Castle CMS, which really showcased, how much difference well lead and focused UX development for Plone based distribution could do in just about a year. Although, the fact that Castle's development had to be forked a bit from the main Plone distribution is also telling, how difficult it is to make the same UX please everyone.

Then there were many talks about the future: there's a new branch of Plone user interfaces built completely in JavaScript on top of the great Plone REST API (which Timo gave a nice presentation about). With Plone REST API it's possible to combine the great and robust CMS features of our secure Plone backend with leading edge JavaScript based frontend. It also makes Plone based solutions feasible for the current generation of frontend developers, because only very basic Plone knowledge is needed to get started. And while there is no complete replacement of Plone user interface in JavaScript yet, there are SDK like projects with many familiar UI components already for ReactJS, Angular (check Eric's talk) and even on VueJS.

If these don't feel ambitious enough, there was one more thing: Albert's talk about Pastanaga UI – a proposal for next generation UI for generic CMSs.

Guillotina – server for a more civilized age

I'm not sure how common mistake it is, but at least we have sometimes ended up using Plone as a framework for projects, for which Plone was not really the most optimal solution. That has happened, because Plone has some very unique features we love and trust: object database with URL traversal, extremely flexible Zope Component Architecture, and very proven security model especially designed for hierarchical data.

At Barcelona conference, Nathan from Onna presented their new ”AsyncIO REST Resource Application Server” called Guillotina (open sourced through Plone Foundation)r What makes Guillotina very special and interesting is that it has all those unique features we have learned to love in Plone ”framework”, but with minimal server footprint and first class support for asynchronous programming using Python 3 AsyncIO event loop. That should allow Guillotina to go places where no Plone has gone before.

I really hope the next year brings us a suitable project to try Guillotina in practice...

There and back again

To summarize all this, here's my picture of the future of Plone on the base of Plone Conference Barcelona 2017 in three sentences:

  • Plone CMS as we know it remains here to stay – the current users remain safe with Plone
  • Plone REST API and all the UI SDKs based on it ”save Plone” by making it a feasible solution for content management related progressive web apps
  • Guillotina ”saves Plone developers” by allowing them to transfer their current Plone ”framework” knowledge into era of high-performance Python 3 AsyncIO microservices.

Obviously there was a lot more in the conference than this. There was a lot of great talks by talented speakers. It was great to see all the old friends and make some new ones. I had a chance to meet my GSOC 2017 student Oshane Bailey. And there are no parties like parties in Plone Conferences.

Thanks once again for all the organizers. It was a pleasure to be there.

We'll see if I get to see Tokyo next year...

https://4.bp.blogspot.com/-MtyXqb6O3Yw/WfWkeV2I-tI/AAAAAAAABLM/MVy3r6Utv-MM-3z7Dxaqi28CkS0Zn_IDgCLcBGAs/s1600/DMlL1SzWsAM9mfO.jpg

Photo of me, Oshane Bailey and David Bain by Maik Derstappen. They said this pose is to honor Usain Bolt.

Midsummer Sprint Final Report

Plone Midsummer Sprint was held at Jyväskylä, Finland, on 3rd–7th of July 2017. The main goal for the sprint was to polish content editors' user experience on the current Plone CMS release. While a lot was accomplished for that original goal, the final sprint topics adapted to follow the interests of its volunteering participants.

The sprint was sponsored by the University of Jyväskylä. In addition, the sprint was accepted to receive strategic funding from Plone Foundation to cover the possible travel and accommodation costs of Albert Casado, the designer of Plone 5 user interface.

This is the final report of Midsummer Sprint.

https://1.bp.blogspot.com/-ms-Qx12buNU/WWaEjNBBpTI/AAAAAAAABIM/YQx3gplenJM0bW-_UAAYvAS7ObbS4HRLQCKgBGAs/s1600/IMG_4317.JPG

Participants

There was 18 participants at Midsummer Sprint in total. The participants included, of course, our organisers, our local development team for Plone based and related services, a GSOC student working on a Plone Foundation mentored topic, a professional UX designer and many well known names from Plone community.

Our sprint organisers:

  • Asko Soukka, University of Jyväskylä
  • Rikupekka Oksanen, University of Jyväskylä

Our local development team:

  • Jussi Rajala, University of Jyväskylä
  • Jussi Talaskivi, University of Jyväskylä
  • Matti Pohjanvirta, University of Jyväskylä
  • Valtteri Karppinen, University of Jyväskylä

Google Summer of Code student:

  • Mikko Hursti, University of Jyväskylä

Plone community participants:

  • Albert Casado, Hewlett Packard
  • Alexander Loechel, Ludwig-Maximilians-Universität München
  • Eric Steele
  • Maik Derstappen, Derico
  • Paul Roeland, Clean Clothes Campaign
  • Peter Holzer, agitator Weblösungen
  • Philip Bauer, Starzel.de
  • Stephan Klinger, der Freitag
  • Sven Strack
  • Timo Stollenwerk, kitconcept GmbH
  • Victor Fernández de Alba, kitconcept GmbH

Thank you for all the participants! Many of you came to Jyväskylä with members of your family, and it was our pleasure to host every one of you!

https://4.bp.blogspot.com/-2CmJ8Dcnb6o/WWaAQ-8YzgI/AAAAAAAABHY/kQ_2dOg-bwoU6EkJzC8m-RLQl7yixpHywCKgBGAs/s1600/IMG_4683.JPG

Results

According to the feedback that we got from our participants, the sprint was considered a very successful one. Maybe the sprint was unable to fix as many content editing related issues as we were hoping for, but it definitely managed to get the best out of its participants:

At first, thanks to this sprint, all members of our local Plone development team at IT Services of University of Jyväskylä got to learn how Plone is being developed. They got their contributor agreements submitted to be able to push their patches to upstream, they learned how those patches were made, tested and reviewed in practice, and they got to know many experienced Plone developers in person. Of course, they also got to feel the spirit of an international open source development sprint, from the community with probably the longest continuing tradition on it.

The same was true for Mikko Hursti, a local student attending the sprint while working on a Google Summer of Code project for Plone Foundation. This year only four students from Finland were accepted for Google Summer of Code program. Mikko's project is about implementing a drag and drop user interface for customising content listings on Plone.

During the sprint, our local development team mainly focused on confirming and fixing the issues reported for PloneFormGen on Plone 5. PloneFormGen is the most famous form builder for Plone, used by most of the content editors at our university. Also, its unrivalled flexibility really showcases many of the unique features of Plone CMS. Before the end of the sprint, Jussi Rajala and Valtteri Karppinen submitted at least four related pull requests for it and got very familiar with the large code base in question. Not bad at all for their first sprint.

Security is one of the most advertised features of Plone CMS. What makes it particularly great feature is that content editors don't really need to know or think about it. It just works. Maik Derstappen made spectacular work at the sprint by cleaning up and fixing the code base for a major security feature of Plone called safe HTML transform. It's a configurable HTML filter, which prevents content editors from accidentally (or with malicious objectives) introducing security issues in their edits. Maik's work guarantees that the feature really works as advertised also on Plone 5. With the new synchronised configuration, it also works better than ever with TinyMCE, the WYSIWYG HTML editor used on Plone.

The latest major Plone release, Plone 5, introduced a completely redesigned content management toolbar for all logged-in users. But not all logged-in Plone users are content editors, and when they are not, the new toolbar could a distraction. At the sprint, Peter Holzer continued on earlier work by Jens Klein and introduced Show Toolbar -permission to control when the full toolbar is shown, and an alternative member tools -dropdown menu to show a minimal set of required actions (including logout) for logged-in users when the real toolbar is not shown. The default behaviour, of course, remains unchanged.

Plone 5 was also the first Plone CMS release to ship with a complete multilingual content support. With the bundled Multilingual Support -add-on enabled, Plone supports easy-to-use one-to-one translation of each content page for any language. In addition to fixing some reported issues in it, Peter Holzer and Asko Soukka redesigned its key user interface element, Translate-menu on the toolbar, to be much simpler and more consistent with the other menus in Plone's editing toolbar. With the redesigned Translate-menu soon in place, we really expect to see a good drop in translation related support requests that we currently receive from our content editors.

Plone provides, and has always provided, readable and meaningful web addresses for any content stored on it. Even better, it's really easy to content around on Plone. But what happens to those old web addresses when content gets moved? Correct. Of course Plone keeps track of moved content and maintains a redirection table for them. Unfortunately, until now, the redirection table has been invisible for Plone web masters. Luckily, Stephan Klinger championed to implement the PLIP for adding the missing redirection management UI for Plone, based on the existing (but lacking) RedirectionTool add-on. While Stephan made the most of the work, Asko helped him by implementing paging and filtering for the new redirection management control panel.

https://2.bp.blogspot.com/-mfWE2YwfOCw/WWaAQ45EEgI/AAAAAAAABHY/BhY7E58nGsoYH958xEIZs2xvEoW6XlU5ACKgBGAs/s1600/plone-sprintti005.JPG

Our farthest participant was Eric Steel, the Plone release manager, who came to the sprint all the way from the United States. Eric started his sprint by releasing the latest beta of Plone 5.1 for developers, but then, together with Philip Bauer, completed the long-awaited refactoring of Plone login forms. The current login forms used in Plone 5 are relying on a form framework, which is no longer used anywhere else in Plone. Upgrading Plone login forms to use the current form frameworks in Plone has been one of many prerequisites for upgrading Plone to Python 3. It's just awesome that this has finally been done, and we cannot wait for being able to customise Plone login forms in a more sustainable way now. In addition, Philip did also fix a few known issues in the in-place content migration from Plone 4 to Plone 5.

A lots and lots of work was also done to enhance the official Plone documentation at the sprint. To really get an idea, how Plone documentation applies traditional CI practices to ensure high quality documentation, we really recommend watching the presentation that Sven Strack gave us at the sprint. Sven Strack, Paul Roeland and Alexander Loechel worked at least for better tools for building and testing the documentation, better theme for the upcoming Plone 5.1 documentation, better readability of the docs on mobile devices, refactoring robot generated screenshots (helped also by Asko), documentation on developing better documentation for contributing the docs itself and probably much more. In addition, Paul also fixed a few reported accessibility issues on Plone 5 and tested Asko's approach for building Plone themes with Webpack. Alexander used some of his sprint time to mentor his GSOC student Pavithira KC on implementing new add-ons listing for plone.org.

Other interesting developments at the sprint included Maik implementing sub-templates into bobtemplates.plone, Alexander adding tox based test setup into bobtemplates.plone and Jussi Talaskivi enhancing plone.docker. Once Maik's enhancements for Plone add-on templates at bobtemplates.plone are available, they will allow to make significantly cleaner initial templates and provide sub-template based scaffolding throughout the add-on lifetime. Alexander's examples for tox based test setups pave the way for testing add-ons easily on both Python 2 and Python 3. Jussi clarified documentation on using Plone Docker images (also as a cluster), investigated into slimming Plone Docker images and then researched the remaining issues in installing Plone with pip, the official Python package installer.

Finally, there was the dream team of Albert Casado, Victor Fernández de Alba and Timo Stollenwerk working on a new CMS user interface and user experience concept called Pastanaga UI. If something makes this project special, it's the team. Timo is expert on test driven development, and experienced Plone entrepreneur, who really knows the challenges on the current CMS market. Victor is expert on Plone as enterprise CMS. He has authored a book on using Plone for intranets, and has managed many hundreds of Plone sites during his prior position at Universitat Politècnica de Cataluny. Albert, of course, is best known for his design of the current Plone 5 default theme called Barceloneta. And the best part: they all have successfully worked together before.

At the sprint, Albert completed many of his earlier designs for Pastanaga UI components and composed a visual style guide to help with the reference implementation and later adaptations. Thanks for Alberts prior experience on Plone, Pastanaga UI simplifies many Plone key features to be easier to use than ever, especially on mobile. All this his available on request until the reference implementation has been completed. Victor and Timo supplemented Albert's work by bootstrapping a ReactJS based reference implementation of the design. Their goal is to complete Plone REST API compatible minimal viable product with the new UI soon, and attract resources for a more complete implementation later. Since the first implementations will be fully JavaScript based, it not yet sure, if Pastanaga UI would be adaptable for the current Plone UI.

Many of our sprint days started with a presentation on some of the sprinted or otherwise current topics, including a presentation on Pastanaga UI by Timo and Albert. Recordings of those presentations are now publicly available on our Plone based video publishing platform Moniviestin.

https://4.bp.blogspot.com/-q5N8_SR3puo/WWaAQ_eOPzI/AAAAAAAABHY/HTJ4hp1Sn5QQZWdDRenxN0CcxTTks7JoQCKgBGAs/s1600/IMG_4619.JPG

Program

While the code is important, Plone sprints are also about the people, who participate them. Plone community has a long tradition for dining or just hanging around together after those very intensive work days, and Midsummer Sprint did not make an exception. We also tried our best to take account that many of the participants travelled with their families.

Most of us dined together every day from Sunday evening to Friday evening. While many of the participants were still arriving on Sunday, we dined at Restaurant Shalimar inside the train station, to be able to welcome travelling participants and their families as they arrived.

In the Monday evening we dined at Restaurant Sohwi, which has always been popular place among the students and staff of our university due to its close proximity to our main campus areas.

On Tuesday, we wrapped up the day a bit earlier than usual and took a guided tour at Alvar Aalto museum (tour being sponsored by the university) to learn and get inspired by Aalto's design. In the evening, we walked a short forest trail at Haukanniemi together, and experienced a beautiful and warm sunset while enjoying a traditional Finnish camp fire with Finnish sausages (and surprisingly without mosquitoes).

https://3.bp.blogspot.com/-Z77fou8gNmA/WWaAQ-LfTEI/AAAAAAAABHY/9SVGOM6cvPQE1h2lSmvYoUq6vk7p-PMUgCKgBGAs/s1600/IMG_4591.JPG

In the Wednesday evening we dined together at viking restaurant Harald, where it was possible to enjoy many Finnish delicacies including reindeer, gravlax, Scandinavian rye and malt bread, lingonberries and cheese bread with cloudberries. We were lucky enough to catch the summer discount of the restaurant to make that evening a bit more affordable.

https://3.bp.blogspot.com/-iGXt8ZwRQ5w/WWaAQ6ec7yI/AAAAAAAABHY/XFlT3b5Bt-QuR_JuuT0WbtAlkqqCQFwNgCKgBGAs/s1600/IMG_4628.JPG

On Thursday, we organised a traditional Finnish sauna evening with street food at Opinkivi Sauna, a private sauna apartment owned by The Student Union of the University of Jyväskylä. Two separate dressing rooms and saunas at Opinkivi Sauna ensured that everyone was able to enjoy Finnish sauna in comfort.

https://3.bp.blogspot.com/-_iGj4mYw5n0/WWaAQ2fh1fI/AAAAAAAABHY/icS-SIeIlx04OJJQQe13PejSEtDgQT-NACKgBGAs/s1600/IMG_4655.JPG

And finally, in the Friday evening, we ended the sprint with the remaining participants by dining together at restaurant Trattoria Aukio, near the harbour of Jyväskylä, and then, said the goodbyes.

Thank you all, and see you soon!

https://4.bp.blogspot.com/-AeRVBR7_aL4/WWaAQ7G0QDI/AAAAAAAABHY/HFKcPSnkAsYkIbNX-mufwu2ri-jLFTP1wCKgBGAs/s1600/plone-sprintti013.JPG

Case Study: Creating a Course Registration System in Short Notice (Jedi Style!)

Here is a nice story, that almost got lost in translation (literally - its published in Finnish last summer).

It was a warm, late afternoon on May 2016, when we at plone-support received a message, asking for help. Perhaps we weren't like Obi-Wan Kenobi on that, but close enough: A customer needed to have a new course registration system and migration from the old one so soon as August 2016. Whoa, three monts, summer coming on and other projects on the road too. Should we just skip it or take the million credits to get even with Jabba?



Well, here's a spoiler alert: https://www.fdpe.fi/

fdpe.fi -etusivu

 

1. The case of The Finnish Doctoral Programme in Economics

A Joint Doctoral Programme of the Economics Disciplines of 10 Participating Universities in Finland. The Finnish Doctoral Programme in Economics (FDPE) promotes high-quality doctoral education in economics in Finland by organising systematic and diverse doctoral courses and seminars.
 Here's is a rough translation of the initial email we received in May 2016.

We will need a platform, where we can manage nation wide economics doctoral programmes cooperation. To be more clear: we need a web-based system, that allows students from participating universities to apply for doctoral studies courses from another universities. Ideally the principles of the system would be: 
- Each university inserts a batch of courses as part of the cooperation
- The courses became a course pool, that will be communicated to the studens via the system
- The students from each univeristy may register for the coursers on the course pool
- After a course a teacher may communicate the grade of each student to the student's home university via the system
- Once per year the registrations are gathered and counted, how many participants there are from university x to university y
- Based on those calculations it is possible to settle the compensation between universityes. 

The point is to build a platform to gather registrations and communicate students grades and registration information. The platform should be as simple and robust as possible. 

Our schedule is uncomfortably tight in the sense that the system (or at least te application feature) should be online at latest in August.
****************

Ok, so we got the message. And why they chose to ask us, is because of another Plone-site that shows events and gathers applications there: http://inforte.jyu.fi

We discussed about the case, and thought it was quite a challenge to present so late at spring, (with all the vacations and other projects we had in store for the summer). But we also thought, that we had a quite toolset for this kind of system:
  • Plone would take care of the website, permissions, workflows, security and robustness. 
  • Courses would be dexterity content types - easy to create and to modify if needed
  • The registration form could be easily created using Plone Form Gen add on - of which we had lot's of experience 
  • The information about participants could be delivered in the system using plone permission management and intranet features
  • This was a good case to try out new Plone 5 and its out of the box responsive layout

So we were set to talk with the customer and see what else they might have in mind.

After a positive meeting, we also had this information:
  • Migration was needed, but only for visible content
  • The visual desing of the site would be secondary feature
  • If only the application forms and course information were online already in August, the rest of system could be finished by September
  • We could use HAKA indentity federation service to allow students and staff from different universities to login with their own userid and password. We could have created internal useris's for the admins and could have forced students to insert more information at the application form, but this was way better solution. We had used HAKA before with Plone in many occasions (Like Moniviestin video publishing platform)
  • The couldn't use national Opintopolku.fi -service (at least not yet) for doctoral studies. 
  • The project had fixed deadline and the customer was willing to prioritize and to focus on the most important features first

So we decided to set out for this venture!



2. Plan B. 

Actually, we had no plan B, so we came up with plan A, to divide the development into clear phases, visible to the customer:
  1. At first we would set up a preview-site: the customer could then start using Plone and to learn how to use it. 
  2. A light theme customization
  3. Site name, domain, certificate and HAKA-federation bureaucracy was set to motion
  4. Migration to the old public content (scrape public content)
  5. Shibboleth-integration (HAKA) development for Plone 5
  6. An event like Course content type would be created
  7. Using a Plone Form Gen -solution we had created before on another case to automatically populate basic user information about the person filling the form.  
  8. Using a previous solution to generate reports on every separate application form. 
  9. A Plone folder, where a teacher stores the saved Excel-files about course grades
  10. Other features, like managing permissions,  communication, instructions, planning the application form and theming.
So, we had plans.
Some features, like good security, content management, intranet features,  permission and group management, responsive web design and workflows are built in to Plone CMS. We used the latest Plone 5 version on this case.



The actual work

We started by creating a preview-site in june 2016. This way it was easy for the customer to follow progress. So we added an empty Plone 5 site with minor theming and gave admin permissions to the customer so they could get to know how Plone works. We also did the migration of old public content at this point.

When the migrated content was checked and deemed okay, and the bureaucracy with the domain name done, we published the new site in june 2016 - only without the form functionalities. However, the customer could already do some content editing and checking that everything was okay.
Next up was the HAKA federation. Using HAKA federation, every higher education student in Finland could log in to the site using his/her own user id and password to make logging in easy. At the same time our customer could easily gather the name, email and organisation of every enrolled student. In addition they could add new site administrators from different organizations. Plone allows very fine-grained permission management.

Last, but not least, we developed the registration form and a new content type called Course, with some basic data (start date, end date, information). When a student goes to a course, there is a registration link which opens the form with all necessary fields already populated. The registration form was done using Plone FormGen add on. We had used that add on for over a thousand forms at JYU, so we knew it was stable and customizable.

The registrations were collected to a .csv-table, easy to open in Excel or Google Sheets and easy to use from every organization participating FDPE programme.

In the end we created short instructions for the site admins on how to manage content. The instructions were just Plone pages with some images and links.


Example one: Course Page
fdpe.fi -kurssisivu

Example 2: Registration Form
fdpe.fi - ilmoittautumislomake

Summary

The customer was very satisfied with the development and results, and so were we.

This kind of development in this short time period wouldn't have been possible if we didn't have the suitable technology available and knowhow on how to properly utilize it.

Additionally the customer was really cooperative - they focused on getting things done, they did their part on the content and other bureaucracy, and most importantly they knew what to prioritize.

We had limited time and limited resources - and usually it is a good thing if you can actually prioritize and altogether just cut out some features if needed. First things first, and then some.

By using free Open Source components and no need to pay any licence fees, the only thing we (and the customer) needed to focus on, was the actual development.

Now, after almost a year of usage there has been near to none feature requests or incidents using the system, and definitely nothing major. But there have been hundreds of successful registrations and everything seems to be working fine. 

If you want to know more, please contact

It is party time!



Plone Mephisto Sprint 2016 Report

Plone Mosaic 2.0 RC has now been released for Plone 5. Similarly to previous releases, you can deploy a demo site of it at Heroku with a single click. Please, join the bug hunt and help with reporting and fixing issues which matter you the most. Please note that Mosaic 2.0 is a major release because it no longer supports for Plone 4.3 (yet, most of the bug fixes could be cherry-picked to 1.0 branch by those who care). The final release will be made once possible migration problems from 1.0 have been solved.

https://2.bp.blogspot.com/-wyp9RiWziRc/V9tgtRm7HTI/AAAAAAAAA8M/khpeoA2sQUQxyte5SfSMEctOP0SJzObQwCPcB/s1600/IMG_1991.JPG

Yes, there was a yet another Plone community sprint. Plone Mephisto Sprint 2016 happened at Leipzig, Germany, from 5th to 9th September, and was focused on improving TTW (through-the-web) experience of customizing Plone sites for better flexibility and hackability. The sprint was organized by Maik Derstappen and it was sponsored by Derico, e-ventis and Plone Foundation. Once the sprint was approved as a strategic sprint by the foundation, enhancing Plone Mosaic became the main target of the sprint.

The participants included Maik Derstappen (derico), Peter Holzer (agitator Weblösungen - BDA), Thomas Massmann (it-spirit), Asko Soukka (University of Jyväskylä), Thomas Lotze, Andreas Jung, Stefania Trabucchi, Jens Klein (Klein & Partner KG - BDA), Christoph Scheid (Uni Marburg), Kristin Kuche (Uni Marburg), Stephan Klinger (der Freitag), Nathan Van Gheem (Windcard Corp), Veit Schiele, Gil Forcada Codinachs (der Freitag), Ramon Navarro Bosch, Michael Töpfl (e-ventis.de) and Christoph Töpfl (e-ventis.de). During the sprint there was also remote participation by Dylan Jay and Rodrigo Ferreira de Souza (Simples Consultoria).

Let's start with some Github Activity statistics collected by Nathan Vangheem from the sprint. During the sprint, at least the following packages were touched with these great numbers:

  • plone.app.mosaic (23 PR, 154 commits, 2 outstanding PRs)
  • plone.app.blocks (4 PR, 18 commits)
  • plone.app.standardtiles (9 PR, 18 commits, 2 outstanding PRs)
  • plone.app.tiles (4 PR, 9 commits)
  • plone.tiles (2 PR, 16 commits)

Behind those numbers, there was a lot of bug fixes, new issues reported, some refactoring and simplification, few major changes to the foundations of Plone Mosaic, and the long awaited initiative for more complete configuration documentation. Thanks to all the bug fixes, Mosaic Editor and TinyMCE in it will break much less often. Also layout related permission work now as expected. To name the other major fixes and changes to Plone Mosaic, we:

  • deprecated dedicated image and attachment tiles in favor of using image and file content types and linking them with rich text tiles as without Mosaic.
  • removed complex universal pluggable grid system (tm) implementation in favor of simply using such CSS grid class names that it's possibly to build any current grid system for those class names. This finally makes Mosaic edit and view mode show the same grid by default on Plone 5.
  • removed Mosaic Editor from content add forms and introduced a simple add form with just title and description for those content types, which have Mosaic enabled and its layout view defined as their default view. This removes all experienced confusion of add forms some times behaving differently from edit forms and not being able to save images directly inside the new containerish content.
  • unified HTML tile implementations and removed dedicated example tiles for headers, lists, etc, in favor of a single rich text tile (which would still allow similar dedicated or templated tiles).
  • introduced outline mode for the editor (pressing Alt modifier key while in editor) to keep the default editor experience simple, but still allow more technical look into the layout and make it easier to split the layout into separate rows.
  • fixed a major issue where versioning of content with blobs in its tiles' configuration created empty blobs into filesystem. This has been a major issue for collective.cover users and is now fixed with new plone.app.tiles releases (1.1.0 for collective.cover).

In addition

  • we fixed a few site layouts related compatibility issues with Plone 5 and added a support for enabling site layouts support with a single line in buildout. Site layouts are not yet enabled by default.
  • we implemented a new, but transparent, tile configuration and data storage to mostly avoid using annotation objects with shared content layouts (and be more friendly for ZODB connection cache).
  • Michael and Christoph (Töpfl) worked on Rob Gietema's ReactJS based Mosaic Editor experiment, and Ramon started a new Angular 2 based Mosaic Editor experiment. Hopefully at least the other one will succeed to give us a fresh flexbox based layout editor during the next year.
  • Maik lead work on example content layout to be shipped with the final Mosaic 2.0 release.
  • Andreas started work on allowing custom views for existing content tile.
  • Dylan worked on user interface and TinyMCE support for allowing tiles inside rich text tiles.
  • Rodrigo worked on refactoring code of RSS and calendar portlets to be easily re-usable with respective tiles.

We also discussed about the path to get Mosaic into Plone core. The current plan is to get Mosaic dependencies into Plone core first (plone.tiles, plone.app.tiles, plone.app.blocks, plone.app.standardtiles), but only PLIP the user interface package (plone.app.mosaic) when it works well enough with the other add-ons shipped with Plone (e.g. multilingual). Unfortunately, no PLIPs were written yet.

https://2.bp.blogspot.com/-ghcP4AslhMw/V9tgDQvN1sI/AAAAAAAAA78/Xm5_Sqi74vUvUqpaFGREWEScnuo0amb7gCPcB/s1600/IMG_1892.JPG

A few photos from the sprint are available at Google Photos. In addition to full day sprinting, we did get a city tour around Leipzig and enjoyed Maik's barbequing at the sprint garden. Maik did a great job in organizing the sprint, and I really hope, we made it worth the effort. And as always, the work around Plone Mosaic continues also after the sprint. It's still huge effort left, but while it's still not ready for Plone core, it can already be customized to give real return on investment, as seen in Castle CMS. Finally, Big thanks for everyone participating the sprint. It was a pleasure to work with you, and I hope to see you all again!

Creating flexible and responsive tile-based pages using Plone Mosaic

What is Plone Mosaic?

Plone Mosaic is a new layout solution for Plone CMS. Mosaic, Blocks and Tiles provide a simple, yet powerful way to manage the pages on your Plone website. 
In this article I will give examples on how to create and edit flexible and responsive tile-based pages using Plone Mosaic. I'll also discuss some issues I have so far bumped into, and ponder on the possibility to use Mosaic to replace Portalview, our current tool to compose customized portals. I'll use Plone 5, the newest version of Plone CMS.
Normally a Plone page consists of a title, description and content section. Using Mosaic one can easily create custom layouts and use them as templates for othes pages.


Mosaic editor example

1. How to Create a Mosaic Page

All too easy:
  1. Add a new page
  2. Select Display -> Mosaic layout
  3. Select Basic or Document layout
  4. Save

Basically you first have to create a page and then change how the page is viewed - using normal Plone page layout or Mosaic layout. 

2. How to Edit a Mosaic Page 

Mosaic editor on Plone 5
You can still edit normal page properties on the top left corner, but for editing Mosaic layout, there are two menus on the top right corner: Format and Insert.

At first I'll insert a couple of tiles into place. Starting with text tiles is the way to go.
Insert menu

It is easy to drag and drop the tile into a desired place. There can be 1-4 colums side by side. And they are responsive too.

In this example I added two text tiles and an image.


 
Drag and drop the new tile to a desired place.

Image dropped over a text tile

Embedding media works well too using the Embed tile (and Oembed). Just add a media URL.



One thing missing here, though, is the opportunity to change embed size. Quite often the video size is not optimal.

3. Formatting a Mosaic Page

I can quickly drag and drop new tiles to the page, rearrange or delete tiles.

If I want to edit a text tile, I'll just click it and a TinyMCE editor appears:
TinyMCE on Mosaic text tile

The editor has basic editing features, such as:
  • Formatting (headers, paragraphs etc.)
  • Text alignment
  • Bullet lists
  • Images
  • Links
Occasionally I have missed the opportunity to edit HTML, though.


However, the basic formatting functions on tiles go a long way:
Formatting options

I can change content alignment, add a dark background and add some padding between tiles. Of course this could be done using Plone theming tools too.

Changing the structure of a mosaic page is really easy and it works well - I haven't come across any issues on drag and drop (Using Firefox on OSX).

Replacing Portalview with Mosaic?

One use case for Mosaic when we migrate our websites to Plone 5 could be replacing our multiple portal pages. They are created using our own Portalview composition add on (sorry, only a really old version available!). Portalview contains e.g. the following features:
  • Possibility to compose a customised layout (based on folders and other Plone content)
  • Image/text/video/page carousel (Yes I know, carousels are evil :)
  • Accordions
  • Tabs
  • Dropdown menu
  • Custom CSS!
All can be manipulated in the browser.

An example here:



And another one:


Issues and suggestions

In addition to myself there are couple of users and content managers working with Mosaic. First comments have been positive: "This looks shiny and modern!" More experience we will get next autumn when users begin to create new site for a new faculty at University of Jyväskylä.

"This looks shiny and modern!"

Some issues or suggestions for features so far:
  • Selecting between basic and document layout is probably not needed activating Mosaic layout?
  • In addition to text tile there are list elements and subheadings - they can be added through text tiles - perhaps not needed as tiles at all?
  • No unique ID:s on different tiles - makes it harder to create customised CSS for certain tiles
  • TinyMCE doesn't show html view. Could come handy at some cases (embedding an iframe for example)
  • Not possible to change embed size.  
  • No custom CSS
Overall technically Mosaic is very robust - I haven't come across any errors or technical issues while using it.

However, Mosaic still has some missing features in order to replace Portalview as it is, but luckily:

Plone Mephisto Sprint 2016, Leipzig, Germany, September 5th-9th 2016

Due to power of the awesome Plone open source community, there will be a sprint to develop Plone Mosaic further!

 


Plone Barcelona Sprint 2016 Report

For the last week, I was lucky enough to be allowed to participate Plone community sprint at Barcelona. The print was about polishing the new RESTful API for Plone, and experimenting with new front end and backend ideas, to prepare Plone for the next decade (as visioned in its roadmap). And once again, the community proved the power of its deeply rooted sprinting culture (adopted from the Zope community in the early 2000).

Just think about this: You need to get some new features for your sophisticated software framework, but you don't have resources to do it on your own. So, you set up a community sprint: reserve the dates and the venue, choose the topics for the sprint, advertise it or invite the people you want, and get a dozen of experienced developers to enthusiastically work on your topics for more for a full week, mostly at their own cost. It's a crazy bargain. More than too good to be true. Yet, that's just what seems to happen in the Plone community, over and over again.

To summarize, the sprint had three tracks: At first there was the completion of plone.restapi – a high quality and fully documented RESTful hypermedia API for all of the currently supported Plone versions. And after this productive sprint, the first official release for that should be out at any time now.

Then there was the research and prototyping of a completely new REST API based user interface for Plone 5 and 6: An extensible Angular 2 based app, which does all its interaction with Plone backend through the new RESTful API, and would universally support both server side and browser side rendering for fast response time, SEO and accessibility. Also these goals were reached, all the major blockers were resolved, and the chosen technologies were proven to be working together. To pick of my favorite sideproduct from that track: Albert Casado, the designer of Plone 5 default theme in LESS, appeared to migrate the theme to SASS.

Finally, there was our small backend moonshot team: Ramon and Aleix from Iskra / Intranetum (Catalonia), Eric from AMP Sport (U.S.), Nathan from Wildcard (U.S.) and yours truly from University of Jyväskylä (Finland). Our goal was to start with an alternative lightweight REST backend for the new experimental frontend, re-using the best parts of the current Plone stack when possible. Eventually, to meet our goals within the given time constraints, we agreed on the following stack: aiohttp based HTTP server, the Plone Dexterity content-type framework (without any HTML views or forms) built around Zope Toolkit, and ZODB as our database, all on Python 3.5 or greater. Yet, Pyramid remains as a possible alternative for ZTK later.

https://2.bp.blogspot.com/-zRaopbaHcPY/V0H3WpxtQHI/AAAAAAAAAzg/1xQ5hbLqP1ITLbddj7jSTST_v0rC8Y41ACKgB/s1600/IMG_0599.JPG

I was responsible for preparing the backend track in advance, and got us started with a a simple aiohttp based HTTP backend with experimental ZODB connection supporting multiple concurrent transaction (when handled with care). Most of my actual sprint time went into upgrading Plone Dexterity content-type framework (and its tests) to support Python 3.5. That also resulted in backwards compatible fixes and pull requests for Python 3.5 support for all its dependencies in plone.* namespace.

Ramon took the lead in integrating ZTK into the new backend, implemented a content-negotiation and content-language aware traversal, and kept us motivated by rising the sprint goal once features started clicking together. Aleix implemented an example docker-compose -setup for everything being developd at the sprint, and open-sourced their in-house OAuth-server as plone.oauth. Nathan worked originally in the frontend-team, but joined us for the last third of the sprint for pytest-based test setup and asyncio-integrated Elasticsearch integration. Eric replaced Zope2-remains in our Dexterity fork with ZTK equivalents, and researched all the available options in integrating content serialization of plone.restapi into our independent backend, eventually leading into a new package called plone.jsonserializer.

The status of our backend experiment after the sprint? Surprisingly good. We got far enough, that it's almost easier to point the missing and incomplete pieces that still remain on our to do:

  • We ported all Plone Dexterity content-type framework dependencies to Python 3.5. We only had to fork the main plone.dexterity-package, which still has some details in its ZTK integration to do and tests to be fixed. Also special fields (namely files, richtext and maybe relations) are still to be done.
  • Deserialization from JSON to Dexterity was left incomplete, because we were not able to fully re-use the existing plone.restapi-code (it depends on z3c.form-deserializers, which we cannot depend on).
  • We got a basic aiohttp-based Python 3.5 asyncio server running with ZODB and asynchronous traverse, permissions, REST-service mapping and JSON-serialization of Dexterity content. Integration with the new plone.oauth and zope.security was also almost done, and Ramon promised to continue to work on that to get the server ready for their in-house projects.
  • Workflows and their integration are to be done. We planned to try repoze.worklfow at first, and if that's not a fit, then look again into porting DCWorkflow or other 3rd party libraries.
  • Optimization for asyncio still needs more work, once the basic CRUD-features are in place.

So, that was a lot of checkbox ticked in a single sprint, really something to be proud of. And if not enough, an overlapping Plone sprint at Berlin got Python 3.5 upgrades of our stack even further, my favorite result being a helper tool for migrating Python 2 version ZODB databases to Python 3. These two sprints really transformed the nearing end-of-life of Python 2 from a threat into a possibility for our communitt, and confirmed that Plone has a viable roadmap well beyond 2020.

Personally, I just cannot wait for a suitable project with Dexterity based content-types on a modern asyncio based http server, or the next change meet our wonderful Catalan friends! :)

About XPath like tools for JSON

It bothers me that I have processed JSON manually and that there are standard tools like XPath and XSLT for XML. There must be better tools available for JSON also. Here are the ones I found for Python and some observations about them.

ObjectPath

  • Powerful query language
  • Reminds me of write once regexps
  • Focused more on command line usage than module in the tutorial
  • Doesn't support Python 3

DPath

  • Simple API. Maybe too simple.
  • Good examples in README
  • No other dependencies
  • Supports Python 3

Jsonpath-rw

  • Rewrite of older jsonpath library which is a port from Javascript version
  • Some minor dependencies
  • Supports Python 3

Jq


If my requirements are simple I would probably go for dpath or jsonpath-rw (in that order). If I need some heavy lifting I would go with jq. ObjectPath has the nicest web pages but the lack of Python 3 support is a show-stopper nowadays. There doesn't seem to be a clear winner at the moment (like Requests for http client or SQLAlchemy for ORM). Your mileage may vary.