Recommended reading for Java programmers to architects

One of the worst things about being a Java programmer is that you have too much to choose from and too many books to read. I’d like to pick out some of the technical books I’ve read and, in order of importance, recommend them to you, especially Java programmers who want to keep improving their skills.

First, Java programming into the class

For programmers who have no Java programming experience to get started, just read any introductory books are the same, this stage requires you to quickly master the basic syntax and basic usage of Java, the purpose is “swallowed without understanding”, first get familiar with Java again. Go through Java syntax quickly in a short amount of time, write as much code as you can, and “know what’s going on.”

1. Ideas for Java Programming

After you have some Java programming experience, you need to “know why.” This time “Java programming ideas” is a good book to let you know why, it has a more clear explanation of the basic object-oriented knowledge, basic Java syntax, basic class libraries have a more clear explanation, can help you play a good Foundation of Java programming. The disadvantage of this book is really too thick, also more wordy, not suitable for modern fast pace of learning, so read this book to know how to choose, not every chapter and every section is worth a look, pick the key in-depth look can be.

2. Chinese version of Agile Java

This book was given to me by the publishing house. As soon as I got it, I shelved it and put it in the bookcase without turning over a single page. But when I was cleaning up the bookcase two days ago, I took it out and turned it over, and unexpectedly found it was absolutely a good book! One of the features of this book is unit testing and TDD throughout the book. In the process of teaching Java various important basic knowledge, it will subtly influence your programming thinking to become agile and TDD. In addition, this book is a new book, based on JDK5.0 syntax explained, to learn JDK5.0 new syntax is also good. There are choices for the book is very proper, Java language libraries, after all, large, what can say too much, choose the content of the book and the amount of content are all very well, can let you with the least amount of time to master Java is the most important knowledge, and good programming ideas, by the way, it’s a rare book. Although the author himself has positioned this book as an introductory level, I am not sure whether this book is a little too deep to be used as an introductory level. I also plan to read this book and learn more when I have time.

Second, Java programming advanced class

To lay a good Java foundation, but also need more practical experience accumulation, I think there is no shortcut. There are two books worth reading at this stage of your programming career to develop good programming habits and improve the quality of your code.

1. Refactoring to Improve the Design of Existing Code

This book is very famous, no more introduction, you can read more in your spare time, more and their practice mutually confirmed. This book has a subtle influence on you.

2. Test-driven Development by Example

The book’s biggest feature is that it is very thin and seems to have little burden. You can find a weekend afternoon, read it, do it, and finish the book in one afternoon, all the examples of the book run out. The purpose of this book is to develop TDD thinking in action.

The Path of Java Architects

By this stage, you should be very proficient in Java programming and have a good programming philosophy and habits, but you may not have a good grasp of the overall architecture of the application. Now is your first step towards becoming an architect.

Expert One-to-One J2EE Design and Development

This book, Rod Johnson’s famous book, is a classic, and from this book came the code that gave birth to the springframework. But it seems there is no Chinese translation of the book.

Expert one-to-one J2EE Development without EJB

The book was translated by gigix, a team of industry experts who served as a disciple of JavaEye, although his signature was certainly JavaEye. Both of these books are Rod Johnson’s classics and must read for Java architects. In what I recommend these books I’ve ever seen the most carefully, the most serious book, I was reading the book is almost forget all about eating and sleeping in reading, wiil have a childhood of jin yong’s martial arts novels, the book says content and their experience knowledge one by one, was extremely insightful summary, after reading this book, I have been through the meridians, I feel like I’m getting better. But then I read some other people’s comments, and it seems that the reading experience is not as high as mine, maybe because everyone has different knowledge accumulation and experience. At that time, I happened to have accumulated enough experience and knowledge, but I had not systematically organized and formed a complete knowledge system once the book was sorted out.

3. Enterprise Application Architecture Patterns

Another famous book by Martin, but I only skimmed through it, not read it carefully. This book seems to be a better read for framework people, such as if you are going to write an ORM yourself. It doesn’t matter if you don’t look at it, but if you have time, I recommend that you take a look at it carefully. It will let you know why the framework is designed the way it is, so that you can be promoted to the perspective of the framework designer. I’ve always been a fan of Martin’s books, but I’ve never read them as carefully as I read Rod Johnson’s.

