Java, 一杯浓浓的咖啡伴你到深夜

The essential Java language library


Every programmer has certain books that he or she wears out by constantly referencing them as a professional. The following books should be on every Java language programmer's bookshelf. Books can be expensive, so this list is intentionally small, limited to the critical ones.

Thinking in Java (Bruce Eckel)

Thinking in Java, 3rd edition (Bruce Eckel; Prentice Hall PTR, 2002)
Eckel's book is an extremely practical book for learning about how to use object oriented well in a Java language context. Lots of code samples illustrate the concepts as he introduces them. The text is absolutely practical, from a person who doesn't think Java technology is always the right answer. Eckel has lots of experience with lots of languages, and has solid object oriented thinking skills. This book puts those skills in a practical Java language context. He?s also working on a new book called Thinking in Enterprise Java.

Effective Java (Joshua Bloch)

Effective Java: Programming Language Guide (Joshua Bloch; Addison-Wesley, 2001)
This the best book for understanding the principles from which good Java programs are designed. Most of this material is not to be found in other "learning to Java" books. For example, Bloch's chapter on overriding equals() is one of the best I've ever read. He also includes practical advice on using interfaces instead of abstract classes, and using exceptions intelligently. Bloch was Sun's Java platform libraries architect, so he knows the language from the inside out. In fact, he wrote lots of the useful libraries included with the language. This is a must-read.

The Java Programming Language (Ken Arnold, James Gosling, David Holmes)

The Java Programming Language (Ken Arnold, James Gosling, David Holmes; Addison-Wesley, 2000)
This is probably the best Java language primer book available. It?s not a formal specification, but a readable introduction to each language feature. It has the right balance of rigor and pedagogy, enabling someone who understands programming to wrap their head around the Java language (and its copious class libraries) quickly.

Concurrent Programming in Java: Design Principles and Patterns (Doug Lea)

Concurrent Programming in Java: Design Principles and Patterns, 2nd edition (Doug Lea; Addison-Wesley, 1999)
Not every developer needs to know about concurrency in such detail, and not every engineer is up to the level of this book, but there's no better survey of concurrent programming than this. If you?re interested, this is the source. Lea is a professional programmer at SUNY, and his work and ideas related to concurrency have been included in the JDK 5.0 spec (from JSR166), so you can be sure what he has to say about using the Java language effectively is worth listening to. He's a good communicator as well.

Expert One-On-One J2EE Design and Development (Rod Johnson)

Expert One-On-One J2EE Design and Development (Rod Johnson)
For newcomers to J2EE, this is the only book that really tells it like it is. This book is the result of years of experience of what works and what doesn't, and unlike a lot of other authors, Johnson is willing to say what doesn't. J2EE is often used when it's unnecessary overkill. Johnson's book can help you avoid that.

Refactoring (Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts)

Refactoring: Improving the Design of Existing Code (Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts; Addison-Wesley, 1999)
Fowler has written some of the most popular programming books ever published, including Analysis Patterns. His book on refactoring is the seminal work on the subject. Refactoring code is a neglected programmer discipline, but an intuitive programmer idea. Refactoring is improving the design of existing code without changing its results. It's the best way to keep your code clean, which keeps it easy to change over time. When do you refactor? Whenever your code 'smells'. Fowler?s book is full of example Java language code. Many Java language integrated development environments (IDEs), including IBM's Eclipse, incorporate Fowler's refactorings, using his names for each one, so it pays to be familiar with things like extract method.

Design Patterns (Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides)

Design Patterns: Elements of Reusable Object Oriented Software (Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides; Addison-Wesley, 1997)
This is one of the more famous books among professional programmers, and has become known as "the Gang of Four (GOF) book," based on the collective nickname of the authors. Patterns are reusable ways of thinking about and solving common programming problems. Learning patterns is a discipline. Using them well (or knowing when not to use them) is a skill. Ignoring them is a mistake. All of the examples in the book are in C++, but the Java language was born from that world, and it?s relatively simple for Java language programmers to relate to how to implement the patterns in the Java language. Being familiar with patterns, and knowing how to use them well, makes programming easier. It also makes communicating with other programmers easier, because patterns are a shortcut way to describe lots of related programming concepts that work together in a common solution to a common problem. Some of the more common ones, like Factory Method, are ubiquitous, even in the Java language itself. On the subject of using patterns wisely, you also might want to read Joshua Kerievsky's Refactoring to Patterns, which says you should let your code tell you when to implement a pattern.

