Amanda<3 Posted February 25, 2011 Share Posted February 25, 2011 One last question. What is MVC, and what are the benifits of it? Quote Link to comment Share on other sites More sharing options...
Danny696 Posted February 25, 2011 Share Posted February 25, 2011 Quick google found this; http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller#PHP Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted February 25, 2011 Share Posted February 25, 2011 MVC => Model View Controller This is an old idea where you can split GUI (Graphical User Interface) into 3 parts, this applies to normal applications or web applications as well. Now what are the benefits? Basically for a given set of data (Model) you could have one or more business logics (Controller) and for a given set of business logic you can have one or more graphical user interfaces (Views). Think that you have a database loaded in memory, the rules to handle it and a "template" to display it and you have more or less the MVC idea. Now, the first advantage is that you could change the view (look & feel) without changing the code, and you could have a mobile version as well as a standard version with the same code. On top of that you can do "Unit Testing" which is basically automatic testing of the code as you could test the controller and the model without problems where testing the view is normally nearly impossible. MVC is not new and there is multiple implementations of this concept. For .NET / C# there is a MVC library to create web sites. I tested it and it wasn't really offering me many advantage over the standard .NET Web tools, actually it was worse than the standard things. Ruby on Rail is strongly using this concept, and you can use some PHP frameworks like Codeigniter which works like that too. Is it the best solution for GUIs? Not really... as always depends what you do and how do you do it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.