Burst! Ten thousand word long article takes you from zero basic introduction to mastery of Java (super full summary!)

Time:2021-9-3

Java is broad and profound, and has always been known as the overlord of the Internet;

We all know that the technical structure of the Internet is complex, so the technical components and architecture of Java are also very many and complex;

In fact, there is no final conclusion about how proficient you can be when you learn Java. It doesn’t mean that you can claim to be proficient with an offer with an annual salary of hundreds of thousands.

I think if you can chew on these materials and books on the market, and you can rank among the top 0.1% of all Java programmers, you can reach the stage of “Mastery”, because no one is better than you, of course you are proficient.


So, I’ll list some knowledge points today. If you can master and really understand these things, you can reach the stage of mastery.

The first thing to learn is the basic knowledge of computers, because Java is not as simple as python. It needs a certain foundation. If you come up and directly master Java, there is a 90% chance that you will give up.

Because if you want to learn java well, you have to understand what is the object-oriented design idea, and the object-oriented design idea can not be mastered by newcomers who have just begun to learn programming? Then what shall I do? Isn’t this a dead end?

In fact, if you want to really understand this design idea, you can first understand the C language and then learn Java.

Why? Because C language is process oriented, what are process oriented and object-oriented design ideas? Let me give you an example and you’ll know.

The difference between process oriented and object-oriented can be seen from “how to put elephants in the refrigerator”:

1、 Process oriented

In order to put the elephant into the refrigerator, it takes three processes.

Idea:

1. Open the refrigerator door.

2. Put the elephant in (open the door and get the refrigerator containing the elephant).

3. Close the refrigerator door (after opening the door and installing the elephant, get the refrigerator with the door closed).

According to the above ideas, we can see that each process has a phased goal. After completing these processes in turn, we can put the elephant into the refrigerator.

2、 Object oriented

In order to put the elephant in the refrigerator, you need to do three actions (or behavior). Each action has an executor, which is the object.

Idea:

1. Refrigerator, open the door for me.

2. Refrigerator, you put the elephant in (or, elephant, you drill into the refrigerator for me).

3. Refrigerator, close the door for me.

Complete these actions in turn, and you can put the elephant in.

Here I just give an example.

Well, from now on, we will enter the learning link of Java.


To learn Java, I will introduce it from three stages: primary, intermediate and advanced

Fundamentals of computer

What does computer foundation include?

Computer composition principle, operating system, computer network, data structure and algorithm.

Principle of computer composition

Let’s start with the principle of computer composition, which mainly involves

  • Computer system overview
  • Data and operation
  • CPU overview
  • Storage subsystem overview
  • Bus and IO overview

Java Foundation

What is the level of elementary Java? I think it’s to understand the syntax rules and language characteristics of Java. That’s a little dry. Go directly to the mind map!
Burst! Ten thousand word long article takes you from zero basic introduction to mastery of Java (super full summary!)

In this diagram, if you can understand the contents of the diagram almost, you can be said to be an entry-level Java, but here we should pay attention to a concept, which does not mean that you are a qualified junior java programmer, because in order to reach the level of a junior java programmer, you need to be able to work. The standard of being able to work is that you need to understand the framework and don’t worry, We’ll talk later.

Someone asked why there is no concurrency or Java virtual machine in the figure. These belong to medium and high-level content. You don’t need to understand concurrency and JVM when you first learn java!!!

Then again, how can we learn and understand the above contents? Here’s the point!!!

If you can see here, I think you have formed the habit of daily programming. At this time, you can calm down and program.

Well, first of all, I recommend you a book that is very suitable for learning Java

Head First Java

Head first Java is a complete object-oriented (OO) programming and java learning guide. This book is designed according to the learning theory, so that you can start from the basis of learning program language to include projects such as threads, networks and distributed programs. Most importantly, you will learn how to think like an object-oriented developer.

The following is the self-study process of video direction.

https://www.bilibili.com/vide…

