Mouf + Magento + PSR-7 = Moufgento

Today, I am really thrilled to announce Moufgento: a modern MVC framework for Magento.

Why should I care?

Moufpress is a bridge between Magento and the Splash MVC framework used by Mouf.

Magento comes with a very heavy framework, based on Zend Framework 1. It is definitely very powerful, allowing to overload almost any part of the application. Yet, it is somewhat old and lacks the modern features we have come to love in the current MVC frameworks, like PSR0/4 autoloading, dependency injection, annotations support, few or no XML configuration files... For these reasons, if you find yourself with a need to do a massive custom application inside Magento, you might want to use something else than Magento default framework.

Moufgento is at the same time a module for Magento that adds PSR-7 compatible middleware support AND an integration of Splash, the default MVC framework that comes with Mouf and that is provided as a middleware.

You can plug your own middleware (it must be compatible with Zend/stratigility) if you want.

Moufgento offers the following features:

  • controllers, declared through a nice graphical DI container
  • use of annotations in your controllers (for instance: @URL to declare a new route, @Logged to restrict access to logged users, etc...)
  • support for any kind of views supported in Splash MVC (this includes plain PHP files, Twig templates, etc...)
  • a nice web-based UI to scafold your controllers and views
  • integration of your views inside the Magento theme
  • (very) easy Ajax support
  • integration of Mouf's authentication system into Magento
  • integration of Mouf's web library (JS/CSS) system into Magento

Moufgento has been tested with Magento CE 1.9.

Another interesting feature is that your code is 100% compatible with Splash MVC.

This means that:

  • You can write a controller in Splash MVC and deploy it later in Magento (or the opposite)
  • Since there is also a Wordpress module for Splash (Moufpress), a Drupal module for Splash (Druplash) and a Joomla module for Splash (Moufla), you can actually write a controller in Drupal, Wordpress or Joomla and deploy it in Magento (or the other way around). Yes, you read it correctly, you can develop an application that will run on the 3 major PHP CMSes and on Magento (!)

Haha! I see you're interested. Want to get started? Follow the guide!

Tags :