In 2021, as a Java back-end developer, what frameworks must be mastered

Preface

I have been doing Java development for more than ten years, and I would like to introduce to you the Java frameworks (including software and middleware) that I have used in the past year or two.

  • Spring: It has been used since the beginning of work; it is a J2EE framework that provides good support for IOC, and also provides a very good package for AOP technology;
  • Spring MVC: It is also a sub-project of Spring, which implements the MVC design pattern with the goal of decoupling;
  • MyBatis and Hibernate: Both are ORM frameworks. Now Hibernate uses less; Spring Data JPA is also used. This can be seen as a more advanced package. SQL statements can be implemented through method naming;

The specific framework used has a lot to do with the scale and size of the project. Let's talk about it from two aspects: a single application architecture and a microservice architecture.

1. Monolithic application architecture

The monolithic application architecture is relatively simple, and five frameworks are commonly used, including the mvc layer and the persistence layer. Since these five frameworks are the basis of web development framework learning, they are relatively simple compared to microservice frameworks, so I will briefly introduce them here.

1. Spring: ioc container and bean management solve the problem of loose coupling between the business logic layer and other layers, and also play a role as a link and bridge.

2. Springmvc: The most common and popular mvc framework is currently used.

3. Struts2: It is also an mvc framework similar to Springmvc. Its predecessor struts1 is basically nobody used. Compared with springmvc, struts2 has many disadvantages, including its own vulnerability door problem, which is slowly declining. Most of the old systems in use are old projects that are maintained.

4. hibernate: a heavyweight object-oriented persistence layer framework. In fact, its function is very powerful. Due to its powerful function, it is more complicated in use and configuration, and many programmers treat it with contempt. Hibernate is still very suitable for small and medium system projects, and the development efficiency is high.

5.mybatis: is a low-level semi-automatic persistence layer framework. Due to its flexibility and easy aql tuning, it is still very popular at present, and many large projects use it.

As you can see, the above is the SSM framework, which is still relatively popular now. The editor here has also compiled a 1187-page study note of Spring Family Bucket and shared it with everyone.

In 2021, as a Java back-end developer, what frameworks must be mastered

 

  • Maven: Both new and old projects are built based on Maven. It is a project management tool with main functions: project construction; dependency management of Jar packages; version management; continuous integration, etc.;
  • JUint: Unit testing tool; also an old friend; there are many testing frameworks, such as Spring Test, JMock, etc.
  • Shiro, Spring Security: a framework for security authentication, used for user identity authentication, permission authorization, encryption, session management, etc.;
  • Cxf or Axis: The old project WebService uses more; historical issues, still need to understand;
  • Quartz: Timing service framework, generally stand-alone applications;
  • Elastic-job: Distributed timing service framework, produced by Dangdang;
  • log4j, logback: various log tools; now there will be some log collection and analysis frameworks, such as ELK;
  • Ehcache: Cache framework, also used for stand-alone projects;
  • Redis: Speaking of caching, Memcached and Redis are now used more; of course Redis is not limited to caching;

In 2021, as a Java back-end developer, what frameworks must be mastered

 

  • Spring Boot: A framework for getting other frameworks, mainly to provide various starters, simplify various configurations, facilitate integration with other frameworks, and developers can quickly get started.
  • Dubbo: A microservice framework, produced by Ali;
  • Spring Cloud: Another set of microservice framework, this one is more, for example: Config (configuration management center), Netflix Eureka (service registration, service discovery), Hystrix (circuit breaker, this official seems to be not recommended for use, and there are New), Feign (declarative service invocation component), Ribbon (client load balancing), Zuul (gateway), Bus (message bus), etc.

Two, microservice architecture

The microservice architecture is more complicated than the monolithic application architecture, especially when the microservice architecture uses a distributed application architecture.

1.springboot:

The microservice basic framework, a brand new framework provided by the Pivotal team, is designed to simplify the initial setup and development process of new Spring applications. The framework uses a specific way to configure, so that developers no longer need to define boilerplate configurations.

In this way, Spring Boot is committed to becoming a leader in the booming field of rapid application development.

Features:

1. Create a standalone Spring application

2. Embedded Tomcat, no need to deploy WAR file

3. Simplify Maven configuration

4. Automatic configuration of Spring

5. Provide production-ready functions such as indicators, health checks and external configuration

6. There is absolutely no code generation and no configuration requirements for XML. One sentence summary: using springboot can efficiently and quickly develop web applications, and you can avoid the complicated xml configuration in the monolithic application development framework.

2.Dubbo:

Dubbo is a distributed service framework dedicated to providing high-performance and transparent RPC remote service invocation solutions and SOA service governance solutions. Simply put, dubbo is a service framework. If there is no distributed requirement, it is actually unnecessary. Only when it is distributed, there is a requirement for a distributed service framework like dubbo, and it is essentially a service call Dongdong, to put it bluntly, it is a distributed framework for remote service invocation (say goodbye to WSdl in the Web Service mode and register on dubbo in the manner of server and consumer)

