Java-based frameworks include: 1. SpringMVC framework; 2. Spring, lightweight Java development application framework; 3. Mybatis, persistence layer framework; 4. Dubbo, distributed service framework; 5. Ehcache, Pure Java in-process caching framework; 6. Apache Shiro, Java security framework.
The Java language can be said to dominate the IT world, and there are many frameworks that support it. This article will introduce the commonly used frameworks in Java.
1. SpringMVC
Spring Web MVC is a Java-based lightweight Web framework that implements the request-driven type of Web MVC design pattern, that is, using The idea of the MVC architectural pattern decouples the responsibilities of the web layer. Request-driven refers to the use of the request-response model. The purpose of the framework is to help us simplify development. Spring Web MVC also simplifies our daily web development.
The model encapsulates the application data and the POJOs they generally form.
The view (View) is responsible for presenting model data and generally the HTML output it generates, which the client's browser can interpret.
The controller (Controller) is responsible for processing the user's request, establishing the appropriate model, and passing it to the view for rendering.
Spring's web Model-View-Controller (MVC) framework is designed around the DispatcherServlet that handles all HTTP requests and responses.
2. Spring
Spring is an open source lightweight Java SE (Java Standard Edition)/Java EE (Java Enterprise Edition) development application framework. Its purpose is designed to simplify enterprise-level application development. An application is composed of a set of cooperating objects. In traditional application development, a complete application is composed of a set of cooperating objects.
The IOC container is a container with dependency injection function. The IOC container is responsible for instantiating, locating, configuring objects in the application and establishing dependencies between these objects. The application does not need to directly new related objects in the code, the application is assembled by the IOC container. In Spring, BeanFactory is the actual representative of the IOC container.
Simply put, it is to encapsulate the logic or responsibilities that have nothing to do with the business but are commonly called by the business modules, so as to reduce the duplication of code in the system, reduce the coupling between modules, and facilitate future development. Operability and maintainability. AOP represents a horizontal relationship
3. Mybatis
MyBatis is an excellent persistence layer framework that supports ordinary SQL queries, stored procedures and advanced mapping. MyBatis eliminates almost all JDBC code and manual setting of parameters and retrieval of result sets. MyBatis uses simple XML or annotations for configuration and original mapping, mapping interfaces and Java POJOs (Plain Old Java Objects, ordinary Java objects) into records in the database.
4. Dubbo
Dubbo is a distributed service framework dedicated to providing high-performance and transparent RPC (Remote Procedure Call Protocol) remote service calling solutions. and SOA service governance solutions. To put it simply, dubbo is a service framework. If there is no need for distribution, there is actually no need to use it. Only when it is distributed, there is a need for a distributed service framework like dubbo, and it is essentially a service call. Dongdong, to put it bluntly, is a distributed framework for remote service invocation.
5. Ehcache
EhCache is a pure Java in-process caching framework, which is fast and capable. It is the default CacheProvider in Hibernate. Ehcache is a widely used open source Java distributed cache. Mainly for general cache, Java EE and lightweight containers. It features memory and disk storage, cache loaders, cache extensions, cache exception handlers, a gzip cache servlet filter, support for REST and SOAP APIs, and more.
6. Shiro
Apache Shiro is a security framework for Java designed to simplify authentication and authorization. Shiro is available in both JavaSE and JavaEE projects. It is mainly used to handle identity authentication, authorization, enterprise session management and encryption, etc.
The above is the detailed content of What are the frameworks of java?. For more information, please follow other related articles on the PHP Chinese website!