Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaBeans book review

We picked three winners -- now let's see how they stack up

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
There's a growing stack of JavaBeans books on the market. Their quality ranges from excellent to execrable, and it's hard to know which book will meet your needs without buying one. This month, I'll help you out by taking a detailed look at three JavaBeans books. I chose these books more or less at random, and I got lucky: they're all excellent books.

Rather than comb through these well-written volumes looking for things to pick apart, this review will focus on their overall content. I'll be looking at how easy it is to use each book as a tutorial and as a reference, general readability, and those particular features of each book that add value. Occasional pitfalls and omissions crop up, and I'll clue you in on those as well.

The major difference among the books is not in quality (which is uniformly high), but in content, which goes beyond the basic JavaBeans model to educate the reader about the broader context of Java development.

JavaBeans by Elliotte Rusty Harold



Elliotte Rusty Harold is a prolific writer, and has several Java-related books to his name. (See Resources for a list of his books.) His newest effort, JavaBeans: Developing Component Software in Java (355 pages, IDG Books), is an accessible and entertaining introduction to JavaBeans technology. That this book was written in a bit more than four months, frankly, is astounding: There's a lot of valuable material here, and the book is well-written.

Section 1: Introducing JavaBeans
The book opens with a high-level look at component software, introducing the reader to the general concepts involved in using software components, and describing some of their benefits. The first chapter, "Introducing JavaBeans," also covers definitions of such terms as persistence, introspection, event handling, and distributed computing. This chapter provides an explanation of other component models, including CORBA, Visual Basic VBX files, and an amusing critique of Microsoft's entrant into the component technology world, ActiveX. This author certainly makes his views clear on the quality of what's coming out of Redmond!

JavaBeans continues with short discussions of the key technologies specific to JavaBeans technology, including persistence, packaging (JAR files), events, security, and networking. An extended introduction to the BeanBox demonstrates these technologies from the "outside," showing how they work in the BeanBox. The BeanBox is followed by a very simple tutorial example -- creating a JavaBean from scratch. This demonstrates how the simpler features of JavaBeans work, discussing some of the programming issues that inevitably arise.

Section 2: Key Technologies
JavaBeans' second section, "Key Technologies," expands on the basic concepts found in the first part of the book. This section includes code samples and points out potential pitfalls, confusions, and flaws in the Java API. (Programmers can be hard to please.)

"Reading Signatures at Runtime," a chapter on using java.lang.reflect (the Java "reflection" mechanism), describes how builder tools figure out a class's methods, event sets, fields, and modifiers, and describes how to use reflection in a Java program. Because most JavaBeans developers will seldom, if ever, need to use reflection, it may have been more logical to put this section toward the end of the book, perhaps even as an appendix. The author does explicitly state, however, that he believes developers should always know more than they have to know, and he delivers on this premise by providing good technology backgrounders like the reflection chapter.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comments (1)
Login
Forgot your account info?

javabeansBy Anonymous on November 14, 2009, 1:28 ami need javabeans text book for jntu 4-1 exams

Reply | Read entire comment

View all comments

Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources
Pointers to books reviewed in the column
  • Elliotte Rusty Harold's book JavaBeans is available at Computer Literacy http://www.clbooks.com/sqlnut/SP/search/gtsumt?source=javaworld&isbn=0764580523
  • The publisher of Harold's book, IDG Books, has a Web site; a sample chapter from the book is available http://www.idgbooks.com/cgi-bin/db/fill_out_template.pl?idgbook:0-7645-8052-3:book-idg::uidg217
  • Harold has his own site for this book, including some sample text and the sample code from the book http://sunsite.unc.edu/javafaq/books/beans/
  • Laurence Vanhelsuwé's Mastering JavaBeans is available at Computer Literacy http://www.clbooks.com/sqlnut/SP/search/gtsumt?source=javaworld&isbn=0782120970
  • Sybex, the publisher of Vanhelsuwé's book, has its own site http://www.sybex.com/cgi-bin/bookpg.pl?2097back.html
  • Robert Englander's Developing JavaBeans is available at Computer Literacy http://www.clbooks.com/sqlnut/SP/search/gtsumt?source=javaworld&isbn=1565922891
  • The publisher's of this book, O'Reilly, has its own site http://www.oreilly.com/catalog/javabeans/
Other books and resources by these authors
  • Information about Elliotte Rusty Harold's other works, plus many Java links, and daily Java news appears at the popular Café Au Lait Web site at http://sunsite.unc.edu/javafaq
  • Also featured at this Café Au Lait Web site is a large list of books that Harold recommends (as well as those he doesn't recommend) http://sunsite.unc.edu/javafaq/books.html
  • Harold's list of books is not as comprehensive as JavaWorld's Java Book Catalog http://www.javaworld.com/javaworld/books/jw-books-index.html
  • Vanhelsuwé is also the lead author of Mastering Java http://www.clbooks.com/sqlnut/SP/search/gtsumt?source=javaworld&isbn=0782119352
  • Because some of the source code from Developing Java Beans is incorrect, it may save you a lot of time to download it via FTP. (The "Errata"link on the publisher's page describes precisely what was fixed.) Get the corrected sample code for this book at ftp://ftp.ora.com/pub/examples/java/javabeans/
  • The moajar utility mentioned in this article's discussion of Developing Java Beans book can be found at http://www.camb.opengroup.org/RI/java/moa/moajar/index.html
  • JavaWorld's topical index offers links to all our published reviews http://www.javaworld.com/common/jw-ti-bookreviews.html