美文网首页
Application Layers

Application Layers

作者: 星期六1111 | 来源:发表于2017-09-18 09:04 被阅读14次

    description

    today our session is about the Application Layers,At the first is three-tier architecture.

    Questions

    Q1: what's Three-tier architecture?
    A1:


    three-tier architecture.png
    • Presentation Layer: the layer the user interacts with. In turn, it interacts with the other layers, and ultimately sends the results to browser. Controllers should be skinny.

    • Service Layer:contains business logic, controls the application functionality.Services can be fat.

    • Data Access Layer: deals with data persistence, exposes the data, and
      manipulates data into the form required by the API specified by the application.

    • Domain objects: used to transport data across layers, models business objectsand their relationships. Domain objects can be fat.


    Q2: what's the MVC ?
    A2: MVC refers to: Model model, View view, Controller control device.

    • View: provide users with the user interface, and users directly to interact.

    • Model: A module that carries data and computes a user's request. It is divided into two categories, one is called data bearer Bean, a class called business processing Bean. The so-called data bearer Bean refers to the entity class, specifically carrying business data, such as Student, User and so on. While the business process bean refers to the Service or Dao object, specifically for dealing with user requests to submit.

    • Controller: The controller is used to forward the user request to the corresponding Model for processing and to handle the results of the model to provide the corresponding response to the user.


    Q3:What's the difference be between MVC and three-tier architecture?
    A3:
    MVC is very similar to the three-tier architecture, but they are not the same. If the three-tier structure as the background, then the three parts of MVC correspond to what?
    Three layers of the structure of the View layer is simply a direct relationship with the user layer, MVC in the V and C is such a presence, so MVC in the V and C are three layers of the structure of the View layer. At the same time, we know that M (Model) in MVC includes data bearing bean and business processing bean, in which business processing bean is divided into Service or Dao objects, respectively, corresponding to business logic processing and database operations, corresponding, they correspond to the three The Service layer and the Dao layer in the architecture. Therefore, their relationship as shown below:


    MVC and three-tier architecture .png

    Reflaction

    before I don't know the relation between three-tier architecture and MVC.We learn should go to the deep level of learning, find out what it is related to learning, do not stay on the surface.

    Action

    from the next real project to understand the three-tier architecture and MVC...

    相关文章

      网友评论

          本文标题:Application Layers

          本文链接:https://www.haomeiwen.com/subject/suussxtx.html