Forest header image

Symfony Finland
Random things on PHP, Symfony and web development

The face of Symfony: User Interfaces

Symfony is a collection of software components. It's also a framework to tying these components together to provide a base for all kinds of applications. As a backend framework the Symfony Standard Edition does not come with a default UI, but there are a number of options to create these.

Many web applications focus on creating a custom flow for end users of the site to create and edit the the content they create. Be it product orders, content, videos, location data or anything inbetween. In addition there is often a need for a generic user interface for data administration: a CRUD (Create, Read, Update, Delete)

The outer shell of the application can be very good and polished and win awards, but the CRUD defines how administrators perceive the system. In today's world abundant with capable options for creating server side applications, this is increasingly important. Apple products are a classic example of how a technically inferior product can be perceived as better due to user experience - because it is!

Back end frameworks in general don't come with an admin interface, and this is one reason why CMSes are increasingly used for web applications. Tools like WordPress and Drupal both have a definitive interface which people build around, where as applications built with Symfony, Laravel or Express.js don't.

This makes CMSes more tangible brands than frameworks. It's like comparing Body Lotion to Motor Oil. I can't quite feel the difference between engine lubricants.

Standard Admin UIs with Symfony

As mentioned earlier, the Symfony Framework does have options for administration interfaces. The first incarnation of it, Symfony1, did come with an Admin Generator and was in this respect closer to a complete product than the Symfony2 components or Framework.

Currently the Standard Edition makes few ammends towards any specific front end technologies, an exception is the inclusion of the Boostrap 3 form theme in Symfony 2.6. Considering the rapid evolution of the front end technologies, this is also a good thing. Nowadays even a dependency on jQuery seems quite archaic, for no particular reason.

A few options for administrating all types of content via an administration interface for Symfony2 framework applications are:

  • Sonata Admin
  • EasyAdminBundle
  • KunstmaanAdminBundle
  • eZ Platform UI bundle

Sonata Admin is the most commonly used extension for providing generic administration interfaces for Symfony2 powered projects. It is widely used and has plenty of functionalities and extensions. You can use it to administrate Doctrine2 ORM, Propel, PHPCR, MongoDB and translation entities. This covers most needs and with the AdminLTE theme the look and feel is very modern.

EasyAdminBundle is a simplistic crud that only allows administration of Doctrine2 ORM entities. The limited scope means that it is very approachable. Despite the simplicity this bundle is extensible and the design can be customised. It may not come with all the bells and whistles of Sonata, but it's a great place to start working with Doctrine2 ORM entities.

KunstmaanAdminBundle is a split of the Kunstmaan CMS. It's designed to be a CMS administration interface first and foremost, with it's tree navigation structure. The interface is clean and intuitive. The coupling to CMS and the scarcity of documentation on how to use this as a stand alone option might render it out of question unless you plan to use the other bundles.

eZ Platform UI Bundle is the GUI for the upcoming eZ Platform CMS. The bundle is coupled to eZ Platform and offers a default interface for editing content and structuring functionalities via menus. It but does not come with automatic listings of custom content, but you can extend the eZ Platform UI with your own CRUD views to provide an integrated editing experience for the CMS domain and custom application data.

A next generation CRUD?

From the quartet above the eZ Platform UI bundle is the most contemporary, it loads content and pages using the backend and a single page application front end. The design remains a bit rough around the edges, but for end users it already offers a decent framework for integrating various different interfaces under a single consistent user interface. Used together with the Generator bundle it can provide rapid development: Generating a CRUD Controller Based on a Doctrine Entity

As for design, there is no reason to start reinventing the wheel. With projects like Material UI merging Material Design with React.js, the creation of high quality admin interfaces has never been easier. The end result may be bland and generic, but it allows the users to focus on the task, not on the interface.

For most administrators of Symfony2 powered applications Sonata likely remains as most likely "face of Symfony", but given the importance of user experiences there is plenty of room for a modern, integrated and extensible CRUD. The challenge of building an interface that matches the stability and backwards compatibility promise of the Symfony Frameworks is obviously something that needs careful consideration.

It's increasingly important for back end frameworks to have a recognisable interface.


Written by Jani Tarvainen on Monday November 9, 2015
Permalink - Tags: easyadminbundle, ezplatform, sonata, ui, symfony

« Symfony and eCommerce: Elcodi, Sylius and Thelia - What is HTTP/2 and how to deploy it? »