Forest header image

Symfony Finland
Random things on PHP, Symfony and web development

eZ Platform: A CMS built with the Symfony Framework

eZ Platform is the Open Source Content Management Platform from eZ Systems. Previously known as eZ Publish, the first version of the new product was launched in December 2015. Thanks to the Symfony Full Stack approach it is immediately familiar to Symfony2 developers, while extending it with content management features.

Back in July 2012 the development team of eZ Publish announced the future versions would be built using the Symfony2 Framework. At that time Symfony2 itself was just a year old and was a major step for the PHP world as a whole.

The approach of integrating the new stack while keeping backwards compatibility meant there would be quite a bit of work on the fundamentals. This lead to the product receiving virtually no new end user facing features for a long time.

Fast forward three years and the product has matured to a product, eZ Platform, that is dropping the decade old legacy PHP code completely. As the name implies, a software framework is meant to provide structure to applications built with them.

A framework brings stability, but also a degree of rigidity that is not always ideal. There is also a learning curve, which is adds complexity of getting started. This is why even rock stars and experienced developers should learn the framework before working with it.

Advantages of building on a Framework

PHP has traditionally been a haven of developers reinventing the same things, very much like the JavaScript world is doing currently. While this drives innovation, it can be quite a burden on developers and have diminishing returns past a certain point.

Upon a mature ecosystem developers have learned to move on to solving higher level problems and learned to share. Symfony and other frameworks like Zend, Laravel and microframeworks like Fuel and Slim provide alternative approaches to building applications (like a Content Management System).

Much has changed since 2012 with the meteoric rise of JavaScript and Drupal looking familiar to a developer mostly working with eZ Publish or Symfony Framework. Let's take a look at what this time has given the eZ Publish / Platform developers.

Content Management built on Symfony2

Working with eZ Platform is very familiar to anyone who has worked with the Symfony framework. In fact the basic structure and functionality are identical to those. eZ Platform extends the framework with additional functionality in the same way as EPiServer extends ASP.net MVC or how Expression Engine is built on Code Igniter.

The Symfony Framework provides base functionality like:

  • A complete HMVC architecture
  • Session management
  • Debugging tools
  • Caching utilities

eZ Platform extends the Symfony framework by adding:

  • Sophisticated Content Management Features
  • A pluggable Content Repository Model layer
  • Integrated Solr search capability
  • Site Mapping (Domains, paths, locales...) with dynamic configuration

In addition eZ Platform relies on third party extensions (Bundles) for:

You can extend your application by using all the regular functionalities and alternative models available to Symfony Framework applications. The flexible routing component from the Symfony CMF project also allows catching requests and acting on them before they even reach the eZ Platform kernel.

You can also integrate your Symfony applications deeper by sharing functionalities, such as in the example of integrating the FOSUserBundle to store eZ Platform users in MongoDB:

As you all know Symfony2 is a core part of eZ Platform and in this short walkthrough we will demonstrate that with eZ Platform you can easily integrate a famous bundle: FOSUserBundle into a core feature of your eZ application, the User System. This integration will allow you to separate the User Repository in MongoDB letting eZ managing the views and the contents as usual.

The above structure demonstrates how both the code and the skillset of a Symfony2 and eZ Platform developers are interchangeable. Domain specific knowledge and fluent use of the content storage API require learning, but the fundamentals stay the same.

It's also worth noting that Symfony2 framework takes quite a bit of influence from the Java world, so eZ Platform might be the best PHP CMS for Java Developers. Learn more about eZ Platform and the accompanying eZ Studio product:

Modern Talking: APIs

API is like the 1980s band that keep on coming back with a fresh remix of that same old song. The current must-have checkbox is a REST API. Keeping up with the trend eZ Platform has an extensive (and extensible) REST API, which is the main method of communication for the Admin UI.

While eZ Platform itself is built on the Symfony2 framework, the internal APIs (SPI and API) have been architected to be independent of the whole Kernel. This opens up new possibilities in the future, allowing communications in external applications not only via HTTP REST APIs, but also internally in other applications written in PHP.

In his talk on the future of Drupal Larry Garfield makes interesting guesses into the future of web development with PHP. Predicting the future is hard, but I agree that likely asynchronous programming will play a part in the PHP world too.

The above and the decoupled PHP APIs eZ Platform offers could enable building light-weight performant external API endpoints with PHP using Icicle (Build a Superfast PHP Server in Minutes with Icicle) with content indexed in a Graph Database. If you should be so lucky to require high performance.

In the end technology is nothing but means to an end, just as the printing press was in it's time.


Written by Jani Tarvainen on Monday October 12, 2015
Permalink - Tags: symfony, ezplatform, php, cms

« Pagekit is a Modern PHP CMS - Rendering Riot.js tags in Twig using Node.js »