Feeds

The state of POJO play

'Plain Old Java' back in fashion

Internet Security Threat Report 2014

Book review Few could deny that one of the biggest drivers of change in the Java world recently has been the complexity of "enterprise Java".

The complexities of EJB 2.x, with forests of XML configuration files, boiler plate script, the slow edit-compile-debug cycle forced by having to deploy to a server, the reliance on procedural code...

The list of problems is well known, and has been chronicled frequently and vociferously by any number of well-known Java developers.

However, a positive spin-off has been an explosion of interest and activity in what have been termed "rebel J2EE" frameworks. Spring, Hibernate, JDO and countless other frameworks have been developed to tackle some of the deficiencies in the Java enterprise arena. And, just as significantly there's also been a resurgence of interest in what are (very) loosely known as scripting languages, particularly Ruby. Similarly, interest in Ajax is extremely high in the Java community for some of the same reasons.

In POJOs in Action, Chris Richardson reprises all of these developments and shows how these new frameworks solve particular problems. POJOs (Plain Old Java Objects) is a term that was popularised by Martin Fowler (he of Refactoring fame), Rebbecca Parsons and Josh MacKenzie as a way of putting a fancy name on the practice of using regular Java objects rather than encapsulating business logic in Enterprise JavaBeans.

Part one of the book starts with a quick history lesson, outlines the major problems that enterprise applications have to solve (object relational mapping, data access, transactions, concurrency etc), and then looks at how these have been addressed using EJB 2.x. The POJO based alternatives are briefly outlined, along with a preview of EJB 3.0, which is considered to be a step in the right direction in that it is much more POJO-centric than its predecessor.

Part two goes into much more detail, and presents a series of design patterns for tackling things like object relational mapping, the encapsulation of business logic, and so on. Hibernate and JDO are used extensively, and a number of complex and realistic examples are developed to illustrate how to use them effectively.

While the book is heavy with source code, the writing goes into detail of the design process so that it's clear what the solutions are trying to do and why. Discussion of the pros and cons of Hibernate vs JDO vs EJB 3.0 is not neglected.

On the database transaction side of things there's discussion of JDBC and how iBatis and Spring can be used to implement the transaction script pattern in part three of the book. This section also looks in more detail at EJB 3.0 and shows how POJOs can be used with this to win back some of the benefits of "regular" Java development.

On the whole, the book is well written and provides solid technical advice. Richardson is a confident author, and he's well known within the Java enterprise community. No book on enterprise Java is easy reading, but for anyone seriously wanting to catch up with the current state of play this provides both an excellent over-view and some detailed hands-on examples.

POJOs In Action

Verdict: Excellent overview of enterprise Java

Author: Chris Richardson

Publisher: Manning Publications

ISBN: 1932394583

Media: Book

List Price: £31.99

Reg price: £25.59 (saving 20 per cent)

Buy this book at Cash 'n' Carrion.

Internet Security Threat Report 2014

More from The Register

next story
Bada-Bing! Mozilla flips Firefox to YAHOO! for search
Microsoft system will be the default for browser in US until 2020
Be real, Apple: In-app goodie grab games AREN'T FREE – EU
Cupertino stands down after Euro legal threats
Download alert: Nearly ALL top 100 Android, iOS paid apps hacked
Attack of the Clones? Yeah, but much, much scarier – report
Nexus 7 fandroids tell of salty taste after sucking on Google's Lollipop
Web giant looking into why version 5.0 of Android is crippling older slabs
SLURP! Flick your TONGUE around our LOLLIPOP – Google
Android 5 is coming – IF you're lucky enough to have the right gadget
Microsoft: Your Linux Docker containers are now OURS to command
New tool lets admins wrangle Linux apps from Windows
Facebook, working on Facebook at Work, works on Facebook. At Work
You don't want your cat or drunk pics at the office
prev story

Whitepapers

Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
Getting started with customer-focused identity management
Learn why identity is a fundamental requirement to digital growth, and how without it there is no way to identify and engage customers in a meaningful way.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Reducing the cost and complexity of web vulnerability management
How using vulnerability assessments to identify exploitable weaknesses and take corrective action can reduce the risk of hackers finding your site and attacking it.
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.