PDA

View Full Version : Can Someone Explain The Model-View-Controller Approach to me


Kraetos
2007-07-20, 20:47
I am trying to get into Code Igniter, I've heard good things. While I think I understand the MVC approach, I am not sure. I read over the wikipedia article and read the documentation, but I feel like someone here probably has a really good analogy for me :p

Also, if anyone else uses Code Igniter, are there any nifty resources and tutorials I should know about? Tips and tricks? Anything?

Thanks!

ast3r3x
2007-07-20, 21:33
I've played with it a bit, my friend is making his whole site in it, I think it's pretty neat. Can't see coding something in that instead of doing it myself though, but seems like a quick way to get something complex up and running.

I also believe Apple (http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/chapter02/chapter_2_section_3.html) does a good job of explaining it.

I basically think of it like this, and hopefully I'm right :p

View = What the user sees
Model = Data Source

Controller = Exactly that, the brains of the operation, that takes data from the model and modifies the view accordingly. Of course it could also take data from the view, input it to the model, and of course change the view if it is necessary from the new model information.