If you can master the basic content above, I think you should spend at least 3 – 6 months. If you can stick to it, I need to encourage you here, but don’t be complacent, because this is only the most basic part, but now you can say that you are stepping into the Java door with one foot.

MySQL

In fact, MySQL should be studied together with Java foundation. You can learn MySQL after learning java foundation.

At this time, I refer to the foundation of MySQL, because MySQL is broad and profound, it is not easy to deeply understand mysql, and we generally master Mysql to the intermediate level in java development.

The primary level of MySQL requires you to be able to write mysql. Here is a video tutorial, from primary to advanced!

https://www.bilibili.com/vide…

Knowledge points for MySQL:

  • Mysql database overview and data preparation
  • MySQL installation tutorial
  • SQL classification
  • MySQL import data
  • Mysql database table and MySQL table structure
  • Mysql database common commands
  • MySQL query fields
  • MySQL condition query
  • MySQL sorting
  • MySQL function
  • MySQL grouping function / aggregation function / multiline processing function
  • MySQL grouping query
  • MySQL connection query
  • MySQL subquery
  • MySQL UNION
  • Usage of limit in MySQL
  • MySQL table
  • MySQL storage engine
  • MySQL transaction
  • MySQL index
  • MySQL view
  • MySQL DBA command
  • Three paradigms of MySQL database design

The advanced content of MySQL is mastered slowly at work. If you want to become a junior java programmer, master these contents and knock them down, it can be said that your MySQL has reached the entry level and you can learn the following!!

Javaweb

JavaWeb uses Java technology to solve the technical sum of related web and Internet fields. Java provides technical solutions to solve the implementation of client and server, especially server applications, such as servlet, JSP and third-party framework.

For JavaWeb, we need to master the following knowledge:

Servlet, JSP, MVC design pattern, cookie, session, javbean component technology, El expression, JSTL expression, filter, listener, file upload and download, internationalization.

Design pattern

Design patterns are not here for you to learn immediately (of course, you can learn, and no one can hinder you from learning), because design patterns involve all aspects of your work. Some design patterns you may not use in your life, but you need to understand their ideas in order to write rigorous and well-organized code.

I recommend you some books on design patterns. You can read any one.

Head first design pattern

Although this book has only 14 chapters, it introduces all 23 design patterns. Each design pattern has corresponding application cases. It is described in funny and humorous language to unveil the design pattern step by step and tell you the evolution process of design pattern.

Reading this book is not only learning knowledge, but also learning a way of thinking, a cognitive skill and a ladder of growth. In short, reading this book in your spare time is no less than your focused work or study.

Graphic design mode

Design pattern is more an idea than a fixed way of coding. Don’t be limited to these rules. Japanese writing is very easy to understand and suitable for Xiaobai. 194 charts + java sample code = easily understand 23 design patterns of GOF.

This book explains 23 design patterns of GOF one by one in simple and easy to understand language. In the process of explanation, it not only matches with rich pictures, but also combines theory with examples, uses Java language to write code to realize the program of design mode, makes the program really run, and provides practice questions and answers to solve specific problems by using mode.

In addition, when necessary, this book also supplements the functions of the Java language to deepen readers’ understanding of Java and review Java while learning design patterns.

The above two books are very suitable for beginners to learn design patterns

Design patterns are not suitable for reading in one breath, because you will be easy to mix after reading several design patterns. Believe me, you can be familiar with one design pattern a week, so you can also use it in your work. After reading all in one breath, you will remember the last design pattern. Believe me, practice it by yourself……

Advanced Java

There are many things to learn for advanced Java. The content involves many aspects. Let’s talk to you next.

Note: when you learn these advanced Java contents, it does not mean that you are an intermediate programmer. On the contrary, you need to integrate these knowledge and apply it to the project / practice. How much you master depends on yourself.

