Itay Grudev
Itay Grudev

Reputation: 7424

Web Application Architecture Approach CodeIgniter

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?

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?

Upvotes: 0

Views: 790

Answers (1)

P.T.
P.T.

Reputation: 3240

You could check http://www.getsparks.org for some add-ons.

I believe this is what you need for your custom styles: http://getsparks.org/packages/template/versions/HEAD/show

It can handle multiple themes according to the description. Furthermore this library is very handy. (I am using it, just didn't use the theme part yet).

Furthermore, for modules maybe this is what you need? https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/wiki/Home

Upvotes: 1

Related Questions