4. Agile Software Development Principles, Patterns and Practices

Uncle Bob’s classic, agile’s classic, is a special book, not so much about the software development process as it is about software architecture, and it has a lot to say about the various patterns of object-oriented software development, so I think I don’t need to read GoF’s Design Patterns.

Software development process

Understanding the software development process is not only about improving good programming habits among individual programmers, but also about enhancing teamwork.

1. UML Essentials

UML is not necessarily related to the software development process, but is a tool that software teams need to communicate and write software documents. But there aren’t many diagrams in UML that are actually useful, and reading this book is enough. There’s no need to read the UML User Guide or anything like that. To remind you, the Chinese translation of this book is very bad, I suggest conditionally read the Original English.

2. Parsing Extreme Programming to Embrace change XP

This is the second edition of Kent Beck’s classic, both in English and Chinese. There’s nothing to tell. Must-read books.

3. Unified Software Development Process UP

In fact, UP and Agile do not necessarily conflict, UP also emphasizes iteration and testing, but UP emphasizes documentation and process driving, which agile does not take. In any case, UP is worth reading. After all, few enterprises in China really accept Agile, so you still need to arm yourself with UP, even if it is wearing UP XP.

4. Agile Modeling AM

Scott Ambler’s classic book, which is very Progmatic, tells you how to be both agile and UP, combines agile and UP, and gives a lot of Progmatic advice and practices. You can put extreme Programming to Embrace Change, Unifying the Software Development Process, and Agile Modeling together, see the differences between XP and UP, and then see how AM unified XP and UP, put these three theories together, and form your own theory system, then you can write a book.

Software project management

If you are suddenly promoted to project manager and you have no project management experience, you will not know the bottom line. If you feel that you are not good at project management and want to improve your project management skills, then taking the PMP is definitely a long way off.

Rapid Software Development

It is also a masterpiece. With a book in hand, so to speak, you have a senior project management advisor to advise you and no longer have to worry about being incompetent. This book is not about management theory, in the actual project management, these theories are not solve problems, the book is a little similar to the idea of “software project”, lists the various problem facing a variety of software project, and how should the ideas to solve the problem, you only need a little flexibility, find their line.

Six, summarized

I don’t include popular software framework learning books like Struts, Hibernate, Spring, or AJAX on this list of recommended reading books. Because they tend to go out of style, and most of these books have a lifetime long enough to be worth buying and collecting.

1. Java language basics

When it comes to learning the basics of the Java language, Bruce Eckel’s Thinking in Java is the book most people recommend. It is a fairly deep technical book, and hardly any other book on the basics of the Java language. Its author, Bruce Eckel, is known on the web as a genius speculator. His book Thinking in C++ won the SoftwareDevelopment Jolt Award for best book in 1995. Thinking in Java was named Java World’s 1999 “Favorite Reader’s Book” and won the Editors’ Choice Book Award. Since 1986, the author has published more than 150 computer technology articles, six books (four of them on C++), and hundreds of lectures around the world. He is the author of Thinking in Java, Thinking in C++, C++ Inside & Out, Using C++, and Thinking in Patterns, He is also the editor of the Black Belt C++ collection. His book has been described by readers as “the best Java reference book… Absolutely stunning “; “The wisest choice to buy Java reference books”; “The best programming guide I’ve ever seen”. The author’s extraordinary talent, and his ability to cross languages, has made him one of the 10 people most associated with Java in the past decade.

Thinking in Java covers all aspects of the Java language, and has been described by many veterans of the language as “a pretty ugly book about the Java language.” The book goes into a lot of detail about the Java language, and every aspect is quite profound. Through this book you can see the “ugly” Java language.

There are many, many videos on the Web explaining the Java language, some of which are rubbish. “Weng Kai – JAVA Language” may be the only choice for you to learn the basics of JAVA language. This lecture is basically based on the book “Thinking in JAVA”. There are many interesting jokes made by Weng. I was lucky enough to learn from that video. It includes 30 lectures and I have read it three times in total.

However, I don’t recommend Thinking in Java for beginners. I recommend Prentice Hall PTR’s Core Java 2, currently in its seventh edition, as Core Java 2 Technologies. You can download it online. Oreilly’s Java in a Nutshell is also a good choice. After reading the above two books, you can watch Professor Weng kai’s video, and then you can study Thinking in Java.

