Spring (a): Introduction

Source: Internet
Author: User

1. What is Spring?

Struts2

is a web framework (jsp/action/actionform)

Hibernate

is the ORM framework, in the persistence layer

Spring

is a container framework that configures beans and maintains a framework for relationships between beans.

Bean

Is any of the objects in Java: javabean/service/action/data source/dao

IOC (inverse of control) controlled inversion

Objects are not created, but describe how they are created. The code does not directly connect to objects and services, but describes in the configuration file which component requires which service. It provides abstractions for interdependent components, and the acquisition of dependent (low-level module) objects to the third party (System) to control that the dependent objects are not obtained directly through new in the class of the dependent module.

Di (Dependency Injection) Dependency Injection

An IOC implementation that reverses dependencies (the specific implementation of the IOC) is to transfer the creation and binding of dependent objects to the outside of the dependent object class.


2.7 Modules of Spring frame

Each module (or component) that makes up the Spring framework can exist separately or be implemented in conjunction with one or more other modules. The functions of each module are as follows:

  • Core Container : The core container provides the basic functionality of the Spring framework. The main component of the core container is BeanFactory that it is the implementation of the factory pattern. BeanFactoryUse the inversion of Control (IOC) pattern to separate the application's configuration and dependency specifications from the actual application code.

  • Spring Context : The spring context is a configuration file that provides contextual information to the spring framework. The Spring context includes enterprise services such as JNDI, EJB, e-mail, internationalization, checksum scheduling.

  • Spring AOP: With the configuration management feature, the Spring AOP module directly integrates aspect-oriented programming capabilities into the spring framework. Therefore, it is easy to enable any object managed by the Spring framework to support AOP. The spring AOP module provides transaction management services for objects in spring-based applications. By using Spring AOP, you can integrate declarative transaction management into your application without relying on EJB components.

  • Spring DAO: The JDBC DAO abstraction layer provides a meaningful exception hierarchy that can be used to manage exception handling and error messages thrown by different database vendors. The exception hierarchy simplifies error handling and greatly reduces the number of exception codes that need to be written (such as opening and closing connections). Spring DAO's JDBC-oriented exception conforms to the common DAO exception hierarchy.

  • Spring ORM: The Spring Framework inserts several ORM frameworks, providing ORM object-relational tools, including JDO, Hibernate, and IBatis SQL Map. All of these conform to Spring's common transaction and DAO exception hierarchies.

  • Spring Web Module : The Web context module is built on top of the application context module and provides the context for Web-based applications. Therefore, the Spring framework supports integration with Jakarta Struts. The Web module also simplifies the process of working with multipart requests and binding request parameters to domain objects.

  • Spring MVC Framework : The MVC framework is a full-featured MVC implementation of building WEB applications. With the policy interface, the MVC framework becomes highly configurable, and MVC accommodates a large number of view technologies, including JSP, Velocity, Tiles, IText, and POI.








Spring (a): Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.