Java

The Java programming language

Resin and Session Clustering

In a world where AJAX is becoming the norm instead of the exception we need technology platforms that allow us to scale these applications. I have been working on an application for a major hotel chain that is used by their call center agents to book reservations at their hotels. The application uses AJAX techniques to run several queries simultaneously and presents the data in a very dynamic interface that closely resembles a traditional desktop application.

Java 1.5 Generic DAO

I am always looking for ways to limit the amount of typing I have to do. Hibernate helps me alot because I don't have to write all the SQL and I can concentrate on the less tedious aspects of designing my persistence model. Spring helps me alot because I don't have to write all those factories and other "glue" code.

In the interests of getting more done quickly, I started looking at how I can automate the generatin of the DAO pattern. Data Access Objects allow the service or session facade layer to be agnostic to the persistence layer used. As I have already said, I use hibernate but there might come a time when I need to use some other persistence layer and by keeping all the persistence layer specific code behind the DAO pattern, I can easily switch it out. I also love the fact that I can use jMock to test my service layer components without fooling around with actually changing database tables.

Spring for Plain old Java Applications (POJAs)

Most J2EE developers have at least heard of the Spring framework and know that it is an excellent framework for creating enterprise applications. I have recently needed to create an application that runs from the command line and is short lived. It has no GUI but I wanted it to be configurable and extendable in various ways. To that end, I defined a bunch of interfaces for the objects in the system to use when interfacing with other objects. Then I started thinking about the implementations of these interfaces and the factory classes I would need to create. I said to myself "Self, doesn't Spring already do this?" and I answered myself, "Why, yes". So I decided to try it.

Syndicate content