Java data structures

There are very few books out there on Java data structures themselves. Roughly APress’s Java Collections, Data Structures in Java by Jones and Bartlett, Object-oriented Data Structures Using Java, and Data by Prentice Hall Structures and Algorithms in Java (Dec 19, 2005) Data Structures And Algorithms With Object-oriented Design Patterns In Java. Luckily for me, my first Book in English was Java Collections by APress (which probably doesn’t even have a Chinese version in China — you can only download the English version). It was a good, methodical, simple book that was completely introduced to the Java Collections API. There are examples of extended apis. This is the only good book I recommend you learn about Java data structures. There seems to be a Chinese version of the other two books by Jones and Bartlett. You can read it if you want.

After learning about the API, you can take a look at the corresponding classes in the java.util package. But you won’t be able to fully understand the Entire Java Collections Framework until you’ve studied design patterns. The Java Collections Framework uses many well-known design patterns: the Iterator pattern, the factory method pattern, the decorator pattern, the adapter pattern, and so on. By studying the source code for the data structures in the java.util package, you can get an idea of the design of the infamous Properties class, and you may have the basic ability to design simple data structures.

Learning is endless. After Sun provides the Java Collections Framework, you can explore Apche’s other Java Collections Framework, which is very interesting. Two complementary frameworks.

Before we get to Java Collections, let me remind you that There are three main parts of Java Collections: Interfaces, implementations, and algorithms.

1. Interfaces include List, Set, Queue, and Map. List, Se T, and Queue are subinterfaces of the Collection interface.

2. Implementations are primarily concrete classes that implement these interfaces. For example, ArrayList, LinkedList, Stack and Vector implement the List interface; Implementation of the Set interface HashSet, TreeSet and LinkedHashSet; Implement PriorityQueue, SynchronousQueue, etc. Implementation of Map interface HashMap, TreeMap, Hashtable, Properties, WeakHashMap and so on.

3. The algorithm is mainly provided by the Arrays class and the Collections class, which is the core of the algorithm of the entire Java Collection Framework. Support various types of sorting, search and other common operations.

Java Collections contains two versions of data structures, primarily those that supported synchronization previously and those that did not.

The Java Collection Framework supports sorting using the Comparator and Comparable interfaces. Provides both old and new versions of iterators, iterators and Enumeraton, and how they are converted.

The Obserable interface and Observer classes in the java.util package are at the heart of the Explorer pattern.

3. Java IO

There are only two books on IO from Oreilly Publishing, both by Elliotte Rusty Harold. The style of the two books is basically the same. The recommended reading is the first edition of Jvava I/O, which is relatively simple, relatively focused and full of examples. The second edition was published abroad in May this year, and fortunately I downloaded the second edition on the network, which is extremely detailed — 726 pages of the big (I took two weeks), this time NIO and IO together, but also including J2ME part, but the serial port, parallel communication part of the class library support is not enough, I can not actually operate.

Along with the first edition of Jvava I/O, Oreilly also has a copy of Jvava NIO, which is also very good.

After reading Jvava I/O and Jvava NIO, you can explore the source code in the http:// java.io package. Before you dive into the source code, let me give you a hint:

Java IO packages include:

1. There are two types of streams: Byte Stream and character Stream. There is no substitute for or superior to each other in these two streams.

2. Two kinds of symmetry: 1. The symmetry of byte stream and character stream; 2. Symmetry of input and output.

3. A bridge: InputStreamReader and OutputStreamWriter that turn byte streams into character streams.

It must be noted that:

1. PipedInputStream and PipedOutputStrem are two interesting classes.

2. Buffered streams are the classes we use most often.

The most famous use of the Decorator pattern in Java is for IO design. Carefully study the relationship between individual Filter flows and specific flows, and read design pattern books. I’m sure you’ll find something.

4. Learn IO package, is the study of NET package, RMI package…… The foundation of oh!

4. Java database

Database books too many too many, too bad too bad! JDBC Recipes A Problem Solution Approach by Apress is A very good book. It was published at the end of 2005. It’s not necessarily worth reading in Chinese — there are often terrible translations of foreign books in China.) But we’re really lucky that there are electronic versions available online. It’s worth a look. The first book I was satisfied with, the Java Database Bible by Wiley, is a good one! Sun’s own JDBC API Tutorial andRefernece, an introduction to the JDBC API, is also good. My second JDBC book explores this API.