The first is java multithreading. The following lists the knowledge points that multithreading should master:

  • What are processes and threads? What is the difference between threads and processes?
  • Advantages of multithreading
  • Creating thread methods in Java
  • Compare the two methods of using runnable or threadjava and creating threads?

    • What is the difference between the start () and run () methods in the thread class?
  • Thread life cycle
  • Java thread control method

    • The difference between sleep () method and yield () method
  • Why are the sleep () and yield () methods of the thread class static?
  • What is the difference between sleep method and wait method?
  • Thread safety issues
  • Synchronous code block
  • Synchronization method
  • When will the lock on the synchronization monitor be released?
  • Synchronous lock and deadlock

At this point, I recommend several books on Java concurrency.

Java Concurrent Programming Practice

Don’t hesitate. This book is not only the king of concurrent programming, but also a book you must read.

External books will not discuss the source code with you. They only look at ideas. With ideas, it will be easy to realize. Therefore, the actual discussion of concurrent programming is more about ideas. This book also lists a lot of pseudo code and application scenarios to verify these ideas.

This book is not completely suitable for the current situation of the domestic Internet, because in today’s era when stereotyped writing and endorsement are so popular, if you want to enter a big factory and become a “senior programmer”, you also need to understand some stereotyped writing.

Java Concurrent Programming Art

So if you want to find a job in China, the following book is more suitable for you. Don’t write for me why, Ali.

In fact, some knowledge points listed in this book are often asked by big factories, so this book is worth studying carefully.

Speaking of this, what are the knowledge points you should master about Java concurrency?

  • Process and thread concepts
  • Java multithreading foundation,
  • Java thread state and thread state transition
  • Communication mechanism between Java threads
  • Understanding the Java Memory Model
  • happens-before
  • Volatile keyword parsing
  • Synchronized keyword resolution
  • CAS and atomic operation
  • AQS: the AQS that must be asked in the interview of a large factory
  • Thread pool related principles

If you can understand the above content, your Java part can be regarded as an advanced level. You go to a large factory for an interview and ask some eight part essays. Multithreading is not a big problem.

JVM

Java virtual machine is also called JVM. This part is the key to judge the watershed of a java programmer. If you want to reach the level of medium and advanced Java programmers, JVM is a point you must break through and improve. Let me talk to you about what the JVM needs to know.

As usual, let’s first introduce some excellent books about JVM

Deep understanding of Java virtual machine

This book is a must read for you, and the author is Zhou Zhiming in China. Domestic authors generally talk about more implementation and less professional terms. This book is easy to understand. Although there are many concepts, Zhou Zhiming has given examples and explanations

Douban can give a score of 9.5 to domestic authors, which shows how well this book is written. This book is a very classic book for understanding JVM, which is highly recommended by five stars.

Java virtual machine specification

The Java virtual machine specification is also a book translated by boss Zhou Zhiming. The authority of this book is beyond doubt. In fact, it is written according to the official JAVA documents. It can be said that after reading this book, you can give an “official” answer when talking about the JVM during the interview, greatly increasing your chances of passing the interview.

Although there are many high-quality JVM books, the obscure technical principles and terminology of JVM make it easy for novices to start reading and give up. Here I also recommend watching videos:

https://www.bilibili.com/vide…

Main knowledge points:

  • JAVA memory partition and memory management
  • Garbage collector in JVM
  • JVM performance monitoring
  • JVM tuning
  • Class file structure in JVM
  • JVM class loading mechanism
  • JVM bytecode

It will take at least 2 – 3 years to master the above contents. It doesn’t mean that you can learn the above things in the past three years. You can learn other things. What I recommend below is what you should master in this time period.

Maven

Before learning the framework, I suggest you first understand what Maven is and why Maven is used in the project

Maven is only for beginners to understand, but how Maven’s excellent architecture simplifies the code, how to make it more convenient for us to use, and some unknown secrets in Maven.

Recommend a set of Maven video tutorials

https://www.bilibili.com/vide…

