J2EE is already a huge platform, and with the addition of the JAX Pack for developing XML-based web services, it’s getting huger. Even if you’re an experienced Java developer, it can be difficult to figure out where to grab onto J2EE, and how to bootstrap yourself to mastery. That’s where Sams Teach Yourself J2EE in 21 Days comes in.
Martin Bond and his team of experienced enterprise Java developers have organized the entire J2EE platform into 21 lessons, each incrementally building on what’s come before. Collectively, these lessons introduce virtually every important component of J2EE. The book is intelligently written and contains plenty of sample code. Best of all, it’s full of tips and notes that illuminate what you really need to know to be effective.
Bond and company begin with a brief review of how we got here -- to n-tier, component-based, web-oriented development, that is. They outline what modern distributed computing environments like J2EE need to deliver (component lifecycle management; persistence; naming; transaction support; security, and so forth). Next, in Lesson #2, they take a first pass at showing how J2EE delivers all that. They introduce key platform elements such as Enterprise JavaBeans, JavaServer Pages, servlets, and containers; then outline the services provided by J2EE containers (for instance, JDBC for database connectivity).
You’ll walk through installing your J2EE environment, configuring it, starting the J2EE reference implementation, and troubleshooting start-up if it gives you trouble. (Yo, Sun: It’s the 21st century -- should developers still have to manually define environment variables and fuss with paths just to get your JDK installed?)
Then, with introductions out of the way, Sams Teach Yourself J2EE in 21 Days introduces the case study that will be used throughout much of the rest of the book: a job placement agency which serves both employers and applicants. By the end of the course, you’ll have a simple, working enterprise application with both a GUI-based front end and a web-based interface -- not to mention a realistic understanding of J2EE’s strengths, weaknesses, and best practices.
Lesson by lesson, you’ll master Java Naming and Directory Services (JNDI); session and entity beans; container managed persistence (CMP) and the EJB Query Language (you’ll have a great headstart if you’ve ever worked with SQL). Next, the authors move on to more complex techniques. There are thorough lessons on transactions and persistence; example-rich introductions to JMS and message-driven beans; and a good look at email-enabling your enterprise applications with JavaMail.
Beginning with the email coverage, the book moves aggressively towards Web development, introducing servlets and JavaServer Pages, and then showing you how to use tag libraries, which allow you to embed business logic in custom tags that others can integrate with their presentation logic and visual page designs.
Most of the book’s six remaining lessons focus on XML and Web services development: integrating XML with J2EE; parsing XML and transforming XML documents; building RPC-based (and to a lesser degree SOAP-based) web services; using web services registries; and more.
Most, that is, but not all. We’d be derelict if we didn’t mention the book’s excellent introduction to patterns, and to some of the most useful patterns that have been identified for J2EE development.
The book contains some very nice touches. For instance, to make sense of the class relationships, object interactions, and events at work in a J2EE system, it helps to use UML diagrams, and this book does. But the authors recognize that not all new J2EE enterprise developers are familiar with UML, so they present a concise introduction as an appendix. Similarly, there are quick introduction/mini-reference sections on SQL for those building database applications, and XML for those building web services.
We also liked the authors’ focus on refactoring: their readiness to present a basic solution, then rework it to reflect more complex techniques and more advanced J2EE skills as you master them. For example, you’ll use session beans to register job applicants; then add entity beans for applicant data and refactor your session beans accordingly; then refactor your new entity beans to leverage container managed persistence; later in the book, you’ll create web interfaces to the same session beans.
While this book has several authors, it speaks with a single voice: the voice of intelligence and experience. (Bill Camarda)
Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.