For now, though, these are relatively shallow API books. I will bring you the opportunity to introduce the JDBC API and JDBC implementation of the internal details of the book! I will try my best and hope to get your support!

A tip for those of you who are learning JDBC:

JDBC learning and using is mainly the API, its use process is also extremely simple, the following is the general process of using JDBC:

1. Load a database Driver (Driver Class), usually using class.forname (” Driver Class name “);

2. Connect to the database

The Connection con = DriverManager. GetConnection (url, username, password);

Statement STMT = con.createstatement ();

4. Execute operation — Result rs = stmt.executeQuery(” SQL query “);

5. Processing result —

while(rs.next()){

String col1 = rs.getString(1);

}

Simple!!!! The general changes that can be made throughout JDBC are:

1. There are three types of Statement that can be created from a Connection object, PreparedStatement, and CallableStatement.

2. Multiple types of ResultSets can be created: one-way movement and free movement are supported; Renewable and non-renewable; Support for different levels of trading… .

3. Batch processing of data input.

4. Operations on special types of columns (Blob, Clob, Arrary and Ref, Struct) in the result set.

5. These special types of entry into the database.

6. Operations on special result sets (CachedRowSet, JdbcRowSet, WebRowSet) in javax. SQL package.

7. The rest is a DataSource. A managed object in J2EE

Simple!!!! I believe you will conquer JDBC soon.

5. Java network programming

Network programming – a mysterious and challenging direction. But before we talk about Java network programming, first of all, thank the developers of Sun Company, because their genius of the idea, full of intelligent architecture, so that the majority of Java programmers to learn Java network programming is extremely easy.

O’Reilly’s Java Network Programming, now in its third edition, is one of the most popular books on Java Network Programming. There is an electronic version of the third edition on the Internet, published abroad in 2004, 706 pages! Very full, more in-depth, too in-depth may be due to Sun some things are not completely open, so it is not good to talk about, interested can download to see! The second book is Java Distributed Computing, published by O’Reilly in 1998. The basic part is more detailed, and the following examples are worth studying.

A hint before you read these books:

Java network programming is actually relatively simple and very quick to get started. Java network programming mainly includes two parts: 1.Socket; 2. The URL part. But part two also builds entirely on part one.

1. Sockets include the Socket of the client and the ServerSocket of the server. There are also DatagramSocket and DatagramPacket, which correspond to the UDP communication protocol. In short, the Socket part is the foundation on which other advanced protocols are built.

2. URL class is a network resource locator, usually with specific network protocols such as HTTP, FTP, Telnet… Related. Through this class, network resources can be connected, and network resources can be read in the form of InputStream in IO package through its openStream. With its OpenConnection method, you can open a connection on which you can write as well as read.

Java network programming generally includes the above two parts. Network programming is very closely related to the IO and multithreading sections, which you must have a good understanding of before studying this section.

Now you can explore the source code for this in the Java.NET package! It is too early to examine all the source code. Included throughout the NET package: ContentHandlerFactory, URLStreamHandlerFactory, URLStreamHandler, URLClassLoader and other auxiliary classes, which constitute the framework of Java.NET network programming, by studying its source code, Not only will you be able to quickly understand the Java.NET package, you’ll also be able to lay the groundwork for extending the package later, and you can even apply this mindset to your own projects.

At this point you should know about 60% of the Java.net package, and you can use a decompiler like JDecompiler to open rt.jar in your JDK installation directory \ JDKXXX \jre\lib, and open its Sun.net package with a WinRAR or something like that. Decompile all files, which is the details of how the URL class works. After studying the Sun.net package, you will be familiar with the whole network programming.

It seems that we are already proficient in network programming. In fact, it is not, just started, if you want to go deep, please continue! Many excellent network programming libraries and even software on the Internet can “add skills” for us. For example, Apache HttpCore and HTTPConnection are two HTTP protocol-related libraries; JGroups is a necessary library for studying distributed communication and group communication. Then we can look at P2P software packages, such as Sun’s JXTA, which may be the future standard for point-to-point communication on the Java platform. And then you can get really mature and use the wildly popular P2P software Azureus! www.sourceforge.net can be downloaded!