Its core parts include:

1. Remote communication: Provides abstract encapsulation of a variety of NIO frameworks based on persistent connections, including multiple threading models, serialization, and "request-response" mode of information exchange.

2. Cluster fault tolerance: Provides transparent remote procedure calls based on interface methods, including multi-protocol support, and cluster support such as soft load balancing, failure tolerance, address routing, and dynamic configuration.

3. Automatic discovery: Based on the registry service, the service consumer can dynamically find the service provider, make the address transparent, and enable the service provider to smoothly add or reduce machines.

3. SpringCloud: Use the instructions of official documents:

Spring Cloud provides developers with some common patterns in the rapid construction of distributed systems (such as configuration management, service discovery, circuit breakers, intelligent routing, micro-agents, control buses, one-time tokens, global locks, leadership elections, distributed Session, cluster state).

The coordination of distributed systems has led to the boiler plate pattern, and using Spring Cloud developers can quickly stand up to implement services and applications in these patterns. They can work in any distributed environment, including developers’ own laptops, bare metal data centers, and managed platforms such as Cloud Foundry.

There are more technologies used in my projects, not just frameworks, but the following:

1. Spring: Low-invasive object management container, provides a large number of annotations, facilitates development, declarative transactions, and integrates other frameworks easily!

2. Springboot: a microservice framework, a collection of a large number of ready-made libraries, providing sample configuration and development, simplifying initial construction and development!

In 2021, as a Java back-end developer, what frameworks must be mastered

 

3. Springcloud: An enterprise-level microservice framework that integrates a large number of libraries that are needed by microservices and can be used directly, such as service registration and discovery, JVM operating parameter acquisition, security certification, circuit breakers, etc.!

4. Mybatis: Persistent layer framework, lightweight, decoupling sql and code, support dynamic sql, so it can support powerful and complex sql statements, query results can be automatically mapped with JAVA objects!

5. Druid: connection pool, can monitor the number of sql executions, efficiency, etc., can monitor the number of web requests, etc., and provide a visual page!

6, redis: key-value memory cache, can support access to multiple data structures, single thread to ensure thread safety, can be used for business data locking, counting, generating global unique keys, designing spike systems, etc.!

In 2021, as a Java back-end developer, what frameworks must be mastered

 

7, docker: The first choice for containers for continuous integration deployment of microservices, which occupies less resources and can build a set of independent environment images to avoid the impact of various environmental complexity! Windows can download boot2docker experience, very easy to use!

8. mycat: Sub-database and sub-table framework, there are a variety of sub-database and sub-table strategies to choose from, simple configuration can obtain excellent database over-data reading and writing!

9, mysql: open source relational database, powerful performance!

10. mongodb: non-relational database, hot data is stored in memory, read very fast, document storage (large objects are especially convenient), support automatic sharding!

11. AOP: Aspect-oriented programming, which can extract non-business public parts, such as logs, security verification, etc.!

12. logback: log tool, simple configuration can get comprehensive log printing, and log file management!

In 2021, as a Java back-end developer, what frameworks must be mastered

 

13, jenkins: continuous integration deployment tool, through simple configuration, can realize automatic deployment!

14, ons, rabbitMq and other message components: asynchronous processing, eventually consistent solution!

15, nginx: the best choice for load balancing, extremely stable, excellent performance, simple configuration, there are a variety of balancing methods to choose from, easy to achieve front-end cross-domain access!

16, SVN/git: version control tool, is the guarantee of the team's parallel development!

17, putty/secureCRT: remote connection tool, convenient to execute commands remotely, view logs, etc.!

18. javamelody: integrated in the code, you can view real-time memory, CPU usage and other performance monitoring indicators on the web page! jmap: performance analysis tool!

Dubbo or Spring Cloud: This depends on the company's technology stack, which one you use to learn which is not used, it is recommended to learn Spring Cloud.

In 2021, as a Java back-end developer, what frameworks must be mastered

 

  • Restful API, RPC: services of different styles;
  • Swagger: Restful API automatic generation tool;
  • Message queue: RabbitMQ and Kafka are commonly used, a container for storing messages and also used for decoupling between systems;
  • MongoDB: an in-memory database in BSON (similar to JSON) format;
  • Zookeeper: a distributed coordination service;
  • Nginx: or other load balancing software;
  • Docker: container technology.

In 2021, as a Java back-end developer, what frameworks must be mastered

 

The above are the frameworks, technologies, tools, etc. most commonly used for JAVA development in my work!

I hope these frameworks can be helpful to everyone, and friends who I like can help forward + follow, thank you!

Guess you like

Origin blog.csdn.net/Ppikaqiu/article/details/112621148