Welcome Guest, Not a member yet? Register   Sign In
Application structure question
#3

[eluser]Colin Williams[/eluser]
Look into writing hooks or extending the CI_Controller class (or maybe even Output class instead).

People run into this block ALL THE TIME it seems, and everyone seems to want to start re-inventing or skirting the MVC structure (which could be valid is some cases). I think what happens is that people just cook up a $data array in every controller and pass it on to the view, like in the examples, but this system runs into limitations pretty quickly, as you've recently discovered.

Certain components of your application should be able to hook into the final output regardless of what Controller is instantiated, but each Controller should still have final say about what makes it through. Taking the Matchbox/ModularExtensions/Wick approach means your Views handle this burden. It's up to you whether or not you agree with this behavior. I have a library that facilitates the former behavior, and is even kinda geared to what your talking about: You have one or several main templates that may or may not share certain regions. PM if you're interested. Anybody! I will be releasing it into the community soon, but I want to properly package and document it first.


Messages In This Thread
Application structure question - by El Forum - 07-20-2008, 09:54 PM
Application structure question - by El Forum - 07-20-2008, 10:33 PM
Application structure question - by El Forum - 07-20-2008, 10:58 PM
Application structure question - by El Forum - 07-21-2008, 10:01 PM
Application structure question - by El Forum - 07-22-2008, 10:35 PM
Application structure question - by El Forum - 07-22-2008, 11:39 PM
Application structure question - by El Forum - 07-23-2008, 02:09 AM
Application structure question - by El Forum - 07-23-2008, 02:36 AM
Application structure question - by El Forum - 07-23-2008, 02:48 AM
Application structure question - by El Forum - 07-23-2008, 03:26 AM
Application structure question - by El Forum - 07-23-2008, 03:42 AM
Application structure question - by El Forum - 07-23-2008, 10:45 AM
Application structure question - by El Forum - 07-23-2008, 11:00 AM
Application structure question - by El Forum - 07-23-2008, 11:49 AM
Application structure question - by El Forum - 07-23-2008, 12:08 PM
Application structure question - by El Forum - 07-23-2008, 12:57 PM
Application structure question - by El Forum - 07-23-2008, 01:55 PM
Application structure question - by El Forum - 07-23-2008, 02:59 PM
Application structure question - by El Forum - 07-27-2008, 09:51 PM
Application structure question - by El Forum - 10-01-2008, 02:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB