Self-taught Java in a low-level college, four years of successful counterattack~

Recently, some netizens have asked me how to learn Java backend by myself, and some want to switch from other directions, but they don't know much about what Java backend needs to be learned, where to start, and which are the mainstream Java backends Technology, etc., lead to want to learn, but very confused, do not know where to start. I wrote this blog based on the experience of people who have come here. Not necessarily all of them are correct, but they are all summed up by me based on my own experience for your reference.

write picture description here

Java Basics

Java is a pure object-oriented programming language, so in addition to the basic syntax, you must understand its oop features: encapsulation, inheritance, polymorphism. In addition, there are generic and reflection features. Many framework technologies rely on it. For example, Spring's core Ioc and AOP use reflection, and Java's own dynamic proxy is also implemented using reflection. Here I specially wrote an article.  Java dynamic proxy principle analysis . In addition, some Java standard libraries are also very common, such as collections, I/O, concurrency, which are almost ubiquitous in web development, and are often asked in interviews, so before learning Java backend by yourself, you might as well prepare These foundations, as well as some new features of Java8, should also be paid attention to, such as Lambda expressions, stream operations of collections, new Date API, etc. About the new features, I have also written a few blogs about this aspect , please find it yourself, it will not be posted.

Regarding the book recommendation, I do not recommend that beginners start with "Java programming ideas" at the beginning, because I was the one who decided to learn Java by myself that afternoon, and read this book at night. To be honest, I was I really don't understand what it's talking about, because I don't have any basic knowledge of object-oriented language programming, and this book is too extensive and profound. For me at the time, it was completely heavenly, but I think it is still Java The Bible of the world, every time I read it, I gain something. I recommend that you read "Core Java Technology" at the beginning. This book is relatively easy to understand and more acceptable to beginners.

Regarding the video recommendation, I was listening to the basic Java tutorial taught by Mr. Bi Xiangdong from a guest. Mr. Bi's lecture was so lively and interesting that he unknowingly brought me into the pit of Java and couldn't extricate myself. Sometimes I would listen to him. Laughing out loud during the video was probably the funniest part of my self-study period.

database

About SQL: SQL Tutorial , MySQL Tutorial

After I learned some basic grammar, I followed the teacher in the video to do some table manipulation practical exercises, such as single-table query, multi-table query, etc. I suggest learning sql not to be ignorant, need more practice, don't just understand it, because it is very important to write concise sql at work. Here I will say that I have been adhering to the sql statement in the project is to avoid multi-table query to avoid multi-table query, can separate multiple statements to separate multiple statements, because this involves multi-table query performance and database expansion issues.

About JDBC: JDBC tutorialJDBC get connection object source code analysis

You need to understand the usage of the JDBC API. In fact, it is just a set of standard interfaces. As long as all database drivers implement JDBC, we can call the corresponding drivers through the standard API without knowing how the drivers are implemented. The benefits of interface programming. And for JDBC, I directly watched the video to understand, and followed the video to make a transactional gadget based on the Apache Dbutils tool. I specially summarized it with a mind map:

write picture description here

Web Basics

The founder of Open Source China, Sweet Potato, once wrote an article "Beginners learning Java web development, please stay away from various frameworks and develop from Servlet" , I think what he said is too right, in today's Java development, many developers only know how to use Framework, but I don’t understand some knowledge points of the Web at all. In fact, there are many frameworks, but they are basically a routine, so before you learn any framework, please lay a good foundation for the Web, and lay a good foundation for the Web, to see if the framework is really Like a fish in water.

Regarding the Http protocol, this article is very clear: Http Protocol

Regarding the data recommendation of Web foundation, I was watching "Detailed Explanation of Tomcat and Java Web Development Technology", which explained the technical knowledge points of the entire Java Web development in detail, but now, I think there are some in it. The technology is indeed a bit old, but it's nice to have a look at the history of Java web development. So in terms of web basics, I have always watched the "Super Comprehensive Java Web Video Tutorial" taught by Mr. Cui of a guest. It is very detailed and vivid, and there are practical projects!

Regarding JSP, you only need to understand that it is actually a servlet. Regarding some of its label usage, I think it can be ignored directly, because almost no company on the Internet still uses JSP, except for some old projects. Now is the era of the separation of front and back ends, single-page applications, and only API interfaces in the back end, so time is precious, and focus on the Servlet specification.

Regarding Tomcat, it is a web container. The back-end projects we write must be deployed to the web container to run. It is actually a server-side program that follows Http and interacts with the client through Socket communication: Tomcat structure and request processing process

Web mainstream framework

There are so many Java Web frameworks. When 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 it is a long time ago. Struts2, Hibernate are recommended. Believe me, you only need to get started with Spring, SpringMVC, Mybatis, especially the Spring framework. In fact, the frameworks of the Spring family are very good.

But a reminder is, don't be addicted to various frameworks and can't extricate yourself, and be complacent with multiple usages, so that you know it but don't know why.

