What is MVC and how to write MVC framework [duplicate]
Possible Duplicates:
MVC approach with C++ What's the best way to learn mvc in PHP?
I have a heard a lot about mvc frameworks. I even tried to look for it on google and wikipedia. But still it is not clear to me. Also, I want to know how can I implement it on my own, as by doing myself would make things more clear instead of using some another existing mvc frameworks.
One more thing is this the concept of web designing or it can be applied to any field of programming.
I would prefer examples in C++ or php (if any) to make it more clear.
MVC stands for Model View Controller, is a "style" of programming, it consists in dividing the classes ( Model ) that will make operations, the template/graphics (View) and the Controller. It helps writing good code because the View and the Model are separate, so you can write reusable code. The Controller makes the Model and the View work together and probably is what you need to rewrite every time. Symfony is a php mvc framework.
It can be applied to any field of programming. The example above is for web, but other langs like Objective-C can be MVC, or anything else can be MVC :)
There are tutorials on the webs that show you how to make really simple ones in PHP, like this one. Maybe it will make things clearer for ya.
精彩评论