Recently, I have been doing training in Visual Studio 2010 and within the courses there are two design patterns discussed: Model-View-Controller (MVC) (Patterns and Practices: Model View Controller), and Model-View-ViewModel (MVVM)(THE MODEL-VIEW-VIEWMODEL (MVVM) DESIGN PATTERN). In the past I have done presentations on MVC however I had difficulty in properly explaining what the “Model” portion of it pertained to.
Today it dawned on me what this “Model” is: it is the business model of an application. It represents the entities that the developer has to work within the application. I originally thought that the Model represented the data model since I had been teaching Entity Frameworks. However the data portion is outside of the model. What this means is that the mechanism of retrieving the entities for the Model, and persisting changes in the Model into storage, are not part of the Model itself.
The Model is represented by the entities we are working with which is not a simple concept. Since if you are thinking in terms of data only it would be incorrect. I believe that is the first step in truly understanding the MVC and MVVM patterns, as well as Model-View-Presenter (MVP). It is important since when analysis is performed the context is the overall business/organization issues and entities, not just a database.
If you are interested, we have classes that cover some of these design patterns, specifically, MS10262 on Window Applications (WPF), MS10264 on Developing Web Applications, and MS10265 Data Access Solutions (Entity Frameworks). All of these courses are taught with Visual Studio 2010 (a wonderful upgrade) and both Visual Basic 10.0 (VB2010), and Visual C# 4.0 (VC2010) are used in the classes.
Thanks for clearing my views on MVC.. i will regularly follow all your posts..
ReplyDeleteSynergetics India: provides training on SQL Server 2008 BI, .net 4.0 training in India. Awarded as the Best .NET Training Service Provider by Microsoft. Get latest IT News