Ten popular Java framework

There are ten common framework in Java:

springMVC,spring,mybatis,Dubbo,Maven,RabbiMQ,Log4j,Ehcache,Refis,Shiro

 

A: ring MVC: Java implementation is based on the type of request-driven web MVC design pattern lightweight framework WEB

model (model) encapsulates the data and applications they will generally composed POJO

view (view) is responsible for the program and its data output by the model-generated HTML,

Controller (Controller) responsible for handling a user request and establish an appropriate model, and passes it to view rendering

The spring web model - View - Controller (MVC) is the frame around all HTTP requests and responses DispatcherServlet design.

Specific steps:

---- 1. The client sends a request "to the front controller, front controller according to the information (e.g., URL) request to determine that a selected page, and the request controller for processing entrusted to it

2. The page controller after receiving the request, the processing function, you first need to collect a binding request parameters to the object that called the command object in springwebMVC, and verified, then the command object to the commission processing business objects, process after completion of a return ModelAndView (logical view of data and model name)

3, the front end of the controller back control, then according to the logical view names returned, select the appropriate view is rendered and the data into a model view will be rendered

4. The front-end controller again to regain control, the response returned to the user

Two: spring

1.IOC container: a container having a functional dependency injection, instantiates, positioning configuration application objects and the dependencies between those objects

In the spring is the actual representation of BeanFactory IOC containers

2.AOP: is to be independent of the business, but as a logical business model or liability jointly called encapsulated in order to reduce duplication of code system, to reduce the coupling between modules, and facilitate future maneuverability and serviceability on behalf of AOP is the relationship between horizontal

AOP crosscutting concerns for packaging, can be used in the following scenarios:

Authentication Permissions Caching content delivery cache Context passing Error handling Error handling lazyloading lazy loading Debuging debugging loggging, tracing, profiling and monitoring records to track Picture Performance optimization performance optimization Perskstence persistent Resource pooling resources pool Synchronization Synchronization Services Transactions

Three: mybatis: persistence framework is to support outstanding ordinary SQL queries, stored procedures and advanced mappings. Virtually eliminates all manual settings jdbc retrieval code and parameters and the result set. mybatis xml or annotation using a simple and original mapping is used to configure the interfaces and Java POJOs (Plain Old JavaObject, normal Java objects) in the database records

The overall process:

1. load the configuration and initialization trigger conditions: loading a configuration file to load SQL configuration information to become one MAppedStatement objects (including incoming parameter mapping configuration, execute SQL statements, the results of the mapping configuration), stored in memory

2. receives a call request triggers: the API calls provided mybatis incoming parameters: an ID for the SQL objects and incoming process parameters: a request to a lower layer of the processing request is processed

3. The processing operation request trigger conditions: the API request is transmitted over the interface layer: Incoming parameter: the ID of the SQL parameters and incoming objects

Process:

a. Searching for a corresponding object based on the SQL ID MappedStatement

b. The passed parameter object parsing MappedSttement objects, and execute SQL to get the final pass parameters to be executed

c. Database connection, according to the final execution of SQL statements and get the parameters passed to the database to perform and get the results

d. Conversion processing execution result based on a result obtained MAppedStatement object mapping configuration, and final processing results obtained

e. Release connection resources

Four .Dubbo

It is a distributed service framework, providing high performance and transparency of the RPC (remote procedure call protocol) remote service invocation scheme. SOA governance programs and services

4. The processing result is returned and the final processing result returned

Five, Maven

The Maven project management and build automation tool, more and more developers use it to manage the project in a jar. But for us programmers, we are most concerned about is its project to build functionality.

 

Guess you like

Origin www.cnblogs.com/1255-tbx/p/11688083.html