Book Review: Java EE 5 Development with NetBeans 6

Java EE 5 Development with NetBeans 6
David R. Heffelfinger
Packt Publishing
ISBN 978-1-847195-46-3

The JAVA bookshelf offers a myriad of titles on almost any given topic, frameworks, tools, plugins or any available IDE. Most of the JAVA EE titles I know, are thick compendiums which go way beyond the level of knowledge you really need in practice, or are of a very theoretical nature. Often they are not pointing to specific products or versions (IDE, applicationserver or DB), eventually only giving some generic directions on how to use them. Someone who is not yet an expert in the EE environment, struggles to get the samples and sourcecode snippets in their choice of IDE and applicationserver up and running.

Other for this title, it guides the reader through the whole lifecycle of Java EE development, inclusive of the basic installation and configuration of Netbeans (6.5B, the actual version at the time of writing the book) and Glassfish in an illustrated step-by-step fashion. What I really like about his book, is the coverage of the most important aspects of the Java EE development in this sample-driven approach. You dont need necessary all the knowledge you gain from the book, as some frameworks abstract away a lot of the details, but is more than viable to to know whats going on under the hood and even more as some of the modern frameworks are only sitting on top of it. The book won’t teach you all details either, but it serves as a good starting point.

A short overview over the chapters and covered topics:

Chapter 1 supports the reader in getting Netbeans with Glassfish installed and running.
Chapter 2 starts with plain JSP development, it runs you through the creation of JSP pages and Servlets, JSP fragments, basic security and introduce you to the HTTP Monitor.
Chapter 3 looks at enhancing JSP pages with JSTL tags (for, choose, foreach), JSTL SQL tags (in case you require some hardcoded quick and dirty db-linked pages) and custom JSP tags. Basic understanding of tag libraries helps in more complex environments is essential.
Chapter 4 introduces into the more visual creation of JSF pages, also covering page flow and validation.
Chapter 5 gives a glance at JPA as a major improvement compared with the old way of creating entity beans and riding on additional relational mapping API’s. The chapter also covers Named queries, JPQL, table relationships and the various ways to creating JPA entity from the database and vice versa using the various little wizards that Netbeans has to offer. A complete sample rounds up the chapter with the automatic creation of JSF pages.
Chapter 6 is an extension to chapter 4 and servers more sophisticated samples for the visual creation of JSF pages including database binding and ajax functionality.
Chapter 7 pushes forward right into the heart of Java enterprise applications, the EJB’s. Even impossible to give a comprehensive overview though, this chapter offers a fairly good start into the complex topic with session beans and DAO design patterns provided by Netbeans.
Chapter 8 gives a quick glance at JMS, Java’s messaging service, which is hardly covered by any book with runnable samples but theoretical descriptions. Key to understand this for any communication to the outside world.
Chapter 9 get us started with Webservices as an core engine of web technology, interoperability and the cloudspace.
Chapter 10 summarize all the previous chapters by assembling a complete enterprise application with EJB module and web application.

I recommend the book as a starting point into the world of Web and Enterprise Applications with Netbeans. Even newer versions of the IDE are available now and Java EE 6 is around the corner, the basics, as you setup your knowledge foundation with this book, wont change. With the tools of the trade you learn to use here, you can continue your reading journey with other more detailed books. I wish I had the book while I was picking up Java EE, instead of wading through compendiums and dry theory material.

The sourcecode is available for download at the publishers website, ready for you to open in Netbeans. I still prefer sometimes hacking code from books line by line, it teaches you more while doing it, other than just blindly looking at code and run it.

Having a nice budget for books, I accumulated a collection of books touching a variety of IT topics, from coding to IT project management.
The development related books usually have 2 problems:
– They are (sometimes) outdated the moment you read them due to the cycle between the time the author writing the title and the versions of a product he refers to, it gets reviewed, edited and published and the time you hold in your hands.
– They are expensive. Sometimes you find information of similar quality, maybe not as combined as a book, in the web, as long you can find the right website or blog.

I recommend looking at the packt books, most of them are available as pdf at a reasonable price (cheaper than the paperversoin of the same). They come with the big advantage that you can carry as many pdf books along as you want. And if you feel the urge to, you can print (parts of) it to read – sometimes reading from paperware is more relaxing than staring at a screen though.

Daily Thoughts 3

  • REA
    We all know about RIA, aka Rich Internet Applications. But do you know there is also a REA ? Rich Enterprise Applications ! Not exactly sure what it means, but I am sure its like RIA pimp my boring business and office application. I came across the word on the Icefaces website.
  • JEE6
    The latest release should have already hit the road in 2008, but JSR 316 (link) only now is under public review until February 23. I guess the step from version 5 to 6 will not be as dramatic as in the previous historic change from J2EE 1.4 (released 2002) to JEE5 (May 2006). But life becomes more easier or better more abstract. Just worries me that you need lots of experience to understand whats going on under the hood !
    Some work coming up for all the Application Server Vendor to become compliant again (most of them sit in the JCP commitee anyway), not to mention customer s who still use 1.4,  running behind the crowd with their systems! Time will reveal the roadmap.
    Lots of new books gonna delight us on JEE6 and J7 !

JEE5 Security

Any new project or product that is used by more than 1 user and over any kind of network needs the “TripleA” AAA features: Authorization, Authentication, Auditing. That’s a must !

I am reading about the JEE5 Security features to outline a new design, or at least I try to find some comprehensive information about it. It seems one of the most important framework services is still being largely developed handmade according to the needs of specific project requirements and no generic solution is available (I think I need to rephrase this after some more investigation). I could  not find many books or online sources with samples or easy-digestible tutorials, just to share what I found so far. JAAS is part of JRE since version 1.4 and most of the information about is a bit old (2002).

SUN JAVA SE security (link) (link)
SUN JAAS Tutorial (link)

3rd Party Security Framework (based on JAAS)
JGuard on (link)
ESAPI  on OWASP (link)

Free JAAS Book (link)
Software Security Technologies (covering security in Java, C, Perl)

Software Security Technologies