Patterns of Enterprise Application Architecture (Martin Fowler)

Patterns of Enterprise Application Architecture (Martin Fowler; Addison-Wesley, 2002)
Enterprise development certainly presents more challenges than small, one-off projects. That doesn?t mean that all enterprise development challenges are new. In fact, more often than not, it has been done before. In many cases, Fowler's worked on projects that did it. His book talks about some of the common solutions, and offers guidance on usage, compromises, and alternatives. Fowler includes some familiar patterns here, such as Model View Controller (MVC), but he also includes some that may be new to you, like Page Controller for handling requests for specific pages or actions on a Web site. As with most patterns, once you read many of them, you think, 'I knew that already'. Perhaps, but it helps to have a common presentation of the pattern to refer to. That kind of reference is a superb help on large projects with multiple components developed by different people.

UML Distilled (Martin Fowler)

UML Distilled: A Brief Guide to the Standard Object Modeling Language (Martin Fowler; Addison-Wesley 2003)
UML is an important common visual communication language for professional programmers, but it's overused and grossly abused. You don't need to know much to communicate with UML. Martin's distillation gives you the essentials. In fact, the inside front and back covers give you almost everything you'll ever use on a regular basis. All of the code behind the UML examples in the book is Java code.

Test-Driven Development: By Example (Kent Beck)

Test-Driven Development: By Example (Kent Beck; Addison-Wesley 2002)
Test-first programming will revolutionize your programming, and can help you become one of the better programmers out there. Writing tests before you write code is an initially awkward, but powerful development skill. By writing tests first, you can keep your code simpler, and you can be sure it works from the start (practicing what he preaches, Beck co-wrote JUnit, the most prevalent testing framework for the Java language, test-first). Beck?s book is the definitive source, and the extended Money example is in the Java language. Beck walks through how to think test-first, which can be an initial barrier for many programmers.

The Pragmatic Programmer: From Journeyman to Master (Andy Hunt and Dave Thomas)

The Pragmatic Programmer: From Journeyman to Master (Andrew Hunt and David Thomas; Addison-Wesley 1999)
Being an object oriented purist has its advantages. In today?s complex world, you often have to compromise in order to get things done as a Java language developer. The guiding principle is to be pragmatic. Hunt and Thomas talk about how to do that, without compromising what?s really important. This isn?t a Java language book, but it?s a critical mindset book for Java language developers. For example, I don't know of a single programmer who couldn't benefit from the admonition to "fix the problem, not the blame" and to sign your work like a proud craftsman.

Peopleware: Productive Projects and Teams (Tom DeMarco and Timothy Lister)

Peopleware: Productive Projects and Teams (Tom DeMarco, Timothy Lister; Dorset House, 1999)
All of the other books on this list are at least somewhat technical. This one is not. In all of the technical jargon, and in the sea of acronyms, sometimes software developers and managers forget that people make software. DeMarco and Lister remind us of that fact, and why it should make a difference. This isn?t a book about a particular programming language, but every Java language programmer should read it. There are other good books about how killing programmers is counterproductive for managers, but this is one of the best.

Web sites

There are more Web sites than you could visit in a lifetime, that is, if you wanted to digest any of their content. An exhaustive list of sites with content about some aspect of the Java language would be ridiculously large. The following sites are tried and true.

Sun's Java Technology site

Sun's Java language site
This is Sun?s main Java language site. You will find yourself visiting this site very frequently as a Java language developer. The following links are particularly important, especially to new Java language developers:

  • New to Java Center
    New to Java Center
    The New to Java Center is a good clearing house for step-by-step links to Java technology resources. If you're new to the language, this is a great place to start.
  • Tutorials and Code Camps
    Java Tutorial
    The infamous Java Tutorial is here, along with other tutorials on various aspects of the Java language (such as Collections).

