grails (11) vaadin (11) meteor (6) java (4) elasticsearch (3) apple (2) centos (1) cloudbees (1) google analytics (1) gradle (1) heroku (1) javafx (1) javascript (1) jdbc (1) jug (1) logback (1) logging (1) mac os (1) management (1) mongodb (1) mongolab (1) mysql (1) twitter (1) ubuntu (1)

Saturday, October 29, 2011

Review of Java the Complete Reference, 8th Edition for Java 7

"Java the Complete Reference, 8th Edition", this edition has been updated according to changes in Java SE 7. The book is meant for Java developers on all levels. I will strongly consider this during the review.


Division of the book:
Part I. - Fundamentals of Java language 
Part II. - Standard Java API libraries 
Part III. - Java beans, Servlets, Swing
Part IV. - Examples - Applets & Servlets, Download manager 
Appendix - Javadoc
Part I. - Fundamentals of Java language

The first part starts with a history of programming languages - revolution of C language since 1970s and the birth of C++ as a response to a need of having better way to deal with a complexity. And finally, genesis of Java. I was in quite nostalgic mood while reading this part. Maybe there might be written at least something about Groovy, Scala or other related languages. It would be nice to see those new languages commented on by the author of the book.

Fundamentals of Java are explained in the usual way - primitives, loops, fields and so on. Also classes and instances are explained well - actually they are explain in a quite simple way (and God knows that is not easy). I am missing only one think in this area, there are no class diagrams when explaining inheritance or basics of Input/Output. I am pretty sure that Java developers should learn class diagrams from the very beginning. Moreover there are misleading class diagrams (e.g. in Exception handling chapter). So, you will have to buy other book to learn the class diagrams. 

I am quite confused about "Chapter 13: I/O, Applets and Other Topics". I don't know why there are Applets in Part I. that is called Java Language.
1. I think that Applets should be described in a separate section together with AWT and Swing. I think that would make more sense and it would be a bit better categorized.
2. The keywords "transient" and "volatile" should be explained in serialization chapter - not just after the Applets chapter.
3. The keyword "instanceof" should be somewhere close to the chapter dedicated to inheritance.

On the other hand, 14th chapter dedicated to the generics is done extremely well. 

Part II. - Standard Java API libraries

The second part starts with description of work with Strings. It is definitely well written and there is a complete description of classes and methods related to strings. I would appreciate also something about String literal pool.
There are also described classes from "java.lang" package, collection framework and other utility classes like Formatter, Scanner, Calendar, Locale etc. 

The Input/Output chapter contains a description and examples of how to use all the streams - thumb up! There is also a special chapter dedicated to NIO - it means that buffers, channels, new Path interface and other news are explained as well.

It continues with networking, applets, event handling, AWT, complex description of work with images, concurrency, regex, reflection, RMI and formatting utilities.

Part III. - Java beans, Servlets, Swing

The third part of the book starts with Java beans chapter. It contains an explanation what Java bean is and how to work with helper classes like BeanInfo, BeanDescriptor and others.

The Swing chapter. I have been using Swing to create desktop applications and applets - so I was really curious what author picked out to present in this book. The good think is that there is clearly stated that Swing is not implementing MVC and one should count with that during work with it. This chapter provides good basics of Swing and it is clear that it can't contain more than this. One could write a thousand pages book about Swing.

The last chapter provides basic preview of work with Servlets.

Part IV. - Examples - Applets & Servlets, Download manager 

It seems that this part is mainly for Java novices. They can download the source codes, read the book and play with the code.

Appendix - Javadoc

I think that this topic should be mentioned earlier then at the end of the book. Javadoc is too important to be left as just an appendix. Otherwise, I am happy it is there.

Conclusion

I have enjoyed reading the book because it gave me more info about new features of Java 7. The book is called "Java the Complete Reference" and it might be a bit misleading - because I am sure that not even thousands of pages are enough to show all the content of Java. I would recommend this book 

  • for junior developers planning to start with Java 
  • for developers who still need more information about Java features 
  • for those who are new in Java 7 (or even Java 6 or 5) 

Many thanks to Bettina Faltermeier from McGraw-Hill Professional for providing the book.
TextLab for Mac
Ultimate application to validate, clean and format JSON, XML, SQL, HTML.