Java Step on the road of the pit

Source: Internet
Author: User

A succession of Java has been more than a year, from the beginning of the ignorant to the beginning of the first glimpse of the doorway, I have tried, confused, pain, joy, reflection, precipitation. In the new year, I hope to write down these things, as I walked the footprints.

First, the initial knowledge of website application

Remember the first time to touch Java, is to write a small website, at that time with Servlet+tomcat do server, database is MySQL. At that time, my concept of the application of the site is blank, before the contact is C + + and MFC writing desktop programs. It took me a week to finish reading the Java servlet Programming book, and then I started writing code. But, really when I write code, I find it impossible, because the book is very thin, for the system learning servlet is very helpful, but to quickly build a demo, but not too suitable. So, I went to find the book written by the natives, in front of the theory, there are a few small projects. I wrote it in the code of a small example. After the code was written, Tomcat ran (and ran into a lot of pits), and when it was accessed by the browser, it was inaccessible, looking at the tomcat exception, and found that some classes could not be loaded. After going to the internet to find out, the Java program and the communication between MySQL needs to be driven. It took me about two days to complete the simplest Hello world. Finish Hello World is just the first step of long march, even to do my small site, but also just the beginning of the start, there are countless pits waiting for me, I have no choice but to step on the pit to climb the pit.

For the next week, I spent a lot of time learning HTML and CSS, and I continued to develop my servlet program, but when I finished learning HTML and CSS, the same problem came, and I couldn't do it!! I think as a newcomer, it is very difficult to get started quickly, unless you have a similar technology development experience (such as C # people to do Java), the only thing you can do is to imitate other people's things, constantly write code, constantly pondering, and then slowly become their own things. I was desperate, so I went online to find a set of ready-made skin, and then slightly changed, as the front page of my site.

After all, I spent a total of half a month, completed my small site, although very ugly, although flawed, although constantly being pits, but, I still learned a lot of things: the basic knowledge of the servlet, the basic knowledge of JSP, Java Basic grammar and common classes, MySQL driver and JDBC, SQL additions and deletions, MySQL DDL statements, HTML and CSS knowledge, Tomcat application deployment and startup shutdown. It is precisely because of this half-month of perseverance and efforts, let me get the first time to write code fun, but also let me into the world of Java.

Second, trough

The first time to write a small site to my joy did not last long, I fell into confusion. I didn't know what Java was and what it could do. I have been in the library for a long time, but also on the internet to find a lot of information, and gradually know the two major Java system: Java SE and Java ee, where Java SE is the basis for the development of Java programs, Java EE is enterprise-level development. At that time, I just stuck to Java SE on the basis of Java syntax, and did not understand the large JDK system, and Java EE is just stuck in the servlet+jsp level, for a lot of middleware, distributed applications and so on is completely no concept. A person's vision determines how far he goes. Over the next one months, I spent a lot of time learning about Servlets, JSPs, and JDBC, as well as the El tags and jstl tags. Through the use of these technologies, I made a few small sites, then I think I was very good (now look silly than), but also gradually proud, I think Java ee so much, which also led me to the next period of time almost no to touch the site technology.

That is, in the days without touching the website technology, I bought a book called "Java Typical module fine solution". At that time I think that the above things are very big on, what electronic album module, mail sending module and so on. So, I spent about half a month to imitate the code inside, but imitation to imitate, I always feel that their technology is not much improvement, the only improvement is to understand the Java swing. I have even found that these so-called modules are actually similar structures, swing as part of the program display, the background logic is either to manipulate the database, or to use some auxiliary tools (such as Java Mail Sending tool Java mail), and swing library is too large to imitate a half-day, If you want to write a program, you still have to read. In this way, it wasn't long before I was interested in the book.

Third, the Foundation! Basis!

Treat the technology like a sister, get along for a long time will be tired, leave long will think, even if you do not recognize the surface.

I picked up Java is a casual choice, then I just happened to meet this Java book, so casually turned over, did not expect the more over the. I used to learn Java, which is used to learn that, this time, I decided to study Java, especially the basic knowledge of Java. I have found a basic Java textbook, starting from the grammar to learn, to object-oriented, set framework, I/O, network, database and so on. I knocked over the code for every example, and it took about a week to go through the book.

To tell the truth, it's good to go through the book again. After a time, the previous used things will feel good to understand a lot of things that have not been used before, then probably have an impression, but with my heart's expectations still have a big gap. I thought after the book, I will be able to master the basic knowledge of Java, but I am after all the pattern Tucson broken AH. I am very frustrated, also began to reflect, I think this must be the book of problems, not their own problems, so I turned to netizens. Netizens recommend "Thinking in Java", I also very naïve bought this book, began to chew. Gnawing at the discovery, a lot of code can read, but the author of the words is not understand, gnawing again many times is the same result. I later learned that the understanding of technology must be based on their own experience, often read often new, not at the same time to read 100 times there will be 100 feelings, but read every year will have a different understanding.


Iv. Framework

The framework was a good thing, and it took me out of the servlet system and brought me into a wider world: open source.

The first use of the framework was to participate in an innovative competition, and I learned and used the three frameworks of Struts2, spring and Ibatis, commonly known as SSI. Then I got out of hand, first using the framework to develop a few web applications, and then borrowed Struts2 and Ibatis books to read, the two frameworks are very skilled. These technologies have also made it possible for me to pick up some small web projects, and although I can't make too much money, the sense of accomplishment it brings is not something that money can measure. This sense of accomplishment also drives me to access other open source projects, such as Hibernate, Lucene, Netty, and so on.

The open source framework has been my idea of the end of Java for a long time, and I've always thought that learning Java is learning to use these open source frameworks, but I was wrong. I found out when I was wrong when I first looked at the source code of the open source framework. I was shocked and frightened by the complex code of the open source framework, and I realized how ignorant I was. What is the difference between using an open source framework and using a servlet? It's all a typist's job! The person who creates these frameworks is the real programmer!

The framework brings me a wider world, but it makes me more confused, like a newly-flying petrel, facing the stormy sea, filled with fear and fear.

V. Teaching VIDEO

If I go to the teaching video at the beginning, rather than groping myself, I will tread a lot of holes less.

I had a certain foundation for Java when I met the instructional video on the web, but I spent a lot of time watching the video. 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 Web site projects, and more. These videos helped me a lot, and they helped me to string up the knowledge that I had learned in the fragmented in a short time. But no matter how many videos, my level has not undergone qualitative changes, because the video of the teacher's level, not enough to let me have a qualitative change. I always believe that the master can not mass production, first-class masters are self-taught. Instructional video is just a communication card for the world of programming, not the end of the programming world.

Vi. object-oriented and UML

Open source framework source code although scary, but that is also written by people.

I finally decided to look at the source code. The first reading material selected at the time was the commons-pool used in the dbcp used in Ibatis. Although Commons-pool is a mere dozens of classes, these classes are very complex to combine. I tried to understand the code, but looked at it and couldn't understand it, and finally had to give up. Then I tried it several times and ended up in failure. At that time I really very painful, the ceiling saw, but it is not broken, and the status quo and unwilling to heart. Until one day, I met the UML, I met the class diagram and sequence diagram, I saw someone using these diagrams to analyze the source code, in the face of these analysis I have a little understanding of the essence of object-oriented. So, I try to use class diagram and sequence diagram to analyze Commons-pool, the static hierarchy of inheritance and the relationship between classes and class to express, the dynamic program call order to draw out, so I actually understand the commons-pool of the internal implementation of the principle. I know, I broke through this ceiling, I also know, I have to face, is more complex broad open source world! Later, I again put DBCP and Ibatis code analysis again, receiving quite abundant.

Vii. the end of the

The future road must be their own walk, but good things can be shared, as the saying goes surmount can attack Jade, which is one of the reasons why I open a blog. I hope that in the new year, I can share some interesting and meaningful things and grow up with all those who love technology.

Java Step on the road of the pit

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.