News Archive
PhpRiot Newsletter
Your Email Address:

More information

Modernizing MidCOM

Note: This article was originally published at Planet PHP on 31 July 2012.
Planet PHP

For those who haven't been following the Midgard-land, there have been some interesting developments recently. The long-term supported Ragnaroek branch of Midgard1 is slowly fading away, and much of the recent activity has focused on making Midgard2 available via the PHPCR standard, and on the new Create.js inline editing tool.

At the same time the installation story of Midgard2 has greatly improved, with for instance Ubuntu 12.04 LTS providing it straight from the distribution's package repositories. And Andreas Flack from Content Control has kept on working on MidCOM in his own fork, slowly bringing it towards the state of modern PHP frameworks.

This post focuses on the new improved state of MidCOM, and how that will bring the Midgard CMS story forward. So if you've been using Midgard and MidCOM, or if you've been curious about them but have never figured out how to exactly try, keep reading.

Why MidCOM?

In 2012 the obvious question might be: why bother with MidCOM at all? Haven't modern PHP frameworks like Zend and Symfony already made it obsolete?

Well, yes and no. MidCOM is a web framework that has been going on for quite a long time. And as such, it has organizations like Nokia and Lufthansa that have big and important websites and applications running on it. And it has a lot of functionality needed for building content-oriented web services.

An old saying in the industry is that it takes ten years to build great software, and with MidCOM this very much holds true. While new technologies have emerged, few of them can match MidCOM when you get to details.

But at the same time, the long development and maintenance time of course imposes its own constraints. Programming practices, and especially the PHP ecosystem have evolved. And so it is imperative that MidCOM joins this new collaborative space where projects like Symfony CMF allow us to share code and ideas.

A better, cleaner MidCOM

Having been launched in 2003, the original MidCOM was starting to show age. There has been a consensus in the Midgard world that several improvements would be needed, but so far the requirement for LTS stability has kept our hands tied.

Midgard MVC was created as the testbed for how a simpler framework would work with MidCOM's concepts. It proved a great framework for building web applications, as seen with the Qaiku microblogging service and the Apps for MeeGo appstore. But for real content management, you'd still want the features that MidCOM provides.

If you want to modernize a big framework like MidCOM, the obvious first place to start is tests. You want enough coverage that when you change something, you can be sure that it won't break something else. Otherwise the refactoring effort would be like dancing tango on a minefield.

Flack's team has built an extensive suite of PHPUnit tests for their MidCOM fork, and recently we made them run in the Travis Continuous Integration service. With Travis we can easily cover not only the environments developers use, but also variants like different PHP versions. So yes, the new MidCOM supports PHP 5.4 without problems.

Support for Midgard2 was added into MidCOM already during my exploratory Ragnaland work back in 2009, but was never finalized then. The renewed MidCOM development efforts have now brought this to the limelight, and now MidCOM runs just as well on both Midgard1 and Midgard2.

The migration to Midgard2 is critical, as the older Midgard generation is starting to show age, and will be EOLd next year. This will allow the Midgard community to focus on a single content re

Truncated by Planet PHP, read more at the original (another 11183 bytes)