MVC

  • Home
  • HTML
    • Overview
    • Formatting
  • Java Script
    • Overview
    • Validation
  • CSS
    • Overview
  • Sql
    • Overview
    • SQL Select
    • SQL Command
    • Advance Query
    • SQL Create
    • Function
    • Function vs StoreProcedure
    • Stored Procedures
  • MVC
    • OverView
    • Evolution of MVC
    • Install VisualStudio-2015
    • Create First Application
  • LINQ
    • Introduction
  • Privacy Policy

Thursday, 2 March 2017

MVC OverView

  Unknown       09:25       OverView       No comments    

 Introduction

The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications. The ASP.NET MVC framework is a lightweight, highly estable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly.


Model:   
                 Model represents shape of the data and business logic.It maintains the data of The application. Model objects retrieve and store model state in a database.
                                   Note -     Model is a data and business logic.
View:  
              View is a user interface. View display data using model to the user and also enables them to   modify  the data.
                                   Note -  View is a User Interface.

Controller:
                       Controller handles the user request. Typically, user interact with View, which in-tern raises appropriate URL request, this request will be handled by a controller. The controller renders the appropriate view with the model data as a response.

                                 Note -   Controller is a request handler.

MVC Architecture
The following figure illustrates the flow of the user's request in ASP.NET MVC  See Above-.


               Request/Response in MVC Architecture             

As per the above figure, when the user enters a URL in the browser, it goes to the server and calls appropriate controller. Then, the Controller uses the appropriate View and Model and creates the
the response and sends it back to the user.

 Why do we use MVC?

Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (view) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller.

Model:
    The domain-specific representation of the information that the application operates. Domain logic adds meaning to raw data (e.g., calculating whether today is the user's birthday, or the totals, taxes, and shipping charges for shopping cart items).
    Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the Model.

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.

Controller:
    Processes and responds to events, typically user actions, and may invoke changes on the model.




 MAIN ADVANTAGE OF USING MVC

1.  Faster development process.
2.  Easier to manage complexity (divide and conquer).
3.  It does not use server forms and view state.
4.  Front Controller pattern (rich routing).
5.  Better support for test-driven development.
6.  Ideal for distributed and large teams .
7.  High degree of control over the application behavior.
8.  Enables the full control over the rendered HTML.
9.  Provides clean separation of concerns(SoC). 
10.  Enables Test Driven Development (TDD).
11.  Easy integration with JavaScript frameworks.
12.  Following the design of stateless nature of the web.
13.  RESTful urls that enables SEO.
14.  No ViewState and PostBack events. 



ASP .NET MVC Features
  • Separation of application tasks 
  •   –Input logic, business logic, UI logic Support for test-driven development –
  • Unit testing 
  •   –No need to start app server 
  • Extensible and pluggable framework
  •  –Components easily replaceable or customized(view engine, URL routing, data serialization,…)

MVC Framework-Architecture

  • MVC -Architecture

  • In This Architecture Use hit MVC Application then hit iis server server intract firstly controller.  Controller is main  because it is interact with model and view both and  use database in model class.


  • In this Artical Give short deascription about MVC.
  • The Model-View-Controller (MVC) is an architectural pattern that separates an application into three main logical
  •  components: the model, the view, and the controller. Each of these components are built to handle specific
  •  development aspects of an application. MVC is one of the most frequently used industry-standard web development
  •  framework to create scalable and extensible projects.
  • If you use MVC then This is make light and fast speed to your application and more easy to learn

  • MVC Flow
  • In Mvc  Flow Describe that Basically Browser  Send Request to controller Then.
  • Controller Intract with Model and View and get result Whatever action and code execute .
  • After that controller get response and hit with browser and User see Out Put
  • MVC application takes place when certain request comes from the client. The diagram below shows the flow:


    Flow Steps


  • 1.  The client browser sends request to the MVC Application.
  • 2.  Global.ascx receives this request and performs routing based on the URL of 3. incoming request using the RouteTable, RouteData, UrlRoutingModule and MvcRouteHandler objects.
  • 3.  This routing operation calls the appropriate controller and executes it using the IControllerFactory object and MvcHandler object's Execute method.
  • 4.  The Controller processes the data using Model and invokes the appropriate method using ControllerActionInvoker object
  • 5.  The processed Model is then passed to the View which in turn renders the final output.
    • Share This:  
    •  Facebook
    •  Twitter
    •  Google+
    Email This BlogThis! Share to X Share to Facebook
    Newer Post Older Post Home

    0 comments :

    Post a Comment

    learningmvctutorial

    Popular Posts

    • Overview
        SQL (Structured Query Language)   SQL  is a language that interacts with the database on the server-side. This dynamite duo has changed ...
    • Overview of HTML
      What is HTML? First developed by Tim Berners-Lee in 1990 . HTML is used to create electronic documents (called pages) that are displ...
    • Difference Between function v/s store procedure
      Definition  of Store Procedure In a database management system (DBMS), a  stored procedure  is a set of Structured Query Language (SQL...
    • SQL Select
      The SQL SELECT Statement The SELECT statement is used to select data from a database. SQL SELECT Syntax SELECT column_name , column_n...
    • What is LINQ
      LINQ  (Language Integrated Query) is a Microsoft programming model and methodology that essentially adds formal query capabilities into Mic...
    • What is Function in Sql Server
      A function is a block of code that has a name and it has a property that it is reusable. We use function in store Procedure and queries in...
    • Create Duplicate Table of existing table in SQL Server
      In This Tutorial we create table and want to same structure and same data then We create new table with data type after that  insert in ta...
    • About Javascript
      What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting langua...
    • Operator in JavaScript
      What is an operator? JavaScript has both binary and unary operators, and one special ternary operator, the conditional operator. A binar...
    • Open Application in MVC
      We want to create application in MVC first of how we create first application Show Steps   as below-     STEP 1 .  Start Computer and  I...

    Blog Archive

    • ▼  2017 ( 35 )
      • ►  November ( 1 )
      • ►  October ( 2 )
      • ►  September ( 4 )
      • ►  August ( 1 )
      • ►  July ( 1 )
      • ►  May ( 3 )
      • ►  April ( 7 )
      • ▼  March ( 13 )
        • What Is Store Procedure
        • Create First Application in MVC
        • How To Install Visual Stdio Step by Step Process
        • Overview of CSS
        • Overview of HTML
        • What is LINQ
        • Overview
        • Difference Between function v/s store procedure
        • What is Function in Sql Server
        • How To Create DataBase & Table in SQL Server
        • SQL Select
        • Open Application in MVC
        • MVC OverView
      • ►  February ( 3 )
    Powered by Blogger.

    Categories

    • AdvanceQuery
    • CreateApplication
    • CreateDb
    • CssOverview
    • Evolution
    • Formatting
    • Function
    • FunctionVSSp
    • HtmlOverview
    • InstallVisualStudio
    • Introduction
    • javascriptOverview
    • JsValidation
    • Mvc-vs-Asp.Net
    • OverView
    • Select
    • SqlCommand
    • SQLOverview
    • StoredProcedures

    Text Widget

    Sample Text

    Pages

    • Home

    Copyright © MVC | Powered by Blogger
    Design by Vibha Acharya