Welcome Guest, Not a member yet? Register   Sign In
How do I choose controllers? and how do I use more than two controllers on a web page?
#2

[eluser]CroNiX[/eluser]
Think of a controller as a subject. Anything having to do with that specific subject gets handled by that controller.

For instance, a blog controller would handle everything to do with the blog. A user controller would handle creating/editing/deleting/etc users, but it wouldn't have anything to do with the blog, except for user permissions, etc.

Typically, if you "need" to use more than one controller at a time, then it isn't really a controller and should be put into a library, where it can be accessed via many controllers. Occasionally, you do need something from another controller and yes, you can do that with ajax. Like I have a user library, which gets used by just about all controllers. Additionally, there is a user controller, which just access the user library.


Messages In This Thread
How do I choose controllers? and how do I use more than two controllers on a web page? - by El Forum - 01-21-2012, 01:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB