[
Home -
Software -
Articles
]
Java and Object Oriented Development - a recommended learning path
I don't like those extremely long lists of books or links. You see
them at readings on university for example. There they usually consist
of a list of all more or less famous books that were ever written about
the theme of the reading. When someone from a lower semester asks me
which books to use for a certain reading I can only recommend about
two books in most cases.
On this page you will only see recommendations for the really good
sites / books.
Getting started
Literature
In my opinion there are only two books / tutorials in question.
-
Thinking in Java is a
thorough introduction to object-oriented programming using Java
as the example language.
Useful exercises are at the
end of each chapter. Don't skip them, unless you prefer to make
your own sample programs about everything you read! (Store such
samples in a special place where you can look them up whenever you
need them, for example a directory "reference" with
small programs like "ArrayExample",
"InheritanceExample" and so on.)
The chapter 16 and the following chapters are
a must, even when you choose to use a different book / tutorial for
the rest! The 3rd edition can be downloaded. For the 4th edition
there are free sample chapters. Note that the 4th edition
addresses the important changes in Java 2 5.0! It is not recommended
to learn only with the 3rd edition. A possible free combination
is to read the free sample chapters of the 4th edition
and chapters 16 and following from the 3rd edition.
-
The Sun tutorial is
a valuable addition to "Thinking in Java". It is not as
wordy as "Thinking in Java", and it certainly provides
a quick and easy start.
It tells far less about object-oriented programming than the book
above does, but it covers much more of the Java core API.
-
Fundamentals in informatics are required as well. They can be
acquired by studying informatics at a university and finishing
with a bachelor, master, diploma or similar degree.
Theoretically a self-education works just as well, but don't be
tempted to skip things like the fundamentals of mathematics,
analysis and linear algebra, or other programming paradigms
like functional programming. Here is an excellent
introduction to computer science / informatics and functional
programming at the same time:
http://www.informatik.uni-kiel.de/~rub/SkriptInformatik.ps.gz (German).
It's a good start that provides an overview. Instead of ML / SML
you may want to try the examples in Haskell, which is newer and
has (almost) only advantages over SML.
Tools
Sun JDK,
editor (good ones include vim, gvim, emacs, xemacs). For a long time
I thought that it were merely harder to learn when
one starts with an IDE from
the very beginning, but after I observed many people who did so I am
sure that it is impossible to ever become good at Java with an IDE from
the very beginning. So no Netbeans, Eclipse, Intellij Idea or similar
environments until you
have some skill. See the FAQ of Tony Morris for details.
Advanced literature
General Java programming
There are many books about Java, but only one is a must-have:
"Effective Java" by Joshua Bloch.
After finishing the appendix
of "Thinking in Java" there are basically two ways to go:
"Effective Java" or "Design Patterns".
There are many
sample chapters available for download. Only glance over the
following items, because they don't fully apply to Java 2 5.0:
Object-Oriented Design
One book is a must-have: "Design Patterns" by
Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides.
In my opinion the first chapter is particularly valuable and timeless.
Regarding the third chapter, the following design patterns are
considered controversial these days, because they compromise with
the principles of programming to an interface (see chapter 1) or
rely on concrete inheritance (see also my Design Principles article):
-
Singleton
-
Template Method
The same problem applies to some code samples and flavours of certain
patterns.
My two cents about Object-Oriented Design ...
... are found in the Design Principles article.
Enterprise Computing with the JavaEE
If for some reason you have to work with Java EE I recommend these
resources (plus references like
the specifications and API documentations):
-
Start with
Sun's general resources
for Java EE, including the
FAQ.
-
The Java EE 5 Tutorial teaches good
practice and has a good coverage on Java EE.
-
For EJB only you can use "Mastering EJB" by Ed Roman
(free download or buy the book).
The general Java and OO style
in that book differs a lot from my opinion, though.
-
For Servlets and JSP only you can use
"Core Servlets & JSP" by Marty Hall (book).
Use the latest editions only for such transient pieces of
technology!
Rare goodies about various topics
Effective painting with AWT or Swing
This article describes precisely how the AWT and the Swing
painting mechanism works and how it should be used.
java.util.prefs
This article is a brief introduction to the Preferences API.
Creating HelpSet Data and Navigation Files for JavaHelp
Ironically, JavaHelp is the 2nd party library with the single worst
help / documentation. For the old version there once was a
book named Creating Effective JavaHelp. It offers a free sample chapter
which describes how to
create HelpSet data and navigation files. The
files of the example used in that chapter and other example
files are available for download, too. The chapter also contains
a very short, very simple introduction to XML.