Sunday, June 29, 2008

Interesting Book: Persistence in the Enterprise

I received a copy of "Persistence in the Enterprise - A guide to Persistence technologies" book sometime back, I was so busy the last couple of weeks, I literally had no time to even look at the table of contents. Over the weekend, I finally decided it was time to do some justice to this book. So, here is a sneak peek of my review. A detailed review will be posted as always on Javalobby as well.

This book is mainly divided into two parts:

Part 1, "A Question of Persistence", helps the reader understand the many issues and trade-offs we normally face while choosing a persistence framework. This part has 4 chapters that cover the following:
Chapter 1 - A brief history of Object-Relational Mapping. This gives a brief history lesson of some popular relational database persistence mechanisms associated with a few object-oriented languages.

Chapter 2 - High Level Requirements and Persistence. As the name itself suggests, this chapter discusses IT requirements around your persistence framework that you should consider.

Chapter 3 - Designing Persistent Object Services. This chapter introduces the reader to some fundamentals and best practices of domain modeling. Also discusses some common strategies of mapping a domain model to a database with an example-driven approach.

Chapter 4 - Evaluating your Options. This chapter takes you through some best practices for conducting an evaluation based on an objective questionnaire, which is used as a template for comparison in part 2. The questionnaire is very comprehensive, and covers the following sections:
  • Background
  • Architectural Overview
  • Programming Model
  • ORM Features Supported
  • Tuning options
  • Development Process for the Common Example
Part 2, "Comparing Apples to Apples". This part has 6 chapters, the first five cover five frameworks using the approach and questionnaire discussed in chapter 4. The five frameworks covered in the next few chapters are
  • Chapter 5 JDBC
  • Chapter 6 Apache iBatis
  • Chapter 7 Hibernate Core
  • Chapter 8 Apache OpenJPA
  • Chapter 9 pureQuery and ProjectZero
Part 2 is finished with Chapter 10 which gives a summary that compares the mechanisms side by side and goes through a few scenarios in which one or the other best applies.

Appendix - Setting Up the Common Example. This section shows you how to set up and run the example for each persistence framework discussed. It has almost 30 pages, and has every detail and screen shots to get the examples working using Apache Derby as the database, Eclipse as the IDE, and JUnit and DbUnit as the testing frameworks.

Each and every chapter has a summary section, links to developerworks, and references which are really valuable.

If you have are using a home grown persistence framework, or considering writing one, or trying to move from one which you have been using, you should read this book before you venture into either one of those scenarios.

You can find the soft copy of the questionnaire at the link below:
Download the source code here:

Thursday, June 12, 2008

Chapter-wise review: The ThoughtWorks Anthology

The detailed chapter-wise review of the book "The ThoughtWorks Anthology" was published by Javalobby. If you are following TDD, or even planning to do so, this is a good book. There are some very good essays in this book. You can read the review here:

1. Javalobby

The essays which were very interesting and the ones I could apply immediately to my work were:
1. Object Calisthenics essay written by Jeff Bay
2. Consumer Driven Contracts: A Service Evolution Pattern by Ian Robinson
3. Refactoring Ant Build files by Julian Simpson
4. Single-Click Software Release by Dave Farley
5. Agile vs. Waterfall Testing for Enterprise Web Apps by Kristan Vingrys

Did you read this book? What are your thoughts?

Why do you need the latest version of Hudson?

It is hard to keep up with the latest version of Hudson, since they come-up with new releases at least 2-3 times a week. If you want to keep your plug-ins up-to date, you sure should get the latest version. With the latest 1.222 release of Hudson, installing or updating plug-ins is so easy. If you haven't been updating Hudson, this is the time to do so to the latest version which now by the way is 1.223.

Here are the steps to use the latest Hudson version:

1. Download the 1.223 version from here.
2. Stop Hudson and replace your hudson.war with the latest version.
3. Start Hudson, and go to dashboard and click on Manage Hudson which should bring a page like this:

4. Click on Manage Plugins, which will open up a new page as shown below:

5. Now, select the plugins you want to install and click the Install button which is all the way down on the right hand corner.

6. Restart Hudson, and you have the plug-ins installed.

Also, some other new features are useful as well as per the Hudson changelog:

a. "Hudson's own user database" can be now configured to prevent sign-up.
b. Administrator can now create user accounts for others (issue 1193)
c. Authentication failure now leaves the INFO log on Hudson server log.

Tuesday, June 10, 2008

Effective Java - A Must Read Book

After having finished the review for Java Power Tools, and having just submitted the review for "The Thoughtworks Anthology", I was planning on taking a small break from reviewing books.

Last week, I received an email from Addison-Wesley about their 4 new books. Out of those 4 books, Effective Java and Persistence in the Enterprise were the 2 books which interested me. Even before volunteering to review these books, I logged into safari and did read a few chapter links to see if it was worth all the time I was spending. The table of contents and the sample chapters did change my mind.

I just received these books yesterday, and already half way through the "Effective Java" book.
It is just unbelievable. The book is filled with pragmatic advice, plenty of samples, and is also very readable.

Stay tuned for the detailed review which will be published at Javalobby soon.

Monday, June 9, 2008

Hudson - Tips and Tricks

Hudson is an open source CI server that is by far the easiest one to configure. Second to ease of use is Hudson’s impressive plug-in framework, which makes it easy to add features. For instance, Hudson has a plug-in for tracking FindBugs issues, PMD issues, and CheckStyle issues over time as well as code coverage. It also trends test results from JUnit, as well as build results and corresponding execution times. In spite of all these cool features, we had to find ways to get around some common issues we faced at work using Hudson.

The article I wrote at my company's blog Test Early describes a few real-life tips and tricks that I have found at work and will assist in configuring Hudson to work most effectively in your environment as well:

  1. Changing Hudson home directory
  2. OutOfMemoryError
  3. Securing Hudson
  4. Hudson Views
  5. Hudson and Groovy
  6. Spaces in directory names
  7. Browser to use
If you are using Hudson, and need to know what these tips and tricks are check out the article at Test Early here.