Getting Started with MVC

Introduction to MVC

This is the brief  theoretical  explanation about MVC  for  those who starts from the scratch.  
MVC - Development design pattern which divides programming culture into three areas like Core logic(Model), UI structure (View) and  handling user interaction and operation (controller).

For the first time in 2009 April first version of MVC is released under the Microsoft Public License (MS-PL). In 2012 next version(MVC 2.0) is released under Open source license (Apache license 2.0). Visual Studio 2010 integrated with MVC2.0 by default same can upgraded to MVC4.0. where as Visual studio 2013 inbuilt with MVC 4.0 version.

Major advantage of mvc application is lies in  managing the huge application.  As it provides clear cut separation between model,view and controller one can focus on one aspect at a time,without depending on another.
Enables the Team development simple by a multiple developer can work on different sector in parallel. Different developer can work on the view,controller and business logic independently.
Which also provides the inbuilt testing framework. helps to create Test Driven Development (TDD).

Lets  quickly go through the sequence how the mvc works, will discuss more deeply about the same in the next articles.
The first controller will be invoked on the user request and it is parsed, Based on URL structure appropriate controller will be invoked.
Controller instantiates the model and then pass the model to the view so that view can use them to generate the markup.

Basic MVC Data Flow

MVC Basic Data Flow

There are several methods available to create MVC application,most widely used methods are,
>Code first entity frame work : Code first approach is useful in Domain Driven Design, where we will create classes as per our domain requirements. After application run code first API’s creates database or maps to the existing database on the fly. 
>Database first entity framework :  In which we will create database first then we want create controller and view.
>NHibernate : Object relational mapper(ORM) ,Provides the mapping from .Net class to database tables and from CLR datatypes to SQL data types.
>Raw :  Set of classes that are used for connecting the database,providing access to relational data,XML etc. As it is used in the traditional .Net.
In the next Getting started with MVC” series explained in step by step to start programming in MVC application.

Protected by Copyscape Plagiarism Detector

1 comment: