zoukankan      html  css  js  c++  java
  • (MVC) 基本概念和架构

    ASP.NET MVC Architecture (tutorialsteacher.com)

    Model: Model represents the shape of the data. A class in C# is used to describe a model. Model objects store data retrieved from the database.

    Model represents the data.

    View: View in MVC is a user interface. View display model data to the user and also enables them to modify them. View in ASP.NET MVC is HTML, CSS, and some special syntax (Razor syntax) that makes it easy to communicate with the model and the controller.

    View is the User Interface.

    Controller: The controller handles the user request. Typically, the user uses the view and raises an HTTP request, which will be handled by the controller. The controller processes the request and returns the appropriate view as a response.

    Controller is the request handler.

    The following figure illustrates the interaction between Model, View, and Controller.

    MVC Architecture

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

    Request Flow in MVC Architecture

    As per the above figure, when a user enters a URL in the browser, it goes to the webserver and routed to a controller. A controller executes related view and models for that request and create the response and sends it back to the browser.

  • 相关阅读:
    Web前端笔记和简历模板
    三种 Loading 制作方案
    注册中心之健康检测机制
    HTTPS与加密
    多线程-JUC
    date日期类型
    spring配置文件约束
    Tomcat web.xml 中的listener、 filter、servlet 加载顺序
    java 日志框架总结
    mysql常用命令
  • 原文地址:https://www.cnblogs.com/fdyang/p/14434426.html
Copyright © 2011-2022 走看看