Java Learning Path (iii) process

Source: Internet
Author: User
Tags object serialization


Java Learning Path (iii) process

Everyone's learning method is different, one's method is not suitable for another person, I can only talk about their own learning methods. Because I study Java is completely self-taught, never asked others, so the process of learning is basically completely self-groping out. I also do not know whether this method is a better method, can only provide a little reference for you.

The first step in learning Java is to install the JDK and write a Hello world. In fact, the JDK learning is not so simple, about the JDK has two problems is easy to always haunt the Java Programmer's Place: One is the classpath problem, in fact, in principle, is to understand how the JRE ClassLoader is loaded class Another problem is the package and import issues, how to find the classpath of the class. By figuring out these two questions, you're removing the biggest hurdle to learning Java and using the JDK. It is recommended to take a look at Sen Wang's "Deep Adventures in Java" and discuss these two issues in depth.

The second step is to learn the Java syntax. Java syntax is Class C + +, basically the mainstream programming language is not Class C, is the class C + +, there is nothing new, so the grammar of learning, probably half a day is enough. The only thing to note is that there are several key words that are not easy to figure out, public,protected,private,static, when to use, why to use, how to use, this may need someone to point out, I was completely self-figured out, took a long time. But then I saw the book "Thinking in Java", which was about these concepts.

The third step is to learn the characteristics of Java's object-oriented programming language. such as inheritance, constructors, abstract classes, interfaces, methods of polymorphism, overloading, overwriting, Java exception handling mechanism. For a person who does not have an object-oriented language background, I think this process takes a long time, because learning Java before the C + + experience, only C experience, I was about one months or so, just thoroughly put these concepts are clear, the book above the examples of repeated thinking, modify, try, The chapters of the content of the repeated look over, look at the past, see not more than 5 times, just thoroughly understand. But I think if there is a C + + experience, it should be two days enough time. So in this process, you can see more "thinking in Java" This book, the object-oriented explanation is very thorough. Unfortunately, I studied, and did not see the book, so I spent a lot of time, through their own attempts and try to learn.

The fourth step is to get familiar with Java's class libraries. Java's base Class library is actually the JDK installation directory under Jre\lib\rt.jar this package. Learning Basic Class Library is learning Rt.jar. There are very many classes in the base Class library. It is said that there are more than 3,000, I have not counted. But there are only 4 of us who really have the core,

java.lang.*;

java.io.*;

java.util.*;

java.sql.*;

The four-pack study, each package of learning can be written in a thick textbook, and O ' Reilly did do so. I think if the time is tight, it is impossible to learn by reading four books. I think the better way to learn is this:

The first thing to do is to read through the entire package framework, to understand the class,interface,exception of the entire packages, preferably to find articles that introduce the entire framework. The first few chapters of these specially introduced books should be the overall framework.

The grasp of the overall framework of the package is not to be familiar with the usage of each class, but to remember what properties and methods it has. I can't remember it. Instead, you need to know what kinds of classes are part of the package, what these classes are used for, and what functions the core classes are doing. I usually teach a package at a time, so it is not possible to describe the usage of each class in detail, but I have repeatedly stressed that I am telling you these packages not to tell you how the method of the class is called, nor do you want to remember the method invocation of the class, but rather you know what classes Java gives us. Each class is used in what circumstances, when I encounter problems, I know which class, or which combination of classes can solve my problem, that ' all! , as long as you know which class to use to complete your work, when we write the program specifically, it's enough. When coding, the specific method calls, is the side write code, side check documentation, all the things are in the documentation inside, do not require you must remember, the actual you also can not remember more than 3,000 classes of a total of nearly 100,000 method calls. Therefore, the grasp of the overall framework of each package becomes extremely important.

The fifth step, through the above study, if the study of a more solid, then lay the foundation of Java, the rest of the work is to clear the documentation inside, in addition to the above 4 packages of other useful classes. I believe that progress to this step, Java's self-learning ability has been cultivated, can be directly to learn the level of documentation. In addition to GUI programming, the other packages that will be useful in the JDK are these:

java.text.*;

java.net.*;

javax.naming.*;

These packages really use more than a few of the classes, only a few, so do not need to spend a lot of time.

Sixth step, Java Web programming

The core of Web programming is the HTTP protocol, the HTTP protocol and Java-independent, if not familiar with the HTTP protocol, although you can learn servlet/jsp programming, but not to extrapolate, follow realm. So the learning of HTTP protocol is necessary. If you are familiar with the HTTP protocol, but also have a good foundation of Java programming, Learning servlet/jsp is simply easy, I learned to use less than a week servlet/jsp, and then began to use JSP to do the project.

In Servlet/jsp's study, the documentation is still the servlet. The most commonly used classes of Servlet APIs are few and take less time to master. Read through all these classes and try to write a few more examples. The essence of servlet/jsp programming is to call these classes repeatedly to talk over the HTTP protocol between Web server and brower. In addition to the JSP, also need to be familiar with a number of commonly used JSP tags, the specific way to remember the words, temporary check just.

In addition, Java Web Programming learning focuses on Web application design patterns, how to conduct business logic analysis, and reasonable design, according to the MVC design pattern requirements, using servlet and JSP to complete different logic layer, Learn how to control and share data between Servlets and JSPs, and how Web application should be configured and deployed.

Seventh step, Java EE programming

The above learning process if it is more smooth, to this step, the difficulty is suddenly improved. Because the above knowledge content is only involved in one aspect, and like EJB,JMS,JTA, such as the core of the Java EE specification is often a combination of the use of a number of technologies, the crystallization, so it is difficult to grasp the larger.

First of all must learn good Jndi,jndi is the app server location server resources (EJB component, DATASOUCE,JMS) lookup method, if the Jndi is unfamiliar, ejb,jms these things almost can't learn to go on. Jndi is actually javax.naming.* this package, it is very simple to use. The difficulty lies in the configuration of the server resource file. For the configuration of server resource files, it is necessary to look at the specific document specification, such as the writing of Web. XML, Ejb-jar.xml and so on. For each of the different app servers, there are also your own service resource profiles that you need to be familiar with.

You can then learn JTA, primarily to understand JTA's approach to transaction control, and where to use JTA. Here is a simple example, we know that the general situation can be used for a database connection transaction control (Conn.setautocommit (False),...., Conn.commit ()), as an atomic *, But suppose my business requirement is to make an atom of two different databases, can you do that? At this time can only use JTA. Assuming that the process is to first insert a record into a database, and then delete the B database another record, we write our own code is not control the whole * as an atom. With JTA, the app server is used to complete the control.

Learning about object serialization and Rmi,rmi is the basis of EJB before learning EJB. Following the study of JMS and EJB, the most important thing for EJBS is to understand how EJBS implement calls to remote objects through RMI, and under what circumstances EJB is used.

After learning to ejb,jms these things, you may realize that you are impatient to learn two areas of knowledge, one is UML, the other is design Pattern. Java enterprise Software Design attaches great importance to the design of the framework (framework), a good software framework is the prerequisite for the success of software development. At this time, should begin to focus on the study of design patterns and framework learning, through learning and practical programming experience to master the EJB design patterns and the core model of the Java EE.

The Java EE specification inside, besides EJB,JMS,JTA,SERVLET/JSP,JDBC also has many many enterprise technology, here does not introduce each one.

There is also a new domain Web Services. Web Services also has nothing new, it is like a binder that can unify different services to provide a unified calling interface, as a user, I just get the service provider to my WSDL (description of the service), enough, I have no idea whether the services provided by the server provider are EJB components or. NET components, or what CORBA components, or any other implementations, I don't need to know. The greatest place in WEB services is the sharing of the entire Internet service through a unified service delivery and invocation, which is a very exciting technology area. Web services seem to have no good books at the moment, but they can be learned by looking up data on the web.


        Please respect others ' work success, reprint please indicate reprint place. Thank you!

Java Learning Path (iii) process

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.