ssm framework Preface

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq_42267300/article/details/89302536

ssm framework Preface

SSM

SSM (Spring + SpringMVC + MyBatis) integrated frame set by the Spring, MyBatis from two open frame (SPRINGMVC is part of Spring). Often used as a data source a simpler frame web project.
(From Baidu Encyclopedia)

  • SPRINGMVC : realized View layer, receiving a request to complete the function of the user.
    SpringMVC the Controller as the controller of the entire application, a request for completion of the respective operation functions.
  • MyBatis : realized Dao layer, to complete the operation of the database function.
  • Spring : Management applications all Bean lifecycle behavior, by Spring to manage.

system framework

The system architecture is the integration of large structural applications. The system architecture is usually mentioned in two ways: three-tier architecture and MVC. Their role was to reduce the coupling system.

Three-tier architecture

Three-tier "three" were the view layer (View), service layer (Service), persistence (Dao).

  • View layer: The main code section for receiving a request submitted by the user.
  • Service layer: The main business logic code for the system.
  • Dao layer: The main direct operation code portion of the database.
    Here Insert Picture Description

MVC

MVC, i.e. model (Model), view (View), the controller (Controller).

  • View : view, to provide users with user interface, to interact directly with the user.
  • The Model : model, bearer data, and submit the user request processing module. We divided into two categories, known as
    a data carrier Bean, a class called service processing Bean. Bean called bearer means the entity data class, specifically user
    bearer service data, such as the Film, User like. The business processing Bean refers to the Service or Dao objects,
    designed for use with the user who submitted the request.
  • The Controller : a controller for forwarding the user request to the appropriate processing Model, and according to the Model
    provides a corresponding processing result in response to the user.

Workflow MVC architecture program is this:
Here Insert Picture Description

Relations with the three-tier architecture MVC

Three-tier system of V (View Level) contains the MVC in V (View) and C (the Controller) , and MVC of M (Model) contains the three-tier system of Service Level and Dao Level .


Guess you like

Origin blog.csdn.net/qq_42267300/article/details/89302536