CodeIgniter Forums
High level question about application structure - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: High level question about application structure (/showthread.php?tid=14375)



High level question about application structure - El Forum - 12-31-2008

[eluser]Unknown[/eluser]
Hi
first off, thanks for a great framework. I've been exploring a few (cake, symfony, wact) over the months to use for private projects and really like it. It's very elegant and small and I just like the code. Plus docs are great, and offline Smile

My question is this:

How generally do you go about structuring 'modules'? imagine a page like the amazon product page. Modules for me might be; header, footer, top nav, left nav, some product info, reviews box, similar products and so on.

What I want to be able to do is develop the modules as reusably as possible and avoid duplicating the controller as much as possible if it varies only slightly for a page type.

For projects at work with in house frameworks, we usually have a container (i.e. page type) that aggregates modules. This allows for good reusability and also makes them nicely ajaxable. Symfony appears to work in a similar way and wact lets you aggregate modules too.

In CR I understand that you can't call other controllers, so am thinking that the way to go would be to make modules within (/ as a combination of) libraries or models. The only reservation I have is that the model layer could get rather busy since database access is from there too. I would have some ideas to separate this out though.

Thanks in advance.


High level question about application structure - El Forum - 12-31-2008

[eluser]Jonathon Hill[/eluser]
Template library might help you.


High level question about application structure - El Forum - 01-06-2009

[eluser]Unknown[/eluser]
Thankyou, however, this is what I had in mind:

http://codeigniter.com/wiki/Wick/