Welcome Guest, Not a member yet? Register   Sign In
How to create sidebar widgets/modules i.e. embedding the contents of another controller in a view
#4

[eluser]lexusgs430[/eluser]
It sounds like what you want is modularity, check this library out.

http://codeigniter.com/wiki/Modular_Extensions_-_HMVC/

And that is one hell of a controller, from what Ive come to understand about MVC (ive only been really figuring it out for past 2 months so correct me if im wrong smart ppl), you almost always want to try and use skinny controller, fat model/view design.

Think of the controller as the guy with the glowing sticks, pointing to the pilot of the plane to guide him. The traffic control tower is the model, plane/pilot are the view. Glowing stick guy has a very important job, without him, the plane will not line up on the runway in the exact right direction, and everyone on board could die. But, if the glowy stick guy were given additional instructions from either the plane or the control tower beyond "hold these glowy sticks and guide the plane for takeoff", he probably wouldnt know what the hell they were talking about, because they would be using fancy flying terms that he doesen't understand. I think the same is the concept of MVC, and ive noticed the smaller my controllers are, and the less touching the data they do directly, the more reusable and efficient, and understandable things become.


Messages In This Thread
How to create sidebar widgets/modules i.e. embedding the contents of another controller in a view - by El Forum - 07-22-2010, 12:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB