What is SSM? Maybe this article here can help you!

Overview of the SSM framework

  • The SSM framework is the first framework encountered by many JAVA learning or full-stack programmers. For SSM its essence is Spring + Spring MVC + MyBatis. For SSM status, it is also the mainstream Java EE enterprise framework in the market after SSH, which is suitable for building various large-scale enterprise application systems. So learning about SSM is something programmers need to master, and today Damon tells us what SSM is all about.

Parsing the Spring

  • As for SPring, it is an open source framework. SPring is a lightweight Java development framework that was created in 2003 to solve the complexity of enterprise application development.
  • And use basic Javabeans for Spring to do things that were previously only possible with EJBs. However, Spring’s use is not limited to server-side development.
  • Any Java application can benefit from Spring in terms of simplicity, testability, and loose coupling. In simple terms, Spring is a lightweight Inversion of Control (IoC) and AOP oriented container framework.
So what is inversion of control?
  • IOC: Inversion of control is also called dependency injection. Using the factory pattern to hand objects over to the container for management, you simply configure the corresponding beans and set the related properties in the Spring configuration file, and let the Spring container generate instance objects and managed objects of the class.
  • When the Spring container starts, spring initializes all the beans you configured in the configuration file, and when you need to call them, it assigns those beans to the class that you need to call them (assuming the class name is A). The allocation method is to call the setter method of A to inject, without requiring you to new the bean in A.
What about AOP?
  • First of all, it should be noted that AOP is just a feature of Spring. Like OOP,AOP is a programming idea, not a technology. AOP can be said to complement and perfect OOP. OOP introduces concepts such as encapsulation, inheritance, and polymorphism to build an object hierarchy that simulates a collection of common behaviors.
  • OOP is helpless when we need to introduce common behavior to discrete objects. That is, OOP allows you to define top-to-bottom relationships, but not left-to-right relationships. For example, the logging function. Logging code tends to be spread horizontally across all object hierarchies, regardless of the core functionality of the object to which it is spread.
  • In OOP design, it leads to a lot of code duplication, which is not conducive to reuse of modules. Encapsulate the cross-cutting business logic (such as security, logging, transaction, etc.) in an application into a facet that is then injected into the target object (concrete business logic).
The technologies for implementing AOP fall into two main categories:
  • First, dynamic proxy technology is used to decorate the message by intercepting the message to replace the execution of the original object behavior.
  • The other is static weaving, which introduces special syntax to create “aspects” so that the compiler can weave code about “aspects” at compile time.
For example, if you want to add a function that prints’ hello AOP ‘to all classes in your Biz layer, you can do this using AOP thinking. You write a class and write a method. The method implementation prints’ hello AOP’ and then you Ioc the class ref = ‘biz.

What is Spring MVC

  • In fact, Spring MVC is a follow-up product of Spring Framework, which has been integrated into Spring Web Flow. It supports Spring features natively, making development very simple and standardized. Spring MVC separates the roles of controller, model object, dispatcher, and handler object, which makes them easier to customize.

And finally, MyBati

  • In fact, MyBatis was originally an open source project of Apache iBatis, which was later migrated to Google Code and renamed MyBatis for various reasons. MyBatis is a Java-based persistence layer framework.
  • MyBatis eliminates almost all manual setting of JDBC code and parameters as well as retrieval of result sets.
  • MyBatis uses simple XML or annotations for configuration and raw mapping to map interfaces and Java’s POJOs (Plain Old Java Objects) to records in the database. MyBatis is a framework used to help you manage data add, delete, change and check.

Conclusion:

As a freshman programmer, Damon wants to evolve along with everyone else. Article or description of the lack of place, I hope you put forward more, progress together.

Damon will continue to find useful advice, knowledge and new tools to share with you. Thank you.

If you are interested in github, you can download the following articles:Github.com/xxxyyh/Fron…