The knowledge you need to learn for java back-end development includes: 1. Java basic syntax and oop features; 2. Database-related knowledge, such as SQL language, MySQL, and non-relational What do you need to learn about Java backend development?s; 3. Web basic knowledge; 4. Web mainstream frameworks, such as Spring, SpringMVC, Mybatis; 5. Front-end knowledge, etc.
This article will briefly introduce the back-end learning route from basic to independent back-end, for reference only.
Recommended course: Java Tutorial.
Java Basics
Java is a pure object-oriented programming language, so in addition to basic syntax, you must understand its oop features: encapsulation, Inheritance, polymorphism. In addition, there are generics and reflection Features, many framework technologies rely on it, such as Spring's core Ioc and AOP, both use reflection, and Java's own dynamic proxy is also implemented using reflection. In addition, some Java standard libraries are also very common, such as collections, I/O, and concurrency. They are almost everywhere in web development and are often asked in interviews, so when learning Before starting the Java backend, you might as well lay these foundations first. In addition, there are some new features of Java8 that you should also focus on, such as Lambda expressions, collection Stream operations, the new Date API, etc. About the new features.
Regarding book recommendations, I do not recommend that beginners start reading "Java Programming Thoughts", because I was the one who decided to learn Java by myself that afternoon, and I held this book in the evening People who read books, to be honest, I really didn’t understand what it was talking about at the time, because I didn’t have any foundation in object-oriented language programming, and this book was so comprehensive and profound that for me at the time, it was completely It is a bible, but I think it is still the bible of the Java world, and I gain something every time I read it. I recommend that you read "Java Core Technology" first. This book is relatively easy to understand and is more acceptable to beginners.
Database
About sql: SQL tutorial, MySQL tutorial
After I understood some basic grammar, I just followed the teacher in the video Some table operations were practiced in practice, such as single table query, multi-table query, etc. I suggest you learn sql and don’t look at the experts. Low, you need to practice more, don't just understand it, because it is very important to write concise SQL at work. Here I will say that I have always adhered to the SQL statement in the project. If you can avoid multi-table queries, avoid multi-table queries. If you can separate multiple statements, separate multiple statements, because this involves issues of multi-table query performance and What do you need to learn about Java backend development? expansion.
About JDBC: JDBC tutorial, JDBC acquisition of connection object source code analysis
You need to understand the usage of JDBC API. In fact, it is just a set of standardized interfaces. As long as all What do you need to learn about Java backend development? drivers implement JDBC, Then we can call the corresponding driver through the standard API without knowing how the driver is implemented. This is the benefit of interface-oriented programming. And for JDBC, I directly watched the video to understand it. Following the video, I made a small transactional tool based on the Apache Dbutils tool. I specially summarized it with a mind map:
Web Basics
Hongshu, the founder of open source China, once wrote an article "Beginners to Java Web development, please stay away from various frameworks and develop from Servlet", I think He is so right. In today's Java development, many developers only know how to use frameworks, but do not understand some knowledge points of the Web. In fact, there are many frameworks, but they are basically a routine, so when you learn any framework Before installing the framework, please lay the foundation of the Web well. If you lay the foundation of the Web well, you will see that the framework is really like a fish in water.
Regarding the Http protocol, this article is very clear: Http protocol
Regarding data recommendations on the basics of the Web, I was reading "Tomcat and Java Web Development Technology Detailed Explanation" , explains the entire Java Web development technology in great detail Knowledge points, but now I think some of the technologies mentioned in it are indeed a bit old, but it is also good to understand the history of Java Web development. So on the Web In terms of basics, I always watch the "Super Comprehensive Java Web Video Tutorial" taught by Mr. Cui from a certain customer. The lectures are very detailed and vivid, and there are also practical projects!
Regarding JSP, you only need to understand that it is actually a Servlet. Regarding the usage of some of its tags, I think you can just ignore it, because almost no company on the Internet now
still uses JSP , except for some old projects. Nowadays, it is popular to separate the front and back ends, single-page applications, and the back-end only provides API interfaces, so time is precious, so focus this time on Servlet specifications.
About Tomcat, it is a Web container. The back-end projects we write must be deployed to the Web container to run. It actually follows Http and communicates with clients through Socket. Server program for client interaction: Tomcat structure and request processing process
Web mainstream framework
There are so many Java Web frameworks. Once you have some experience, you can also write a Web framework. Many people on the Internet say that Spring, Struts2, and Hibernate are the three carriages of Java. I just want to say that that was a long time ago. I seriously do not recommend Struts2 and Hibernate. Believe me, you only need to get started with Spring, SpringMVC, and Mybatis at the beginning, especially the Spring framework. In fact, the frameworks of the Spring family are all very good.
But a reminder is that you must not be obsessed with various frameworks and become complacent about knowing how to use them in multiple ways, leading to knowing them but not knowing why.
The core idea of Spring is IOC and AOP:
Talk about the understanding of Spring IOC
Spring aspect-oriented programming
SpringMVC Its idea is all Requests are unified using a Servlet for request forwarding and control. This Servlet is called DispatcherServlet:
SpringMVC initialization process
SpringMVC request processing process
Mybatis It can realize dynamic assembly of sql. Avoiding almost all JDBC code and manual setting of parameters and obtaining result sets:
mybatis introductory tutorial
Mybatis in-depth series
Web framework advanced
After using the SSM framework, you will feel that the framework is nothing more than this. If you have a general understanding of Spring, you will also want to write a "copycat version" of Spring. Now, a lightweight Web framework mainly has the following functions:
It can read user-defined configuration files and use it to initialize the framework;
It has Bean container and manages project classes. Object life cycle;
has dependency injection to reduce the coupling between classes;
has AOP function, so that the project can be programmed horizontally and business logic can be added without changing the original code;
Have MVC framework mode.
In fact, in addition to SSM, there are hundreds of Web frameworks, among which the Spring family bucket is the most dazzling. Here I highly recommend two Spring family frameworks:
SpringBoot and SpringCloud.
SpringBoot makes up for the shortcomings of Spring configuration. You no longer have to work hard on complicated xml. It can be called a subversive in Java back-end development. Recommended book "A subversive in Java EE development: SpringBoot in practice"
SpringBoot build web project
SpringBoot automated configuration source code analysis
Customize SpringBoot Starter
spring-boot-starter-tutorial
SpringCloud is a microservice architecture that can divide the project into microservices according to business. Each microservice can be deployed independently and the services coordinate with each other. When a project gets bigger and bigger, it becomes more and more difficult to maintain. At this time, splitting the project into several microservices, maintaining them separately, and deploying them separately can also reduce project differences. The degree of coupling between businesses. Recommended book "Spring Cloud and Docker Microservice Architecture in Practice", this book perfectly combines Docker and microservices, it is perfect!
The above is the detailed content of What do you need to learn about Java backend development?. For more information, please follow other related articles on the PHP Chinese website!