Spring Learning--first, basic concepts

Source: Internet
Author: User
Tags aop

http://www.iteye.com/topic/1123081

The above website (iteye) is one of the great Web sites for learning Spring in China.

I. IOC

IOC, a control reversal, implements IOC functionality by the IOC container, and can be configured to work with dependencies, creation, stitching, management, and acquisition between classes and mines, without the user having to create the code for the class themselves, which currently takes an XML file. The simple point is: Before you manually do not write the project, most of the class and most of the coupling relationship is their own design, to write their own code, which has a lot of fixed, cumbersome code, and spring has a tool called the IOC container, It can help us to create a dependency between these classes and classes by parsing the configuration file, and we are responsible for managing these classes to help programmers write complex code that is not related to the business and is repetitive and fixed. Previously this part of the class was created by the programmer itself and is now created and controlled by the IOC, so called inversion of control.

Second, AOP

Aspect-oriented programming is the idea of cross-cutting logic programming. How did it come about? It must have its underlying support, which is that Java introduced a toolkit after java5.0: Java.lang.instrument, which allows a proxy class to be enabled at runtime to modify the class's bytecode at run time, using the proxy class. Is the Java file compiled for the class file, has been explained in the JVM run up, this is through the proxy class can also modify the class file, to change the function of a class, very powerful features it!

Iii. data access and integration

This part of the function is oriented to the DAO layer, the integration of a variety of persistent layer framework, a variety of data access technology is thin-layer encapsulation, hiding the pattern code, so that the DAO layer data form and access technology-independent unification, then exactly how to encapsulate it? First, various access data codes are required for exception checking, which may be different, and spring transforms these check-type exceptions into non-checked exceptions, providing the basis for consolidating various persistence layer frameworks.

Iv. Web and remote operation, remote access, Webocket

Built on the application context module, it provides a variety of tools for Web applications, which is to initialize the spring container by listener or servlet, and register the spring container in the Web container. So the part of Spring about the web is still dependent on servlet technology, which is the core, and the module also provides many Web features: Transparent file upload, Velocity, Freearker, XSLT, and so on, and the MVC Framework for Web development (Spring MVC or the ability to integrate other MVC frameworks).

Speaking of integration, we have to mention an industry's most important concept: standardization, which is a broad-scale implementation of standardization that lays the groundwork for the creation of these tools, whether they be development frameworks or others.

WebSocket provides a high-frequency and low-latency message exchange between the She Duan (browser) and the server in a Web application in a university, two-way communication

The above four points are the main things the spring framework does, it can be understood that the spring development framework of the basic IOC and AOP, which runs through all of spring's modules, and spring's module can be divided into two modules: 1, data access, 2, data transmission. This is also a common Web application to complete the core functions.

Spring Learning--first, basic concepts

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.