ssm novice understanding 1

ssm is mainly composed of three frameworks and Spring, SpringMVC, mybatis framework

Spring framework

: Core Spring is the IoC (Inversion of Control, IoC for short) and aspect-oriented (Aspect Oriented Programming, referred to as AOP), followed explain IoC and AOP is and what its uses.

Inversion of Control (IoC) : IoC is the right to create and destroy (lifecycle) control objects to the IoC container for management . Generally speaking, when we need to use another object, we must new this object, so that the coupling between creating objects and managing objects will be higher. And IoC is a factory that specializes in creating objects . The objects you create depend on the IoC container , which reduces the coupling between objects and achieves high cohesion and low coupling.

Aspect Oriented Programming (AOP) ? * AOP (Aspect Oriented Programming) ** when OOP (Object Oriented Programming) complement rather than replace, the use of AOP is to separate the non-functional requirements from the functional requirements , to avoid the business logic System-related logic is mixed into the system, such as log code, which is often distributed horizontally in all object levels, and has nothing to do with the core functions of the objects it distributes. The same is true for other types of code, such as security, exception handling, and transparent persistence. Such scattered throughout the independent code is referred to as transverse (cross-cutting) codes , in OOP design, which led to duplicate a lot of code , to the detriment of reusable modules.
The AOP technology uses a technology called cross-cutting to dissect the inside of the encapsulated object, and encapsulate the common behaviors that affect multiple classes into a reusable module, and name it "Aspect" , that is, the aspect. Facilitate to reduce code duplication.
The use of cross-cutting technology, AOP the software is divided into two parts: core concerns and crosscutting concerns . The business mainly deals with cross-cutting concerns, and the one that has little to do with it is cross-cutting concerns, for example, permission authentication log transaction processing. The role of AOP is to separate the various concerns in the system and separate the core concerns from the cross-cutting concerns.

Guess you like

Origin blog.csdn.net/hzl529/article/details/100634285