Summary in learning some knowledge I have to understand:
One. Spring components:
The Core package is the most basic part of the framework and provides the dependency incjection feature to allow you to manage the Bean container. The foundation concept here is BeanFactory, which provides Factory mode to eliminate the needs of programmatic single example and allow you to separate the configuration and description of dependencies from program logic.
Construction of the Context package on the Beans package, providing a frame-type Bean access method, some like JNDI registration. The Context package is available from the Beans package and adds the sending of text messages. By transparent creation, such as resource strings, event propagation, resource loading, and Context transparency, such as through servlet containers.
The DAO package provides an abstract layer of JDBC that eliminates the lengthy JDBC encoding and parses the database vendor's unique error code. The package also provides a way to implement programming and declarative transaction management, not just a class that implements a specific interface, but also for all POJOs.
The ORM package is a popular relationship - object mapping API provides an integrated layer, including JDO, Hibernate, and Ibatis. With ORM packages, you can use these objects / relationship mappings, such as simple declarative transaction management, as mentioned earlier than all Spring.
Spring's AOP package provides aspective-oriented aspects of aspects of AOP alliance, allowing you to define, such as method interceptors and cut points to cleanly enable code decoupling from logically. With source-level metadata features, you can merge various behavior information into your code, a bit like .NET's Attribute.
Spring's web pack provides basic web-oriented comprehensive features, such as Multipart feature, initializing the Context of the Servlet listener and the web-oriented Applicatin Context. When Spring is used with WebWork or Struts, this package can be combined with other frameworks.
Spring's Web MVC package provides Model-View-Controller implementation for web applications. Spring's MVC implementation is not just an implementation, it provides a Domain Model code and a clear separation of Web Form, which allows you to use all other features of the Spring framework such as check.
two. Control reverse (IOC) / dependent injection (DI)
What is IOC? What is DI? What is the difference between the traditional way? Simply put the IOC is the relationship between the container to control the program (component). Control is converted from traditional program code control to hand over to the container, and the control is different, which is reversed. Di is another statement of this concept, this alias is the theory of Master Martin Fowler's article "Inversion of Control Containers and The Dependency Injection Pattern".
three. Component package and management
First understand the foundation of Spring: Bean Wrapper, Bean Factory, ApplicationContext, Web Context. (1) Bean Wrapper: It is a single component management container implemented by the Reflection. Create an instance of maintaining beans. (2) Bean factory, multi-component management container, instantiated, configured, and managing a wide range of beans ..... (3) ApplicationContext: Bean Factory extension, extension provides international support, resource access (ApplicationContext. GerResource, listening to communication, etc. (4) Web Context: Provides configurable ApplicationContext load for web.xml, and the container provides ContextLoaderListener and ContextLoaderServlet, the function is just a Listener one is a servlet, which is selected for the actual situation. This article uses a large number of network resources. By organizing some experiences in studying at the time, I hope to help learn Spring friends, this article is suitable for beginners.