A journey of a thousand miles begins with a single step. Just do it! So far I have only studied the NET package, the others will be further studied in the near future. Sun for some reason has not disclosed other implementation details of NET, while allowing its source code to be studied in written form and its unpublished implementation to be written into the book, I would love to have a Java web programming book to eat into the audience!!

6. The Servlet and JSP

Servlet, JSP books are everywhere! There are only two or three books worth recommending. Servlets and JavaServer Pages: The J2EE Technology Web Tier by Addison Wiley is a very thick book. Published abroad in 2003, 784 pages, relatively complete, there are many examples, especially the eighth chapter Filter, several good examples. None of the other books I’ve seen on servlets and JSPS go this far! (Maybe I didn’t see it). O ‘Reilly’s Java Servlet Programming and Java Server Pages are relatively easy to read.

Before you get into servlets and JSPS, a word of caution:

Essentially a Servlet is a server-side program that implements the Servlet interface and is deployed on the server side. It can be written like any other Java application, it can manipulate databases, it can manipulate local files, it can connect to local EJBs… The general flow of writing a Servlet program is as follows:

1. Inherit an HttpServlet class;

2. Overwrite doGet and doPost methods;

3. Operate the method parameters HttpServletRequest and HttpServletResponse inside the override method.

4. Read requests using HttpServletRequest. With HttpServletRequest you can manipulate Http headers, get the request method, get the request path, get the request string, and get information about the request client. Most importantly, you can get cookies and HttpSession objects.

5. With cookies you can manipulate sweetheart objects or write them to HttpServletResponse.

6. You can use HttpServletResponse to output information to the client. HttpServletResponse allows you to write various types of headers, add cookies, redirect other urls, and send Http status codes to clients.

7. Use HttpSession to do whatever you want in the session.

The Servlet also provides events and event listeners (simple observer mode). There are also filters and wrappers (ServletRequestWrapper, ServletResponseWrapper) — the use of simple streams and the use of decorator patterns.

Learn Sevlet, JSP must be deployed to the server, remember the usual file deployment steps and parameter Settings and how to use in the program.

With a complete understanding of servlets, learning JSP is relatively easy! Jsp is based entirely on servlets and is designed to cater to programmers who like to embed scripts in Html documents in web programming languages such as PHP. It’s also pretty easy to learn!

Everything seems so calm, simple and studious! There is a complex mechanism behind the simple appearance. To get to the bottom of servlets and JSPS, you need to study the implementation of open source software such as Tomcat. It is nothing more than a server that, after a client sends an HTTP request to the server using a web page, turns the HTTP request into a corresponding HttpServletRequest object and invokes your Servlet. In your Servlet you must have handled the HttpServletRequest, and at the same time handled the HttpServletResponse, the server will send the HttpServletResponse to your browser as required by the HTTP protocol. The Jsp page on the server side is requested by the client, Tomcat will use compilation software, using the template in javax.servlet. Jsp package, compile this Jsp file, after compilation is a servlet! The following operation is exactly the same as the Servlet.

On the basis of servlets and Jsp, so called advanced technologies: JSTL, Struts… Nothing more than a few tags and the use of MVC patterns.

Move on! Victory is ahead!!

7. A multithreaded

A seemingly mysterious direction that is very easy to learn and difficult to master!

I recommend two books that I feel good about. The first book I read was Java Thread Programming by Sams (1998). It was extremely well written and very easy to read. I read the notes often when I had time! To know how to see for yourself! The second OReilly Java Threads, published three times, the latest edition is 2004, there seems to be Chinese version in China, I recommend you to read the English version. The book covers N directions related to multithreading, such as IO, Swing, Collection, and so on.

Give you a hint! There are not many multithreaded classes in the Java class library, mainly including Thread, ThreadGroup, ThreadLocal and InheritableThreadLocal classes and a Runnable interface. Keywords synchronize, volatile; And wait, notify, and notifyAll methods for Object objects!

1. Thread is the core class of multithreading, which provides a series of methods to create and manipulate multithreading.

ThreadGroup is a utility class that manages threads.

ThreadLocal and InheritableThreadLocal provide threads with a safe-like class that stores Thread objects!

例 句 : Say no more Runnable!

