Friday, 2 March 2012

What is MVC3 in Asp .Net And How To Create MVC3 Application

What is MVC?

The  MVC  is a web application framework that implements the model-view-controller (MVC) pattern.

           Use of the Model/View/Controller (MVC) pattern results in applications that separate the
different aspects of the application (input logic, business logic, and UI logic), while providing
a loose coupling between these elements.




    
 MODEL:
                 The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state
(usually from the controller). In event-driven systems, the model notifies observers (usually views)
when the information changes so that they can react.

VIEW:

         The view renders the model into a form suitable for interaction, typically a user interface element. Multiple views can exist for a single model for different purposes. A view port typically has a
one to one correspondence with a display surface and knows how to render to it.

CONTROLLER:

     The controller receives user input and initiates a response by making calls on model objects. A
controller accepts input from the user and instructs the model and a view port to perform actions
based on that input.

ADVANTAGES :

      1. One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application.  Maintaining a clean     separation of concerns makes the testing of applications much easier, since the contract    between different application components are more clearly defined and articulated.
       
      2. MVC permitting independent development, testing and maintenance of each.

      3. Better Separation of Concerns

      4. Testability

      5. Model Binder is excellent !
     
      6. No Viewstate anymore

      7. SEO friendly url’s (automatic)
     
      8. Complete control over Html output and HTML based

      9. Easier integration with Javascript / Jquery

      10. Building an Internet site where HTML,performance, and scalability are paramount ASP.NET MVC3 may be better suited

                                      
                                              

HOW TO Install MVC3 :


While you start MVC3 Application you Must Install   " VS 2010 With Sp1 " by using this Following link You can Directly install the MVC3.
                    
            http://www.asp.net/mvc  It consisting of MVC3 And  MVC3 Tools Updated

How To Create Controller in MVC3 Application :
 

         1.  Open Visual Studio 2010--->File--> New --> Project--->select MVC3       APPLICATION  Like Below :
     2. You will Get like these Folders: Empty Controller Folder And View And Model Folders.

   3.creating The Controller  :
            Right Click On the Controller Folder ---> select Add Controller option


 4. In this Home Controller Page Write the Code and  What Ever Return types we want :


                                      
                                                 

No comments:

Post a Comment