Thursday, May 29, 2008

MVC Design Patterns

MVC design pattern is well established and spreading through the VS community. A bit like OOP on steriods but requiring the architect to be a lot more diligent in the seperation of files and objects.

MVC stands for Model View Controller and splits your code into three distinct areas:
1. The Model: represents the business logic and data elements of your program2. The View: the interface given the user. 3. The Controller: combines the model and the view to interpret user requests and present them via a view.

Splitting your code into these distinct sections allows you a high degree code re-use in the future. Getting to this point is not as simple as you think to acheive. A software architect often combines code at the various different levels in order to acheive a desired result but with MVC they must remember that there must be a creation of theoretical black boxes that can interact with various other black boxes.

Using MVC can be both beneficial and difficult. We found it not much use for small and medium sized projects but quite handy for large scale projects with multiple developers. Extra files are created to handle code and managing all these can be difficult.

Im simmary this is a good paradigm ready to be used by people in any of the modern development languages. It allows for modularity and code re-use and that can only be a good thing. Just make sure your projects are big enough....

No comments: