PlayJava SSM framework Introduction

SSM framework

  SSM is an abbreviation Spring + Spring MVC + MyBatis, and is after a more mainstream following the SSH JavaEE framework for building enterprise-class applications.

Spring

  Spring is an open source, the rise in 2003, lightweight Java development framework by Rod Johnson in his book Expert One-On-One J2EE Development and Design section is derived from concepts and prototypes set forth, in order to solve the complexity of enterprise application development created. Spring uses basic JavaBean to complete a variety of things, with simplicity, testability and loose coupling characteristics, its use is not limited to the development of server-side, any Java application can benefit from the Spring. Briefly, Spring is a lightweight inversion of control (IoC) and the facing section (AOP) of the container frame.

IoC

  Inversion of Control, i.e. Inversion of Control, using the factory model objects to a container management, just arranged in a respective spring bean configuration file, and then set the properties thereof, so that spring containers generating instance object and managed objects. In the spring when the container starts, will spring bean configuration files are configured to initialize, and then when you need to call the initialization has been good these bean assigned to the bean class call because the call setter methods bean object to inject, so you do not need to go to the use of new instances of the bean. Spring most identify dependency inversion of control injection (DI) mode. Dependency injection, i.e. Dependency Injection, control a specific inverted when writing a complex Java program, this program should be class independent of other Java classes to increase reusability of classes as possible; when performed when the test unit, so that they can be tested independently of the other classes. Dependency injection helps these classes are bonded together, and keep them at the same time independently. Dependent, i.e. the association between the two classes, Class A Class B depends on; injection, i.e. Class A to Class B injected by IoC. Dependency injection can be by way of passing parameters to the constructor, or use the setter method. Dependency injection can be said is the core concept of the Spring framework.

AOP

  Aspect-oriented, that is Aspect Oriented Programming, Spring's features and OOP as a programming idea, OOP is added and improved. OOP defines the relationship from top to bottom, but not well-defined relationship from left to right, such as logging, logging code spread horizontally in all object hierarchy, but not affect the objects spread of the core functions . If you use OOP thinking to design, it will lead to duplicate a lot of code, which is not conducive to reuse each module. The AOP use, that is, the cross traffic program logic (such as logging, transactions, security, authentication, data cache, etc.), packaged in a section, and then injected into a target object (particularly service logic) to go, without changing the existing code the new extended function realization basis. AOP particular implementation are generally divided into two kinds: one dynamic agent technology, the use of the embodiment intercepted message, the message decorated, instead of performing the original object behavior; second static weaving manner, introducing a specific syntax to create "cut", so that the compiler can be woven into the code relating to "cut" during compilation. AOP is implemented using a common pre-notification, the notification rear, return notification, abnormality notification and the like.

Spring MVC

  Spring Spring Framework MVC belonging to family, based on the MVC architecture is a framework to simplify the development of web applications, native support for Spring features, allowing developers to become very simple specification. Spring MVC framework by implementing a model (the Model) - to good data, business and presentation separated Controller (Controller) mode - View (View). Spring MVC is designed around DispatcherServlet unfolded, each request is accessed first DispatcherServlet, DispatcherServlet each responsible for forwarding the request to the appropriate Request Handler, Handler returned the appropriate model and view later processing, and model views are returned you can not specify that you can return only Model View or only return or not to return.

MyBatis

  MyBatis is an open source project by the apache iBatis evolved in 2010 iBatis migration project by the apache software foundation to google code, renamed MyBatis, 2013 Nian 11 months and move to Github. MyBatis is an excellent persistence framework that supports custom SQL, stored procedures and advanced mappings. MyBatis avoids almost all JDBC code and manual setting parameters and obtaining the result set. MyBatis can use simple XML configuration and mapping annotations or native types, interfaces and Java POJO (Plain Old Java Objects, plain old Java object) is recorded in the database. Briefly, MyBatis is a framework for managing the data CRUD (CRUD) to.

Guess you like

Origin www.cnblogs.com/JavaDemo01/p/12076380.html