I've been searching for a good architecture models for some time. I think that in a good application should have controllers and modules which should be repeatable parts on different pages. For example a shopping cart - if you are working on an online store you would need it on almost every page.
Also another requirement for me is that it should support changing styles (themes|skins) of the website easily - which can be achieved by deciding the style in two parts - views and assets (css, images, javascript). Which means that all the views should be located on one place, not like in Modular Extension.
And finally it's directory structure should look like this:
application/ ├────controllers/ | ├────home.php | └────products.php ├────modules/ | └────shopping-cart.php └────views/ └────style_blue/ ├────home.php ├────products.php └────modules/ └────shopping-cart.php assets/ └────style_blue/ ├────css/ | └────style.css ├────js/ | └────jquery.js └────images/ └────header.png
This is the perfect architecture isn't it?
- It can be extended with new modules and controllers.
- It can have different styles (skins|themes)
- It is pretty simple and in the same time functional
I am a big fan of CodeIgniter and I want to achieve something like that with it. Is there an add-on which could work for me?