Jump to content
MakeWebGames

One last question. What is MVC, and what are the benifits of it?


Amanda<3

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...