Welcome Guest, Not a member yet? Register   Sign In
What goes where? (MVC)
#2

[eluser]TheFuzzy0ne[/eluser]
This is how I see it:

Model
Models are used almost as if it's a database itself. It's a layer between your application and your data storage medium, be it flat files, a database, XML files etc... Your models facilitate your application's handling of stored data.

View
Views are used to format your output before displaying it to the user. Views don't have to contain HTML, but often contain simple PHP logic such as IF statements and loops.

Controller
Controllers are the API for your user. It's the only point that a user can access your application, and serves as the glue between views, models, libraries helpers etc... A controller is analogous to how telephone operators used to work when phones were first invented. They connect the calls to where they need to go.

Hope this helps.

EDIT: This thread may interest you: http://ellislab.com/forums/viewthread/107773/


Messages In This Thread
What goes where? (MVC) - by El Forum - 04-09-2009, 11:30 AM
What goes where? (MVC) - by El Forum - 04-09-2009, 11:40 AM
What goes where? (MVC) - by El Forum - 04-09-2009, 12:03 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 12:29 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 01:26 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 01:42 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 01:50 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 01:57 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 02:07 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 02:08 PM
What goes where? (MVC) - by El Forum - 04-09-2009, 03:59 PM
What goes where? (MVC) - by El Forum - 05-22-2009, 10:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB