It has been more than a year since I started learning Java. From the beginning, I was completely ignorant to now, I have tried hard, lost, painful, happy, reflected and settled. In the New Year, I hope I can write these things down, just like my footprints along the way.

First, the website application

I remember my first contact with Java when I was writing a small website. At that time, I used Servlet + Tomcat as the server and mysql as the database. At that time, my concept of website application was blank. Before that, I was exposed to C++ and MFC to write desktop programs. I spent a week reading Java Servlet Programming, and then I started writing code. However, when IT came time to write code, I found it hard to get started, because the book was very detailed and very helpful for learning servlets in a system, but not very suitable for building a quick demo. So I went to books written by native people, with theories in the front and little projects in the back. I just wrote the code for a little example. After the code is written, Tomcat is running (there are a lot of pits in the process of running), but when I use the browser to access it, I cannot access it. I check the exception of Tomcat and find that some classes cannot be loaded. After going to the Internet to check, I know that the communication between Java programs and mysql is the need to drive. It took me about two days to complete a simple Hello World. Finishing Hello World is only the first step in a long journey, even if it is my small website, it is only the beginning of the beginning, there are countless pits waiting for me, I have no choice but to step on the pits and climb the pits.

For the next week, I spent a lot of time learning HTML and CSS, and continued to develop my servlet application, but when I finished learning HTML and CSS, the same problem came back and I didn’t know where to start!! I think as a new person, it is very difficult to learn a technology quickly, unless you have similar technology development experience (such as C# people to do Java), the only thing you can do is to copy other people’s things, keep writing code, keep thinking, and slowly become your own thing. I was desperate, so I went online and found a ready-made skin, tweaked it, and fronted my website.

Before and after, I spent a total of half a month, completed my small website, although very ugly, although loopholes, although constantly pit, but, I still learned a lot of things: Servlet basic knowledge, JSP basic knowledge, Java basic syntax and common classes, mysql driver and JDBC, SQL add, delete, change and check, mysql DDL statement, HTML and CSS knowledge, Tomcat application deployment and start and close. It was because of the persistence and efforts in the past half month that I got the pleasure of writing code for the first time and also walked into the Java world.

Second, the low

The joy of writing a small website for the first time didn’t last long, and I was lost. I had no idea what Java was or what it could do. I spent a long time in the library, and also found a lot of information on the Internet, and gradually know the two major systems of Java: Java SE and Java EE. Java SE is the basis of developing Java programs, and Java EE is enterprise-level development. At that time, I only stayed in Java SE on the basis of Java syntax, did not understand the huge system of JDK, and Java EE only stayed in the servlet+ JSP level, as for a large number of middleware, distributed applications and so on, I had no concept. A person’s vision determines how far he goes. In the following month, I spent a lot of time learning servlets, JSP, JDBC, and EL tags and JSTL tags. Using these techniques, I built a couple of small websites, and at the time I thought I was awesome (and now I look stupid), I became proud of Java EE as nothing more, which led me to barely touch web technology for a while.

It was in those days when I wasn’t involved in web technology that I bought a book called “Java Typical Module Refinement.” At that time, I thought all the things on it were very elegant, such as electronic photo album module, email module and so on. So, I spent about half a month to imitate the code inside, but imitation to imitation, I always feel that there is no big improvement in my technology, the only improvement is to understand Java Swing. I even found that these so-called module, are similar structure, the swing as program display part, the background logic or database operation, or is the use of some auxiliary tools (such as Java mail tool Java mail), and the swing library is really is too big, imitate the along while, if you want to write a program, Finally, I have to read a book. It didn’t take me long to lose interest in the book.

Three, the foundation! Foundation!

Treat technology like a girl, get along with a long time will be bored, leave a long time will miss, even if you don’t admit it.

I picked Up Java by accident. I just happened to be reading a Book on Java, and it just kept getting better and better. Before I learned Java, all use that to learn that, this time, I decided to systematically learn Java, especially the basic knowledge of Java. I found a basic textbook of Java, starting from the grammar to learn object-oriented, collection framework, I/O, network, database and so on. I typed through the code for each example, and spent about a week going through the book.

To be honest, it’s good to go over the books. After a time, the things used before will feel good to understand a lot of things, things used before, there is probably an impression, but there is still a big gap with my expectation. I thought after reading the book, I would have mastered the basics of Java, but I don’t know how to read Tucson. I was very frustrated and began to reflect. I felt that it must be the book’s problem, not my own, so I turned to netizens for help. Internet users recommended thinking in Java, and I naively bought the book and began to chew it. Gnaw found that a lot of code can understand, but the author wrote words is not understand, gnaw again and again are the same result. I learned later that one must base one’s understanding of technology on one’s own experience, and that reading it frequently will not give one hundred impressions at a time, but one reading every year will give one different understanding.

Four, framework

Frameworks are a good thing that took me out of the servlet system and into a much wider world: the open source world.

The first time I used frameworks was in an innovation competition where I learned and used struts2, Spring, and iBATIS frameworks, commonly known as SSI. Later, I developed several Web applications with the framework, and then borrowed struts2 and IBatis books to read. I am very skilled in using these two frameworks. These skills have also given me the ability to take on small web projects that don’t make a lot of money, but the sense of accomplishment that comes with it isn’t measurable. This sense of accomplishment also drove me to other open source projects, such as Hibernate, Lucene, Netty, etc.

Open source frameworks were the end of Java for me for a long time. I thought learning Java meant learning to use these open source frameworks, but I was wrong. The first time I realized I was wrong was when I looked at the source code for the open source framework. The complexity of the open source framework shocked and horrified me, and I realized how ignorant I had been. What is the difference between being able to use open source frameworks and being able to use servlets? It’s all the work of the typist! The people who create these frameworks are real programmers!

The frame brings me a broader world, but it makes me more confused, just like a petrel who has just learned to fly. Facing the stormy sea, my heart is full of awe and fear.

5. Teaching video

If I had watched the instructional videos in the first place, instead of finding out for myself, I would have stepped in a lot less.

By the time I came across an instructional video on the web, I was already familiar with Java, but I still spent a lot of time watching videos. From Java basics, to multi-threading, Tetris game development, SSI framework video, mysql video, front-end video, JDBC advanced video, Java Web, EJB, e-commerce site projects and more. These videos really helped me a lot. They helped me connect the pieces of knowledge I had learned in a short period of time. However, no matter how many videos I watched, my level did not change qualitatively, because the level of the teacher who recorded the video was not enough to make me change qualitatively. I always believe that the master can not be mass-produced, first-class masters are self-taught. Instructional videos are just a communication card for the introduction to the programming world, not the end of it.

Object oriented and UML

The open source framework source code is horrible, but it was written by a human.

I finally decided to look at the source code. The first reading material chosen was Commons-pool, used in DBCP used in iBATIS. Commons-pool consists of just a few dozen classes, but together they can be quite complex. I tried to understand the code, but it got so confusing that I had to give up. I tried several more times and failed. At that time I was really very painful, the ceiling saw, but is not broken, and content with the status quo and unwilling. And then one day, I came across UML, I came across class diagrams and sequence diagrams, and I saw people using these diagrams to analyze source code, and I kind of understood object orientation for the first time. Therefore, I tried to use class diagram and sequence diagram to analyze Commons-pool, expressed the static inheritance level and the association relationship between classes, and drew the dynamic program call sequence. In this way, I actually understood the internal implementation principle of Commons-pool. I knew I had broken through that ceiling, and I knew I was going to face a much more complex open source world! Later, I analyzed the code of DBCP and iBATIS again, and received a lot of goods.

If you want to learn Java engineering, high performance and distributed, simple. Performance tuning, Spring, MyBatis, Netty source code analysis of friends can add my Java advanced architecture advanced group: 180705916, group ali Daniel live explained technology, as well as Java large Internet technology video free to share to you