Design Patterns Bootcamp: Model View * Patterns

Model View * Patterns… What are they?

The main drawback to these patterns is usually the learning curve… this show will hopefully remove that barrier-to-entry. The first on the scene and primary pattern to all each involved is the Model View Controller. This pattern is used throughout many of the modern development platforms. The quickest way to describe MVC in the terms a .NET developer will understand is that you code your pages in such a way that you place the code that would be in your code-behind, into a separate class. This class is called a “controller”. The “model” are your domain objects (business objects or data access objects).

So your controller will tell your domain objects what to do. Once the work is done, then the user interface must be updated. The code in the user interface is known as the “view”. So if you can picture that the code-behind in an ASPX file is no longer where you do any real work and can re-label that code the “view”, and you can picture a new class that would act as a bucket for the code you would have written in your code behind to do the work (call that the “controller”) and imagine the finaly peice of the puzzle as a class that talks to the database, to encapsulates some business logic or does something else completely unlreated to any user interace (and call that the “model”), then you, my friend have just understood the most difficult part of the Model View * patterns.

 

http://polymorphicpodcast.com/shows/mv-patterns/