Comparing VirtueMart and Magento

While the Joomla! plus VirtueMart combination is already known to many as a simple and free e-commerce solution, Magento is a newcomer in the game. But the popularity of Magento is rising. What makes this webshop more popular than VirtueMart? Lets see the differences.

Fork, fork, fork

VirtueMart began as a fork of the prehistoric phpShop application, and made it possible to integrate the phpShop webshop into the Mambo CMS by wrapping it into a Mambo component. Since then, VirtueMart has been the primary option to extend Mambo/Joomla! with webshop functionality. When Mambo forked into Mambo vs. Joomla!, a complete rewrite of the Joomla! began, resulting two-and-a-half years later in the birth of Joomla! 1.5.

As Joomla! version 1.5 introduced a whole new set of features, work began to rewrite VirtueMart to implement these new standards. Not only did API calls change, Joomla! 1.5 also introduced a new MVC standard which would ease the use of templates within a component. At the moment of writing, VirtueMart 1.1.2 is out and a lot of work has been done already. The 1.1 is a good step towards readable code.

VM spaghetti code

One complaint many programmers make when they are being asked to modify VirtueMart is that the PHP-code is really messy. It features a weird mix between object-oriented code, procedural code, HTML-code within PHP-functions and all of that mixed up together. The proper term to use is "spaghetti code".

While Joomla! 1.5 took the liberty of starting completely from scratch again, the VirtueMart was edited over and over again, trying to make improvements with old mindsets. It was Eric Raymond - author of the famous "The Cathedral And The Bazar" (if you like open source, and you don't know about it, read it) - who said that a programmer probably should drop all his code when trying to make a major improvement.

It is a lesson that VirtueMart has not learned. Of course it is a hard lesson, because you have to drop your existing code base to start all over again. But looking at the current "major" improvements, it makes me wonder how many major improvements are needed to turn this spaghetti code into lean code.

So who is behind VirtueMart?

While the PHP-code is a problem for developers, users complain on other things: When posting on the forum, often there is only a slow response or even no response. Many times the written documentation is really shallow or non-existing. And of course every so now and then somebody is insulting the VirtueMart team because of that one missing feature.

But one of the most important things to know about VirtueMart is that there is only one man behind the show: His name is Soren. Of course there are many people contributing code and fixes, but fact remains that one person is sole responsible for the whole project. Call it a single point of failure, but this guy has built a complete community around himself!

Add to this that the whole project is open source - so based on voluntary work - and the credits that Soren has earned become more valuable. In the end it is not the beauty of the code that wins the heart of all users, it is the functionality. And through the years, Soren has done a fine job bringing the public what they want: A free webshop.

A bit too much with Magento

So far, I have flamed VirtueMart pretty much. But Magento also deserves some punishment. Magento has far more features than VirtueMart, it has a large support team that fix any existing problems with lightspeed, but as with every software project there is also a down-side.

As a programmer I have to say that the new Joomla! 1.5 code is a beauty, and Soren thrives the same goal with VirtueMart. Magent however is written with a completely different mindset. The architecture of the underlying code is very complex but leans on solid standards. Every bit of code has its own place. The only problem is that the Magento system is complex, that it takes a new programmer a couple of weeks to get used to the system.

Not only is the PHP-code complex, the same counts for the templating system. And that's a major drawback. Designers need knowledge of PHP and XML, and a profound understanding of the Magento templating system before they could create a design for the webshop. Perhaps it is the reason why there are still only a few Magento themes out there.

Magento is not for the cheap

A second drawback is the performance. Magento asks a lot of the underlying hardware. To optimize things a bit the webserver needs the APC (Advanced PHP Cache) module installed. But many shared hosting providers don't have such a configuration. This makes Magento less usable to the cheap people. You need either a Magento-specialized hosting platform or a dedicated server.

Also the complex code has effect on the wallet. If modules or themes can only be written by more educated programmers and webdesigners, it will mean the customer has to pay a bit more as well. Of course the features and nice interfacing makes up for it, but fact remains that VirtueMart will be a safe bet for anyone not willing to invest a good webshop.