Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any PHP Frameworks that use a Layout and Block system like Magento? [closed]

While it is most typically touted as a fully-featured shopping cart system, Magento is an awesome framework to boot. Of particular awesomeness is the layout system. In essence a page is created from "Blocks" which all inherit from an abstract class which does not assume the use of template files. These blocks are assembled according to a layout which is the composition of a bunch of XML files being merged together to describe a hierarchical structure of blocks for each page (inheritance supported for DRY). I love this system but Magento is a very heavy framework.

Are there any other frameworks which use a similar system? I.e. layouts that are defined outside of the template files as described above. PHP 5.3 is preferable but would consider frameworks in other languages.

like image 376
ColinM Avatar asked Jul 03 '10 00:07

ColinM


3 Answers

I would stick with magento if you already managed to get your head around it. Why waste time learning another system? If speed is the problem, spend some time on optimising magento (there is a whitepaper on the subject which is a good place to start) and look into installing apc. It gives my magento installations a hell of a boost.

like image 135
silvo Avatar answered Sep 18 '22 00:09

silvo


Not strictly a framework, But Drupal pretends to be a web-application-framework. You can strip Drupal to its bare bones and develop your own modules on top of it. Using its blocks system and templating engine.

like image 41
berkes Avatar answered Sep 22 '22 00:09

berkes


Yep, Zend Framework can definitely be modified to allow for a Magento-style layout engine, and it doesn't have to be as complex a customisation as Magneto probably makes it.

In fact, I was so compelled to have this myself, and not let it beat me, I decided to start implementing the same form of layout engine myself in my own library I use for Zend.

From this came my first blog post on my new blog, and my first ever post on SO

BTW, thanks for bringing ModMan for Magento to life Colin.

Building a Magento-style Layout Engine for your Zend Framework Library

like image 21
Dane Lowe Avatar answered Sep 19 '22 00:09

Dane Lowe