What should I learn next? Finally reached the frame!!! As a development, the framework is your weapon!!! Just play! During the war to resist US aggression and aid Korea, the volunteers used light weapons and mortars to turn over the ace troops such as the first division of the American cavalry and the first division of the land war.

The framework needs to learn spring MVC, spring and mybatis

The first thing to learn about the framework is mybatis

MyBatis

Getting started with mybatis

I read this book when I first started learning mybatis. I typed the contents of the book against each other. It can be said to be a very valuable book for reference.

Mybatis from getting started to mastering starts with a simple mybatis query to build a basic development environment for learning mybatis. Through comprehensive example code and test, this paper explains the basic usage of adding, deleting, modifying and querying in mybatis XML mode and annotation mode, and introduces the application of dynamic SQL in different aspects and the best practice scheme in the use process. It provides rich examples for mybatis advanced mapping, stored procedures and type processors, so that readers can better understand and master the advanced usage of mybatis through the bottom-up method. At the same time, it provides a detailed configuration introduction for mybatis code generator.

This part of mybatis can be seen in the video, which is easier to understand

https://www.bilibili.com/vide…

So what should mybatis master? Of course, you should be able to use mybatis. You can directly see the video tutorial or mybatis from getting started to mastering this book.

  • Mybatis framework overview
  • Mybatis framework quick start case
  • Mybatis framework Dao agent
  • Mybatis framework dynamic SQL
  • Mybatis profile
  • extend

Spring

After learning mybatis, it’s time to learn our core framework spring. There must be his reason why spring can be popular now. When you go to work, you can slowly experience its essence.

To learn about spring, the first book I recommend to you is the actual combat of spring, that is, spring in action. I don’t think there is one of the best books to learn spring.

Another set of video tutorials is recommended

https://www.bilibili.com/vide…

What do you need to learn about spring?

  • Spring overview
  • LOC control reversal
  • AOP aspect oriented programming
  • Spring integrates mybatis
  • Spring transaction
  • Spring and Web

There are very few scenarios in which spring is used alone, and more are used as framework integration. Spring’s main features are two: IOC container and AOP. IOC container is the basis for spring’s integration with various resources. It can be said that with this feature of IOC, there will be bean assembly, automatic assembly and other features, and AOP is a technology to reduce business coupling, Let’s see business relevance in a “faceted” way. The most important thing is these two technologies. If you understand these two technologies, spring is almost the same.

Spring MVC

Spring MVC is finally here!!!! Why do you say spring MVC last? Because spring MVC is actually an encapsulation of servlet, and the object spring MVC deals with is HTTP protocol, so you need to master the above knowledge before learning spring MVC.

Learn spring MVC. You can see this video

https://www.bilibili.com/vide…

So what do you need to know about spring MVC?

  • Spring MVC overview
  • Dispatcher servlet parsed by spring MVC
  • Spring web MVC – filter and interceptor handler and filter
  • Spring MVC global exception handling
  • Spring MVC single file upload and multi file upload
  • Three ways to upload files in spring MVC
  • File upload and download in spring MVC
  • Spring MVC prints @ requestbody and @ response logs
  • Spring MVC interceptor realizes user login permission verification
  • Principle analysis of spring MVC framework
  • Spring MVC – view parsing process
  • RestTemplate
  • Detailed explanation of using resttemplate to access rest services in spring MVC
  • Full analysis of common annotation functions of spring MVC controller
  • Introduction to MVC Design Pattern & Spring MVC implementation

After you finish learning from Java foundation – > MySQL foundation – > JavaWeb – > mybatis – > spring – > spring MVC, I think it should take you about 1 – 2 years. At this time, you should be able to complete a small SSM project. Now don’t forget to continue learning. You should integrate your knowledge, You can build small projects according to the contents of the book, or complete some SSM projects. Many graduation projects in Java direction can be completed here.

Here is a set of video tutorials for Java graduation design

https://www.bilibili.com/vide…

At this time, you can say that you can have the basic quality of primary java development, but you may not be able to find a job. Why? Because you haven’t touched the most popular framework at this stage, let’s welcome the famous spring boot boss.

SpringBoot

Springboot can be said to be the hottest framework in the Java field today, so why is springboot so popular?

From the design concept

When it comes to why spring boot is so popular, we must talk about the design concept of spring boot. It is this design concept that lays the foundation for the development and design benchmark of spring boot and makes spring boot today.

What is the design concept of spring boot?

It is convention over configuration.

Convention over configuration is not a new concept. It is a software design paradigm, which has been applied in software architecture design for a long time. Its role is to reduce the number of decisions that software developers need to make and obtain simple benefits without failure.

Spring boot only raises this design concept to a higher level. Spring boot not only implements this design concept on a certain function, but the whole software system is practicing convention over configuration.

The spring boot system shows the idea that convention is better than configuration, ranging from the configuration file, the default configuration of middleware, to all kinds of starters in built-in containers and ecology.

80% of spring boot JPA’s query functions are provided in an agreed way. In addition, 20% of complex scenarios, additional technical means are provided to solve them. Typical conventions are better than configuration implementation.

Spring boot starter loads and initializes components according to the contract information when the project is started. Therefore, after the starter is introduced into the project, the out of the box effect can be achieved.

Even the design of spring cloud draws on the idea that convention is better than configuration. Many components provide their related functions by default at startup, so that our use can reach little or zero configuration.

Therefore, you only need to learn springboot again to meet the employment needs of a primary java development. So you must learn springboot well.

Recommended Videos:

https://www.bilibili.com/vide…

In fact, after learning for a period of time, you will find that springboot is completely a scaffold, which is convenient for us to quickly build a project and simplify the configuration. You don’t have to write complex XML expressions. Instead, you use annotations. Their principles are similar, but using annotations can make your project more concise.

Spring Cloud

Spring cloud is a microservice project architecture based on springboot. Now most Internet companies and even some traditional industries begin to use spring cloud as the infrastructure, some because of business needs, and some to install B. anyway, if the interviewer asks if you will spring cloud, if you say not, your impression score is estimated to be reduced, So junior programmers need to know more or less about spring cloud, so I recommend a set of videos.

https://www.bilibili.com/vide…

Dubbo

With spring cloud finished, how can there be less Dubbo?

https://www.bilibili.com/vide…

Redis

Redis is the most popular NoSQL database. You may not know what redis is used for. Let me popularize it for you first.

At present, redis and memcached are the two most commonly used cache databases. Compared with memcached, redis supports rich data types (memcached can only use string types). Because of its rich data structure, redis is not limited to caching. There are many scenarios implemented by redis, which can greatly reduce the workload.

Nginx

Nginx Basics

What is nginx?

Nginx is a web server that mainly handles the request distribution of clients and servers.

Features and advantages:

  • High concurrency
  • Hot deployment
  • fast
  • low power consumption
  • Hot deployment
  • Use and extension

Open source free nginx and commercial version of nginx plus, corresponding to free openresty and commercial version of openresty

  • Open source nginx.org
  • Commercial nginx plus
  • Alibaba Tengine
  • Open source openresty
  • Commercial openresty

Nginx forward proxy and reverse proxy

For ease of understanding, let’s first understand some basic knowledge. Nginx is a high-performance reverse proxy server. So what is reverse proxy?

Proxy is a hypothetical layer of server between the server and the client. The proxy will receive the client’s request and forward it to the server, and then forward the server’s response to the client.

Both forward proxy and reverse proxy implement the above functions.

Forward proxy

Forward proxy means a server located between the client and the original server. In order to obtain content from the original server, the client sends a request to the proxy and specifies the target (original server), and then the proxy forwards the request to the original server and returns the obtained content to the client.

The forward proxy serves us, that is, the client. The client can access the server resources it cannot access according to the forward proxy.

