A big topic during Symfony Live 2010 was the need of quality web applications developed using symfony. CMS (content management system) applications are core to modern web development and until recently, even just 6 months ago or so, there were few available options built in symfony. Projects like SimpleCMS and Sympal had been started and while they showed potential, they were still in the early stages of development.

This scenario has changed quite a bit in the past month. At the time of this post, there are three major open source CMS applications: Apostrophe, Diem and Sympal. We expect a fair number of these apps to be installed on our platform so we decided to dig in and test them out. As with any application, no CMS can fit everybody’s needs and workflow, so we don’t think there is one CMS that will rule them all. The idea is not to find the best CMS, but to highlight the strengths and weakness of each option and comment on any places where we see room for improvement. Of course, these projects are relatively new, so I am sure there will be plenty of room for improvement and with time and contributions from developers and designers things will get better. We encourage anyone with an interest in any of these projects to join in the discussion and leave comments below and ask the current developers if they need contributors (I think I already know the answer to that!). I am also sure there are plenty of other CMS systems developed with symfony that have not been released open source and would be nice if companies can contribute back to the community by releasing them into the public. In case we missed something be sure to let us know.

We will review the applications in alphabetical order and will start with Apostrophe developed by the fine folks at P’unk Avenue.

Apostrophe

Apostrophe's site

Getting started

Apostrophe can be found at http://www.apostrophenow.com/. The website is clean and simple and they provide a full-feature demo and this video to help get the feel for the application.

Apostrophe CMS Screencast (EMAP) from Apostrophe on Vimeo.

Concepts and key features

  • pages: Apostrophe places content in pages. These pages are dynamically created through a nice, clean and concise UI. You can define the template for each page, allowing to have different layouts for your home page, internal and special pages. When you add a page, breadcrumbs, menus and sitemap get updated automatically which can save lots of time and prevent broken links.
  • slots: A page has areas for content called slots. These slots can contain very diverse data. By default several slot types are provided: rich text, slideshow, video, image, RSS feed, PDF, button, plain text and raw HTML. We will go into more details later on.
  • media: Out of the box, you get a media manager which allows you to add images, videos and documents into a library that then can be used to locate and link from your pages and slots.
  • history of changes: when you make a change in a slot, let’s say a rich text, the change gets stored in a history log which can then be accessed for review. You can also revert back to a previous version of the content, which is super-useful. It also works on other slot types, like in the RSS feed it keeps track of the changes in the URL, although it does not show the URL for each revision which would be very handy.
  • Ajax-enabled UI: The admin elements of the system are displayed and loaded only when you need them. In the demo and installed sandbox, which provides a sample site as starting point, the buttons and menus do not obstruct the general flow of the page, and do not distort the view. It will be interesting to see how it works with other type of sites and more custom CSS layouts.
  • search-enabled: Apostrophe uses Zend_Search to index content and provide search functionality out of the box. The index is stored in the filesystem by default.

History of changes

Installation

You have a few different options to install Apostrophe: sandbox, svn checkout and plugin installation.

The installation document is very good, with enough explanation for each required step. We picked to download the sandbox tarball, which includes the symfony project skeleton, all the plugins and dependencies needed and a sample site ready to be used. This is probably the quickest way to get started in your own server. It literally took about 5 minutes to download the file, uncompress it, create the needed configuration files (sample files for both config/databases.yml and config/properties.ini are provided), create the database and load the fixtures, and finally run a series of symfony tasks to make sure files can be written by the web server.

I created a virtual host entry in our Apache:

<VirtualHost *:80>
 DocumentRoot /Users/user/Sites/asandbox/web
 ServerName asandbox.local

<Directory /Users/user/Sites/asandbox/web>
AllowOverride All
</Directory>

</VirtualHost>

Notice the AllowOverride directive in the Directory block. This is very important to make sure the .htaccess file included in the web directory gets used by Apache to assure full functionality  of the CMS features.

Then I added the asandbox.local to the /etc/hosts file and restarted Apache.

First impressions

When loading the site for the first time, I got a nice page with some sample content.

Sample site

In the top-right corner there is a Login button. When you click on it a nice login form appears and the default login is admin/demo. Upon logging in, the page refreshes and now you get to see all the admin elements, including a menu on the top of the page which gives you access to configure and add pages, media, reorganize your site structure and manage users and permissions.

Editing a page allows to set basic things like name, access level, template, editing permissions and page engine (more on this later).

Editing page

The media manager allows you to add images from your computer, videos from Youtube and others using embed code, and PDF documents.

Reorganizing the site structure of the site is done by dragging pages in a tree component which is very cool and simple to use. This in turn, updates the breadcrumbs and menus automatically.

Reorganizing site

When you want to add content to a page, you need to add a slot to the section of the page you want. If you need to add some rich text, you use the analogous slot type and a WYSIWYG (FCKeditor) is shown in place. Upon saving, the editor is hidden and the content displayed. If you need to create a slideshow, you add the slot, then select the images from the media library and done! Displaying news from a remote site is super easy, just add a RSS feed slot, enter the URL and see the articles fill up the page. And of course, you can create your own slots.

Help for everybody

The team behind Apostrophe made sure everybody, from developers, editors to designers have at least some kind of documentation to refer to. So if you are a designer and need to customize the layout or work with templates, make sure to read the Designer’s guide. There are also editor’s and developer’s guides.

Installing Apostrophe on shared hosting

Running symfony applications on shared hosting can sometimes be challenging but installing Apostrophe using Maestro can happen in a matter of minutes! There is no doubt we are kicking some hosting butt here. If you want to run Apostrophe on our shared hosting servers, we recommend that you upload the entire project directory (ie. the sandbox directory) into the symfony_projects folder and use Maestro to setup the web server for you. This is a simple process and helps you avoid having to mess with modrewrite rules and so on. Just make sure you do not override the .htaccess file as Apostrophe already provides one for you.

Installing Apostrophe on VPS servers

VPS servers customers have full access to their environment so there are no special steps required if you want to install Apostrophe in a VPS. Just make sure you follow the instructions provided in the installation manual.

Closing notes

A lot of thought, time and effort has been put in Apostrophe. The first stable version was released just before Symfony Live. The system allows you to have a CMS-enabled site running in matter of minutes, which is something most developers of small sites need. Since it is developed on top of symfony and as a plugin, you can use it along other symfony applications and you can extend its functionality to add custom features, a key part of today’s needs.

We want to congratulate and thank P’unk Avenue for releasing this CMS as an open source project. Make sure to follow their blog for updates and if you want to contribute don’t hesitate to join the google group.