From: http://hi.baidu.com/clebean/blog/item/cdab34da86055ed7b7fd482d.html
For reference only!
It is necessary to discuss the concepts of j2se, j2se, and J2EE before you start. The Micro Edition of the Java 2 platform. It is mainly used for embedded Java, such as mobile phones and PDAs. J2se, Java 2 platform, Standard Edition, the JDK (Java Development Kit) we usually call here, is the basis of J2EE. J2EE, Java 2 platform, and Enterprise Edition are so-called enterprise-level Java. In fact, Sun defines J2EE as a component-based multi-layer enterprise-level application specification. That is, to define a Java specification for different technologies, so that these different technologies can be combined to build strong enterprise-level applications on the Java platform. From this point of view, the concept of J2EE should cover j2se and j2se. For example, a typical J2EE application, an online store, supports Web-based order placement and mobile phone order placement. It is obvious that j2se and j2e-hpc must be used. So there is no such problem as switching from j2se to J2EE, but the latter has a wider scope.
Let's take a look at Sun's J2EE-related technologies.
1. Web Service technology
-Java API for XML Processing (JAXP)
-Java API for XML registries (jaxr)
-Java API for XML-based RPC (JAX-RPC)
-Soap with attachments API for Java (SAAJ)
2. Component Model Technology (Component Model Technologies)
-Java Servlet
-Assumerver pages
-Assumerver faces
-Enterprise JavaBeans
-Java Message Service
-J2EE Connector Architecture
3. Management Technologies)
-J2EE deployment Specification
-J2EE Management Specification
-J2EE client provisioning
-Java authorization contract for containers
4. Other Related Technologies (Other J2EE technologies)
-JDBC
-Java Data Objects (JDO)
-Java IDL and Java RMI-IIOP)
-Javamail
-Transactions
So many technologies will inevitably make beginners feel overwhelmed and discouraged. Even an experienced J2EE developer, I am familiar with J2EE-related technologies. However, as a developer of a common J2EE application, we only need to focus on learning some of the technologies. We only need to be aware of other technologies, one day, you need to know where to run and find the information. In my personal opinion, the following technologies must be mastered by J2EE application developers. Java Server Page, Java Servlet, Enterprise JavaBean, JDBC, transactions. There are also XML-related technologies such as JAXP, Java Message Service, Java mail, JDO, and so on. Other management technologies, Connector Architecture, and so on are mainly for reference by the container provider's middleware provider. application developers do not need to care much about it. It is not too late to learn it when it is used.
Language Learning
The first is j2se. Learning a new technology is nothing more than reading and practicing. A good reference book is especially important for beginners. Currently, the Java books on the market can be said to be overwhelming, and the quality is also uneven, making beginners at a loss. So I recommend a few books first. At present, we generally recommend two books for the basic knowledge of Java, <> and <core Java? 2. Volume I: Fundamentals>. Needless to say, the first book is Bruce Eckel's masterpiece, Jolt's award-winning book. The content is comprehensive and covers almost all aspects of the Java language. This book provides a wealth of examples to help you understand the learning content. In addition, the first part of the book introduces the basic oo books. I think it will be of great help to people who are new to oo. This book is open source and can be downloaded from the author's website. The disadvantage of this article may be that it is a little thick for beginners. This is why some people do not recommend this book as a beginner's learning book. The next book <> is now in the seventh version. The popularity of this book can also be seen from the number of times it was published. This book also describes a comprehensive system, basically, the Java language basics should pass through. The disadvantage is also too thick. It is a bit like a reference manual. The previous part has spent a lot of time talking about swing and Applet, which may not be very useful for beginners. There are also some basic books like <Java in a nutshell>.
After learning the basic language basics, don't forget that the most important and useful information is the JDK document. From the first day of your learning of Java, JDK documentation should be on hand. If you encounter a problem first, you should go to the Forum to ask a question instead of reading the JDK documentation. Do not continue to learn about it. Learn to check the JDK documentation first. It is no exaggeration to say that in our beginner's forum, 60% of the problems can be solved simply by checking the JDK documentation. The latest JDK documentationhttp: // java.sun.com/j2se/1.4.2/download.html (currently the latest version is j2se5 http://java.sun.com/j2se/1.5.0/download.jsp) can not simply say not to practice, the same download page to download JDK back. After the installation is complete, I want to upgrade it. After installation, there is an src.zip file (some JDK versions are SRC. jar), good things --- JDK source code. Someone always asks on the forum where JDK source code is downloaded. You say something is stored in your house and you can find it everywhere. With this problem, you need to compete with others on the Forum. Open the source code and check whether there are any questions. Several of the most important command line tools are:
Javac: Compile the source file to the class file
Java: Run class
Jar: a packaging tool.
Javadoc: a tool for generating Java Doc.
For beginners of Java, I do not recommend using ide But directly using a text editor and then compiling and running it using command lines. This helps you understand the basic concepts of classpath and path. Classpath is a confusing place for beginners. The current IDE is so clever that you can automatically generate the Java source code and compile it with a name. Maybe you have run your first hello World Program, and you do not know what Java and javac are used. As for actual project development, a proper IDE is very important. We will introduce some Java development tools later.
Basic J2EE and advanced Java language
After learning the language basics, You can naturally transfer it to the learning of the actual J2EE technology. J2EE is complex, and EJB and Servlet are the core technologies that every J2EE developer needs to master. For servlet, I recommend <> and <>. The first is the servlet textbook recommended by Sun. The second is Amazon's best-selling Java book and five-star book. This mechanical industry press has a Chinese version called <>. I feel that the translation is still good. The second version does not seem to have seen a Chinese version. Both books fully and systematically introduce JSP and sevlet knowledge, from web server configuration, JSP, Servlet basic programming, tag Library (TAG Lib), filter, the event framework is well described. Examples are also useful. There are two well-known EJB learning books: <Enterprise JavaBeans, 3nd edition> and <mastering Enterprise Java Beans Third Edition>, two authors Richard Monson, ed Roman is a heavyweight in the industry. Richard Monson is a member of the EJB standardization expert group. For me, it is difficult to distinguish between the two books. One advantage of the second book is that you can download http://www.theserverside.com/books/wiley/masteringejb/index.tssfor free.
In other words, we can't just say no, but it is a little troublesome to do J2EE exercises. The application server is indispensable. We 'd better prepare a lightweight database. The following is a brief introduction to these tools.
Web Server (servlet container.
Tomcat: http://jakarta.apache.org/tomcat/
Jetty: http://jetty.mortbay.org/jetty/
Common application servers include,
JBoss: http://www.jboss.org/products/index
WebLogic: http://www.bea.com/framework.jsp? Cntw.index.htm & fp =/content/products/Server
WebSphere: http://www-128.ibm.com/developerworks/downloads/ws/was? S_tact = 105agx28 & s_cmp = dlmain.
Tomcat, Jetty, and JBoss are all open source. Weblogic and WebSphere are leaders in the J2EE server and are expensive. However, developers can download free trial versions.
If you only want to learn servlet, Tomcat is recommended. It is a servlet officially designated by Sun and the reference implementation of JSP specifications. The most important thing for beginners is that it is relatively simple to use, has a complete set of built-in documents, and has a large number of users. It is easy to get help on the Forum if you have any questions. If you want to learn EJB, we recommend using JBoss, not only because it is open source, but mainly because the configuration is simple and easy to use. For example, for the database connection, for common MySQL, Oracle, ms SQL and so on provide the sample config file, directly take some small changes to the deploy directory can use datasource, it is easy to deploy J2EE applications. ear or. the war can be thrown to deploy. The only inconvenience is that it starts with jboss3.0 and its documentation starts to charge fees. However, some basic configurations are very easy to find on the Internet. After all, they are too popular. WebLogic is easy to use, but it is much larger than JBoss. It makes some common configuration work very simple through a powerful management interface. Compared with JBoss, JBoss has too many documents, which is a bit arrogant, for example, deploying one. the ear file, which is usually automatically deploy when we directly drop the applications directory under the domain. However, it is easy to scare beginners by reading its documents, I think this is a profound learning. As for WebSphere, it is not recommended for beginners. It is more difficult to use than the first two servers, and it consumes a lot of memory. However, this guy is doing well in the enterprise market. After all, he was born in a great place like IBM.
Database, the current common include PostgreSQL, MySQL, Oracle, ms SQL, DB2 and so on. The first two are open-source databases, which basically monopolize most of the database markets. I recommend MySQL for beginners to do EJB and JDBC exercises. The reason is very simple. Open-source software is free of money. There are many documents for users. Http://www.mysql.com/products/mysql /. PostgreSQL can also be considered, but domestic users are far less convenient than MySQL, so it is easier to ask questions on the Forum, http://www.pervasive-polics.com/downloads /. As for those heavyweight databases in the future, we don't have to worry about doing exercises. We can't afford the money.
After learning the specific technologies of J2EE, it is not a problem to perform basic J2EE development at this time. Now you should consider improving your code quality. Here I strongly recommend Martin Fowler <>, this book is not a very practical book, and the author is fully teaching you how to improve the quality of code, tell you what the bad smell of the Code is from the specific code and how to remove the bad smell. Many book reviews say so. This book is helpful to beginners and intermediate readers. At least a few programmers I have come into contact with who have recently studied programming, and their coding quality has greatly improved in the short term. Of course, the refactoring concept is not only applicable to Java, but also to all oo languages. The concept of refactoring is so deeply rooted that almost all popular ide tools today support refactoring. I would like to recommend another copy here <>. Programmers from C ++ know <> their position in the C ++ field. So far, there are still such interesting stories. c ++ programmers are divided into two types, one is read <>, and the other is not read c ++. Although the impact of this book on the Java field may not be so great, it is of great guiding value to Java programmers. The author is Sun's Joshua Bloch, designer of Java Collection framework. From the perspective of the JDK designer, the author will introduce you to his best practice. Instead of doing so, he will not point out some of the API design defects in JDK. The preface written by James Gosling, the father of the Java language, is "I sure wish I had this book ten years ago. Some might think that I don't need any Java books, but I need this one ". This book will make you feel that you still don't know much about Java. For example, we think the equals method of an object is very simple. Maybe you will reload this method for your new class every day, however, you have paid attention to the "self-inverse", "symmetric", and "pass" factors that must be taken into account during overload. Are you also careful to reload the hashcode method? If not, you are advised to read this book. After reading this book, you will feel closer to Java. Both of the above two books have been published in the Chinese version, and the next one <> has two versions of the Chinese version. The first translation was a little short. Later, the mechanical industry press commissioned Mr. Pan aimin to re-translate it. The same book has been translated twice in a row in the same publishing house. It also shows that the Chinese publishing industry still attaches great importance to this book.
At this stage, while reading a book, you can combine the source code of some excellent open-source projects. The Code style and comments of these open-source projects are worth learning. It's too lazy. Don't forget to have a JDK source code on hand. In fact, you don't have to look for source code. In actual J2EE project development, some excellent open-source projects are basically used. The framework may use spring, struts, and log mechanisms. Basically, jarkartacommons log or log4j will be used in unit tests. In combination with the project, read some of the source code, it can improve itself and help the project, so it may be appreciated by PM. How happy is it. Haha, It's a little far away. After a beginner's time, you should learn how to find a suitable Java book. After dozens of years, today's Java technology has become so complex that I believe that even a person who has spent all his life can never learn all the relevant Java technologies, what's more, new technologies are coming soon. Three years ago, no one would know that struts will become the de facto industrial standard of Web frameworks. 2 years ago, who would know that hibernate will be dominant today. Since we can't expect to learn all aspects of Java at one time, we can only learn what technology is needed in practice. But whether you can choose a good reference book will bring you twice the result with half the effort. Therefore, I think it is worthwhile to spend some time on choosing books. Otherwise, you will only spend more time later. Next I will talk about some of my experiences in choosing books, which is not necessarily correct. First, let's take a look at the authors. The authors of the books mentioned above are all famous in the industry. You can't make a mistake when choosing their books. If you read more books, you will naturally have a list in your mind, which authors are trustworthy. 2. Publishers and computer books, oreilly and Addison-Wesley are well-recognized publishers. For the currently popular Java technology, oreilly's <> series is a good choice. In addition, I will also go to the Amazon website (http://www.amazon.com/) book reviews, generally less than 3 star books I will not consider. Theserverside, Hangzhou. I would like to recommend to all Java learners. If my favorites can only store two websites, I will select java. Sun and theserverside. Here you can learn about the latest Java developments, learn the first-hand Java materials, and see the heated debate among Java experts (including industry leaders.
At this stage, the basic skills of Java developer should be well developed, and I will continue to learn it later. Before the end of this section, I will introduce oreilly in another book, because I think multi-threaded programming is a basic skill in Java, and everyone who wants to learn java well should have a good grasp of it.
Improve
At this stage, we should learn from the software architecture and framework layers. As an object-oriented Bible <>, this book has to be recommended. Needless to say, this role in the Object-Oriented field belongs to the Godfather level. No matter what OO language you are learning, whether you are using. Net or J2EE development, this book is a must-read on your way to the advanced level. <> The design pattern is discussed specifically for J2EE. Senior designers of Sun Java center in the book describe the mode of key J2EE technologies. Best Practices, design policies and proven solutions. This book is worth reading for everyone who wants to become a J2EE architect or designer. When learning the design model, it is recommended to look at the actual source code. For example, if you look at the JUnit source code, you can see a lot of elegant implementations of the design model. One of the authors, Erich Gamma, is the author of <>. As for the J2EE design model, Sun also opened up a dedicated space for compaction. As Grady booch said, the model provides a general solution to common problems, and the exploitation model is equivalent to a strong team of experts. If you have not studied, start now. In addition, for object-oriented methodology, the idea of extreme programming should also be understood at http://www.extremeprogramming.org /. For the specific implementation of the J2EE project, Rod Johnson's <> is also very valuable. This book shows us how to build J2EE applications with the simplest solution possible with the author's rich practical experience, the author puts forward this idea for the first time. In many cases, the J2EE application does not need to use ejbs at all. For the majority of J2EE developers that must be called ejbs, it is also a bit cool to say. Of course, as a member of the servlet and JDO expert groups, this is not what the author believes. Today, the Spring framework popular in the Java World originated from this book, and concepts such as IOC and AOP are even more widely spoken by Java developers. Finally, as an in-depth study of Java, it is also necessary to read the specification of Java technology.