The forward proxy is transparent to us and non transparent to the server, that is, the server does not know whether it receives access from the proxy or from the real client.

Reverse proxy

Reverse proxy means that the proxy server accepts the connection request on the Internet, then forwards the request to the server on the internal network, and returns the result obtained from the server to the client requesting connection on the Internet. At this time, the proxy server acts as a reverse proxy server.

Reverse proxy serves the server. Reverse proxy can help the server receive requests from the client, help the server forward requests, load balancing, etc.

The reverse proxy is transparent to the server and non transparent to us, that is, we do not know that we are accessing the proxy server, and the server knows that the reverse proxy is serving him.

Netty

Netty is a client / server framework that uses Java’s advanced network capabilities to hide the complexity behind it and provide an easy-to-use API.

Netty is a widely used java network programming framework (netty won the Duke’s Choice Award in 2011, seehttps://www.java.net/dukescho…)。 It is active and growing in user communities, such as large companies Facebook and popular open source projects such as infinispan, hornetq, vert. X, Apache Cassandra and elasticsearch, all use its powerful core code for network abstraction.

Git

Git is an excellent distributed version control platform. Code collaboration is usually used for teams or multiple people to jointly develop a project. It may be incomprehensible at the beginning of contact with code collaboration, that is, if you and your colleagues jointly develop a project, your code should also be put together, and the code you submit can be seen by the other party, You can also see the code submitted by the other party.

Needless to say, I changed the code and I’ll send it to you. On the one hand, you know that there may be omissions in the content you changed. Some people say that it’s OK to record what files have been changed? But how much work do you do? And what if you and your colleagues change the same file? Also remember how much content in the same file has not been changed? This is too cumbersome and inefficient, so Git is used to solve this situation. Git is currently the choice of most enterprises, but some traditional software companies still use SVN, which is also a code collaboration platform. Here is a specific introduction to git:

  • Git is distributed and SVN is centralized
  • Git is distributed and SVN is centralized

This is the biggest difference between GIT and SVN. If you can master this concept, you can basically understand most of the differences between the two. Because Git is distributed, GIT supports offline work and can perform many operations locally, including the branch function to be launched next. Svn must be connected to the network to work normally.

Git has many complex concepts, and SVN is simple and easy to use

All developers who master GIT and SVN at the same time must admit that git has too many commands. They need to master add, commit, status, fetch, push, rebase, etc. in their daily work. To master them skillfully, they must also master the differences between rebase and merge, and between fetch and pull. In addition, there are cherry pick, submodule, stage and other functions. Only these nouns sound very windy.

In terms of ease of use, SVN will be much better, simple and easy to use, and very friendly to novices. But on the other hand, more git commands mean more functions. If we can master most git functions and realize the mysteries, we will find that we can’t go back to the era of SVN.

Git branch is cheap and SVN branch is expensive

In version management, branching is a common function. Before releasing the version, you need to release branches for large demand development, feature branches, development branches and stable branches for large teams. In the process of large team development, there is often the need to create branches and switch branches.

Git branch refers to a submission, while SVN branch refers to the directory of the copy. This feature makes the branch switching of GIT very fast and the creation cost is very low.

Moreover, GIT has local branches and SVN has no local branches. In the actual development process, we often encounter some unfinished codes, but need to deal with other problems urgently. If we use git, we can create a local branch to store the unfinished codes. After the problems are handled, we can return to the local branch to continue to complete the codes.

There are many ways to learn git, but the most important thing is your hands-on practice. You need to practice it again, whether reading or practicing according to the tutorial, so you can use git almost.

Finally, some suggestions are made

To learn programming, remember the two words “quit corruption”!

But half of it, I haven’t learned it thoroughly, so I want to learn other technologies.

This is very deadly! Study must be down-to-earth!

Why do you say this? Because I have suffered such a loss, I mentioned it.

Give yourself a goal or a project. Don’t think about other things before you finish it. The reason is the same as climbing a mountain.

When you finish, you can learn other things