IBM developerWorks

IBM's developerWorks
This may seem shameless self-promotion, but developerWorks is a great resource for tutorials and articles about Java language tools and techniques. Content ranges from a beginner's guide to learning the language, to advanced concurrency techniques. You can search content by topic, and can browse by type.

The Apache Software Foundation

The Apache Software Foundation
The Apache site is home to many reusable libraries (in the Commons area) and tools to help Java developers. It?s all Open Source, so download what you want. Many extremely popular Java language libraries and tools (such as Struts, Ant, and Tomcat) began as Apache projects. The Jakarta area has most of the emerging Java language stuff.

There are several good Java language integrated development environments (IDEs). Eclipse (from IBM) is one of the newest, and is rapidly becoming the premier IDE for Java language development. It?s entirely Open Source, which means it?s free. This site contains all sorts of resources for learning about how to use Eclipse effectively. It also has information about the Standard Widget Toolkit (SWT), a lighter weight alternative to Swing.

Eclipse Plugin Central and EclipsePlugins

Eclipse Plugin Central and EclipsePlugins
Eclipse is based on a plug-in architecture. In fact, the Java language development components of Eclipse are plug-ins. But there are literally hundreds of plug-ins for everything from Web development to playing games within the Eclipse environment. These two sites list most of them, by category, and are searchable. They are excellent resources. If you use Eclipse, and want to do something new in your development environment, odds are good that there?s a plug-in for it, and that you can find it here. Both sites let people review the plug-ins, so you can get some information about which ones are good and which ones aren?t worth your time.
JUnit is the seminal unit testing framework for the Java language. The site contains the latest and greatest version, plus a huge number of other resources about testing (in the Java language and others) at various levels, for desktop apps, Web apps, J2EE apps, etc. If you want to find testing resources, this is the best place to start.
If you are (or will be) involved with Java language development on the server side, this site is a vital resource. You can find articles here on JBoss, J2EE, LDAP, Struts, and a host of other topics, and it?s fully searchable. They don't simply describe features of the Java language, or supporting libraries. They take it one step further to describe novel uses of libraries (such as using Jakarta's Velocity as a rules engine, rather than a templating engine). They also provide running commentary on the state of the Java language (a current article is titled Java is boring, by Tim Bray). One of the better common features of the site are matrix comparisons of Java language tools and products (application servers, etc.).

Bruce Eckel's MindView, Inc.

Bruce Eckel's MindView, Inc.
Eckel wrote several books about "thinking in" the Java language, Python, and C++. His Thinking in Java was particularly helpful to me as I was learning the language. It?s practical and to the point, with excellent insights about how to think in objects in a Java language context. You can download free electronic copies of all of his books at this site. He also has written many good articles, and he?s got links to all of them here (including articles on Jython, Java vs. .NET, etc.).
O?Reilley has published excellent books about programming languages and tools for years. Their Java-language focused Web site is just as good. It has articles on various Java language tools (like JDOM and Hibernate), different areas for different parts of the Java Platform (like J2SE and J2EE). It?s fully searchable. They have excellent articles and tutorials. The site is arranged by topic. Some examples include Java and XML, Java Security, Wireless Java, and Java SysAdmin. The site also has a link to the O'Reilley Learning Lab, where you can take online courses (Java language-related and otherwise). They aren't free, but many count toward college credit, so you get a convenient way to learn skills, and some credentials as well. Communities
There are multiple "communities" here, with subject-specific forums and articles. For example, the Java Desktop community has all sorts of stuff related to Java language development for the desktop. The Java Patterns community might be of particular interest as a portal for pattern resources from a Java language perspective. There is also a community for Java User Groups (JUGs), where you can find information about creating, joining and running a JUG.

posted on 2007-01-22 06:27 Scott@JAVA 阅读(511) 评论(0)  编辑  收藏 所属分类: Jave SE 6Java EE 5