The core idea of ​​Spring is IOC and AOP:

Talk about the understanding of Spring IOC

Spring Aspect Oriented Programming

The idea of ​​SpringMVC is to use one servlet for request forwarding and control for all requests. This servlet is called DispatcherServlet:

SpringMVC initialization process

SpringMVC handles the request process

Mybatis can realize dynamic assembly of sql, avoiding almost all JDBC code and manually setting parameters and obtaining result sets:

Getting Started with mybatis

Mybatis in-depth series

Advanced Web Framework

After using the SSM framework, you will feel that the framework is nothing more than the same thing. If you have a general understanding of Spring, you will also want to write a "copycat version" of Spring. A lightweight Web framework mainly has the following Function:

It can read user-defined configuration files and use it to initialize the framework; it has
a Bean container to manage the object life cycle of the project's classes; it has
dependency injection to reduce the coupling between classes; it has
AOP function, so that the project can be horizontally Programming, can add business logic without changing the original code;
with 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, and no longer has to work hard for complicated xml. It can be called a subversive of Java back-end development. The recommended book "The Subversive of Java EE Development: SpringBoot Practice"

SpringBoot builds web projects

SpringBoot automatic configuration source code analysis

Custom SpringBoot Starter

spring-boot-starter-tutorial

SpringCloud is a microservice architecture, which can divide the project into microservices according to the 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, separate maintenance, and separate deployment can also reduce the coupling between different businesses of the project. Recommend the book "Spring Cloud and Docker Microservice Architecture in Practice", this book perfectly combines Docker and microservices, which is perfect!

Spring Cloud Chinese official website

The easiest Spring Cloud tutorial ever

I blog about Spring Cloud:

Service registration and discovery of SpringCloud microservice architecture

Service consumers of SpringCloud microservice architecture

Circuit breaker of SpringCloud microservice architecture

Service Gateway of SpringCloud Microservice Architecture

Other technologies

Redis: A high-performance key-value database. When there are high concurrent requests, caching data in Redis will improve the response performance of the server and greatly reduce the pressure on the database.

redis Chinese official website

redis tutorial

Git: The world's most advanced distributed version control system, it is recommended for all beginners to start using Git from the command line!

Follow the stormzhang public account "googdev" and reply to "github" to get a free GitHub tutorial e-book. I think it's very well written.

Git official website

The most complete Git tutorial

Some common commands of Git

Maven: A tool for building projects, which perfectly organizes dependencies between projects through xml, and can compile projects into bytecode files through compilation plugins. There are similar Gradle is also a good choice.

Detailed explanation of maven's pom.xml file

Linux: At least common commands are required to be used, and projects can be deployed in the Linux environment.

Linux Command Encyclopedia

The most complete SSH connection remote terminal tutorial

Docker: It's simply a project deployment artifact. It's too late to explain. Check out my Docker series of blogs and start your Docker journey! Recommended book "Introduction to Docker Technology and Practical Combat", China's first Docker book!

Docker combat (1)

Docker in practice (2)

Docker in action (3)

docker-deploy-tutorial

development tools

If you want to do good work, you must first sharpen your tools. Here are some development tools I recommend:

Intellij IDEA: The best IDE for Java development. This is recognized. I used Eclipse at first, and then I used Intellij IDEA, only to find that Eclipse is a piece of shit, so I advise you not to use Eclipse and directly Intellij IDEA !

IntelliJ IDEA tutorial

Iterm2: The best terminal for macOS!

Iterm2 User Guide

Chrome: Life is too short, please use Chrome, it's too late to explain, get in the car!

Postman: A very useful interface debugging tool.

Postman official website

Finally, welcome everyone to join the Java learning technology exchange group formed by bloggers! Group number: 853665602 , if you have any questions, you can ask and communicate in it, and there are a lot of information compiled by bloggers. You need everyone to join in order to grow this organization! There are a lot of internal resources in the group that I bought with huge sums of money from Dashen: Java question bank, Dachang interview questions, study outline, self-study course outline, etc. I hope to welcome many friends who learn Java together, thank you for your support ! , a good atmosphere to lead everyone to learn together.

 If you encounter any problems on the way to learn Java, you can add V to communicate. It is really useful to have someone give you correct learning advice on the road of self-study. If you have any questions and need help, you can add V. I believe it will help you a lot.

Let me talk about it here, because I am self-taught, and I am well aware of the difficulty of self-learning. If you are also learning Java by yourself, you have encountered any problems in the process of self-learning about learning methods, learning routes, learning efficiency, etc., add Xiaobian V can get it directly, the information is free, and there is no charge.

There is also the key point, remember to follow along in the learning process, remember not to read it even if you know it, the amount of code must be piled up! ! !

The best relationship is mutual achievement. Everyone's watching, forwarding, and leaving messages is the biggest driving force for my creation.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327038901&siteId=291194637