Dennis Adams Associates Limited. ensuring that Information Technology systems are Production-Ready.

Book Review: Java 2 Primer Plus

By Steven Haines & Stephen Potts. Published by SAMS
ISBN: 0-672-324-15-6. UK Price 32.99


Essential Reading for anyone wanting to understand Java

The world is full of Java Books. Not only that, but there is a huge amount of Online material, including the excellent Sun Developer tutorials (see for example, this lesson on how to write a simple servlet). So why buy this book ? The simple answer is that I have found it to be the best guide to Java I have ever seen - bar none.

Target Audience

The bold claim of this book is that it can be read by readers new to Computer Programming, Existing programmers converting to Java, and experienced Java programmers who want to gain a deeper understanding of the language. That is a tall order.

In my opinion, a person with no previous programming experience might struggle with this book. Having said that, there are very few books which can take people from zero knowledge through to grasp complex programming concepts. At the same time, I would suggest that if someone has no previous exposure to the concept of Object Orientated Programming, they might struggle with the concepts. Nevertheless, OO is very carefully introduced, via the previous chapter about Methods, and going on to discuss Classes and Inheritance, before tacking Interfaces. This book is ideal for anyone who has come across Java before, has a general understanding of OO, and really needs to grasp the language in more detail, and write real code.

Building Java solutions systematically

There are four main Parts in this book. The first is a Foundation, which includes (yawn!) keywords, datatypes, flow controls etc. The second Part is a very thorough review of Object Orientated Programming, as implemented in Java. The third Part looks at the Abstract Windows Toolkit, Swing etc. So comprehensive is each Part that they could almost be read stand-alone. For many people, the chapters on AWT and Swing would be of little interest, for example.

The final Part of the book discusses Web Technologies. This includes Servlets, JSP, and Custom Tag Libraries. There is one chapter on using Component-based JSPs and Beans. What is missing, unfortunately, is any real material on Enterprise Java Beans, and the J2EE model. True, there are other Java books by SAMS which cover J2EE in detail. But I would have thought that this topic required a bit more treatment. After all, most Java programmers will be expected to build things within a J2EE context.

There are also chapters on XML, and a very basic introduction to Model-View-Controller and Three-tier architecture. I have not read any references to Patterns, but I guess this would be covered in the other SAMS publications.

Throughout this book, the authors have build systematically on the previous foundation. So the chapters about Servlets guide you through building a basic Servlet that extends HTTPServlet, and then increasingly builds up the complexity.

But this is not just a case of more code for the sake of an application. Each new iteration is used to introduce meaningful new concepts. This approach has a massive confidence-building effect.

The style of this book is just urging readers to fire up their browser and start downloading the latest JDK, Tomcat, XML Parsers, etc. etc. Once you have written one bit of code, you find yourself captured by the idea of "just change this", and then you are into another area of investigation. It's completely compelling.

Some mistakes to watch out for

A word of caution, however: because things change so often in the web, you cannot always trust the quoted URLs as much as you would like. If you are going to install Tomcat, for example, you need to put the book to one side, ignoring it's instructions, and be guided by the download docs instead. And don't expect to compile Servlets unless you have copied the servlet.jar file into your RJE external library directory....

Another area to watch is the whole section on XML. It looks as if this chapter was written in a different style to the others, because it reads differently, and there is an errors in one of the DTD definitions. If you don't notice it, you will be unable to run any of the parsing code

The cumulative effect of these errors, though, is to encourage the reader to find out for themselves about how to do things. Maybe that is why there were introduced (??!!??)

Other Reference Books

It would not be appropriate to leave a discussion on Java without referring to one of the other seminal books on this subject. This is Java in A Nutshell, By David Flanagan Published by O'Reilly. I have used this book alongside the SAMS publication, and have found that they complement one another very well.






click here to purchase this book from amazon.co.uk

Recommended 100%

Book Reviewed by Dennis Adams in January 2005.

Back to Book Review List
In Association with Amazon.co.uk

    Home     Search     About Us     News Reviews     Book Reviews     Management     Technical     Register

Dennis Adams Associates
114 Pinner View, Harrow
Middx. UK. HA1 4RL
tel: +44 (0)845 055 8935
fax: +44 (0)845 055 8935
email:info@dennisadams.co.uk
http://www.dennisadams.co.uk
(c) Dennis Adams Associates Limited: 2004-2010