Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripped-down Magento as a framework?

I've been working with Magento for a while now and really enjoy developing modules for it. Lately I've been wondering if it's possible/feasible to strip out the ecommerce aspect and use the core components as an application framework, similar to ZF or CakePHP.

For example, inside /app/code/core/, everything except the following would be removed:

  • Mage/Adminhtml
  • Mage/Admin
  • Mage/Core
  • (I might be missing a couple other important pieces)
  • All Varien and Zend code would also remain intact.

You would be able to develop custom web applications while taking advantage of support for:

  • Modules
  • Blocks, layouts, and templates
  • Backend with users, permissions, and configuration
  • Mage static methods to getModel, etc
  • Translations
  • Web services

Is this feasible or even a good idea?

like image 340
Colin O'Dell Avatar asked Feb 03 '12 19:02

Colin O'Dell


2 Answers

Colin Mollenhour has something along these lines already:

https://github.com/colinmollenhour/magento-lite

Thanks to Vinai Kopp for telling me about this during the XDevCamp at the 2011 Magento Innovate Conference! :)

like image 164
seanbreeden Avatar answered Sep 28 '22 10:09

seanbreeden


There have been rumors of this being done. Given that the idea is academically interesting and that the possibility exists, I mention it whenever I teach the Magento U Fundamentals of Magento Development course.

Magento is fundamentally an MVC app framework with eCommerce components. I first heard this idea at Magento's Imagine conference in 2011. Alan Storm mentioned this during the developer track or the developer un-conference. I liked the notion immediately.

In addition to the items you cited, one would need to include Mage_Eav if one were going to require Magento-style EAV entity modeling and attribute management. Mage_Page would also be a strong candidate for inclusion if one were used to that module's handling of various page elements.

like image 31
benmarks Avatar answered Sep 28 '22 09:09

benmarks