5. Synchronize is the heart of synchronization methods and blocks. When this method is called by multiple threads, only one thread can use it. The other methods block to ensure the integrity of the internal state of the object being manipulated. When a thread calls a method or block with Synchronize, it obtains an object lock for that object. When operations in the block are complete, the lock is released so that other objects can continue operations.

6. Wait, notify, and notifyAll provide effective wait/notification mechanisms. Every object in the Java language has a rest room, where any thread can rest and release the object lock if the state of the object it operates on is not satisfied. When other threads manipulate the object, they wake up the threads in the lounge, which then check the condition and perform the action when the condition is satisfied.

Multithreading is roughly so much foundation! Simple! This should not be enough for a real programmer, for a real grasp of multithreading, please study the java.util.concurrent package! The work of Doug Lea, originally an open source conformance programming library, was incorporated into the Java Class Library by Sun. There is also another version of this library on the author’s website! Good stuff to study! This package is used by open source software such as Hibernation and OpenJMS!

8. Design patterns

When it comes to design patterns, most people would recommend GOF’s book, which is a five-star recommendation on Amzon. However, I don’t recommend this book for new Java learners, especially beginners. The main thing is that the examples in this book are mostly C++, and many details are not explained clearly enough.

The first book I recommend to you is Dr. Yan Hong’s “Java and Pattern”, which is the first book about design pattern written by Chinese people. It is more interesting and integrates a lot of Chinese culture and concepts, with many examples and class diagrams, and is relatively simple! Very good primer — big one again!

Secondly, I recommend a set of three books of Pattern In Java published by Wiley Publishing House. I just read the first one, and it seems that the second one is not good, while the third one is quite good.

The third is the Chinese translation version of the multithreaded mode (very rare Chinese translation version) China railway publishing house published in 2003 “Java multithreaded design mode”, the multithreaded mode is very simple, with a large number of legends, each chapter has exercises, finally have the answer! It’s how I started studying multithreaded patterns!

The fourth book, “Head First Design Pattern”, published this year in the Head First series, inherits the advantages of the Head First series of books, a large number of class diagrams, rich examples, interesting annotations, worth buying!

Second, in the J2EE direction you can study and read Addison Wesley’s 2002 Patterns of Enterprise Application Architecture, a book by many of the biggest names in Enterprise message integration! J2EE PATTERNS SL500 from Sun is also great! I belatedly recommend Amzon’s 4 1/2-star Holub on Patterns, the master’s work, which provides a good example to study, but should not be read by readers who are not familiar with the four books above! May make you more tired!

I learn design mode through a very tortuous route, front and back to see about 20, Dr. Yan Hong’s “Java and mode” I saw 4 times, but also exclude my first time basic did not understand to see! I remember that the teacher taught us the book of GOF in the first year of graduate school. As an elective course, I was in the last class with the masters and PHDS of the computer department. There were 40-50 students in the class, but no more than 3 of them understood it, and I didn’t understand any of it (the basic knowledge was poor — mainly I didn’t know C++ language at all). I thought MY understanding of the Java language was ok, so I borrowed Java and Patterns, and still barely understood it. Fortunately, when I was in the third year of graduate school, I listened to teacher Rao Ruonan’s lecture on Java OOP language. After I understood three design modes such as combination book mode, I became strongly interested in other modes and had a desire to conquer them! After work, the first book I bought was Java and Pattern. It took me 2 months to study this big book with more than 1000 pages for the first time, and it took me 15 days for the third time. I took a lot of notes! It’s been going from there.

Choose the right books and immerse yourself in research. I believe it will soon be introduced!

Learn the Java language in 8 easy parts. This is just the beginning of our exploration of the Java language! These all understand at best a Java programmer just, the road behind is very long very long! We can continue to explore the source code for database implementations, the source code for Servlet servers, RMI, EJB, JNDI, aspect-oriented programming, refactoring, ANT tools, Eclipse tools, Spring tools, JBoss, JOnAS, Apache Geronimo and other J2EE servers! Research these and you may become an excellent J2EE Architecture! You can continue with profilers, compilers, JNODE (an operating system written in Java)…

I have a wechat official account and often share some Java technology-related dry goods. If you like my share, you can follow me by searching “Java leader” or “Javatuanzhang” on wechat.