Aug 05

Table Oriented Programming

Tech No Comments »

You can tell that this came from a DB head.

A practical, intuitive, and consistent way to organize
and process data and algorithm collections

The funniest quote was:

Arrays are evil! Arrays are the Goto of the collections world.

Aug 05

RE: Lightweight Containers vs. EJB3

EJB, Java, Lightweight Containers, Tech No Comments »

Merrick has a nicely thought out critique at Lightweight Containers in comparison to EJB 3.

His basic premise is that EJB 3 fills the gap of the lightweight containers. Although I think it is a great step forward, I think there are a few areas which worry me:

What are we specifying?

I would personally love the expert group to be able to step back and think about what EJB is all about. Where is the “E”, and what should be spec’d?

In my humble opinion, I think that the EJB spec should be a pretty lean one, that acts like the J2EE spec… in that it offers the programming model + integration hooks into other specs. The other specs are basically out there to define the cross-cutting enterprise services, and could later have AOP info.

The obvious example is persistence. Get a new spec for that if you really can’t stomach talking to JDO people. But get it external, and have it for EVERYONE.

There are also many other examples. Security, worker threads, blah blah.

Backwards compatibility requirements

I understand backwards compatibility is good. However, I think it is OK to make some things optional. Having all of the EJB 2.x and below baggage is painful for some people (e.g. Spring) and keeps them out of the loop. Make it optional, and if you ARE backwards compatible you can get a shiny checkbox. Then, if a company gives a monkeys they can get an implementation that has the shiny star.

Inclusion

In some of the open source projects such as Spring, there is an air of inclusion. What do you want to do for persistence? JDO? Hibernate? iBATIS? We will hook in and help you out with all of them.

You don’t feel that same way with the EJB vendors. The feeling is more like “Oh man, they want to hook us into their damn EJB CMP engine that we can’t bloody swap out as the PersistenceManager STILL isn’t pluggable after all these years”.

Come on guys, let’s play nice. You can still compete on features / QoS / etc.

So, although I am excited about EJB 3…. I want more :)

Aug 05

Cameron WebSphere Purdy

Tech No Comments »

I did a double take when I saw Cameron writing: The Management Option for WebSphere Journal :)

WebSphere provides a number of out-of-the-box session management options, including a new in-memory replication option in WebSphere 5. Successful use of session management requires some engineering foresight, and optimal use of session management requires an understanding of the options that WebSphere provides.

Aug 05

Tim Henmen… er I mean Wimbledon: The Movie

Personal 3 Comments »

I saw a trailer for Wimbledon the movie, which is done by the Notting Hill / Bridget Jones Diary folk.

It basically seems to be about Tim Henman. A brit doesn’t reach his potential… yet comes through in the end (which is what people WANT to happen with Tim).

After the trailer finished a bloke behind me said “Wow the english are ‘different’”. I think I shocked him when I said “We aren’t that different mate!”

Aug 04

Making sure classes are in your project CLASSPATH via ant

Tech 1 Comment »

javap is one of those nice command line tools that you can use to print out info on a given class.

I sometimes run into problems in a project where the right jars may not all be in my lib directories (see last post ;).

I use a simple ant task to give me a sanity check (outside of my IDE of course, as that may be setup differently).

I run:

% ant find-class -Dclass.name=java.lang.String

and the simple task is…

<!-- =================================================================== -->
<!-- Find the class in the classpath                                     -->
<!-- =================================================================== -->
<target name="find-class" description="Find the class in the classpath">
<fail unless="class.name"
message="You must pass a class name in via -Dclass.name=package.class"/>

<echo message="Finding class: ${class.name}"/>

<exec executable="javap">
<arg line="-classpath ${project.classpath} ${class.name}"/>
</exec>
</target>

I am always surprised that I can’t find a <javap> ant task too.

Aug 04

SiteMesh 2.1: The only way to fly :)

Tech No Comments »

It is great to see that SiteMesh 2.1 has been released. Now with that pesky bug all cleaned up, things are looking great for SiteMesh.

SiteMesh is actually one of the open source projects which is a silent killer. It always amazes me how FEW people know about it, when it is something that I use on 80% of my projects. It is the perfect solution, so frequently. And if you come from the Tiles world you will never want to look back at it.

Congrats SiteMeshers. Thanks for the nice clean tool!

Aug 04

Jar File Hell

Tech 4 Comments »

Christian posted about Is 159 jar files too many?

It is a little crazy isn’t it? I had been thinking about a tool that would look in your lib directory, and generate a versions.txt for you… working out dependencies. This would assume that people play nice with the jar MANIFEST and put a version in there.

It is interesting how different the world is with jar files compared to the GAC and machine libraries. In these worlds we were fighting with keeping that global resource up to date, and then running into the issues with multiple versions. Now we are copying jar files all over the place.

This library hell really shows you that we reuse a lot more code that we write!. If you do a count on the jar files that you depend on versus your application jar file you will see the difference. Then you start to think about everything else that you depend on (OS, network, etc) and we are just writing some glue at the top of the mountain!

Aug 04

Spring Hibernate Config: mappingDirectoryLocations

Tech 153 Comments »

I have seen a bunch of projects which are using Spring and Hibernate, and have something like the following in their applicationContext.xml file.

<property name="mappingResources">
<list>
<value>com/almaer/model/Person.hbm.xml</value>
<value>com/almaer/model/Car.hbm.xml</value>
<value>com/almaer/model/Engine.hbm.xml</value>
<value>com/almaer/model/Toy.hbm.xml</value>
</list>
</property>

Luckily, you can just point to the directory now, and have Spring work it out for you :)

<property name="mappingDirectoryLocations">
<list>
<value>WEB-INF/mappings</value>
</list>
</property>
Aug 03

More moving and shaking: Kent Beck joins Agitar

Tech No Comments »

More movement in the summer of tech. Joining Josh Block, Adam Bosworth, Jim Hugunin, and others… is a move by Kent Beck (you know, that testing/XP guy :) ).

Kent has joined Agitar software.

They make cool tools to help you make sure that you have serious test coverage such as …

Agitator intelligently exercises Java code to discover its behavior and presents observations to the developer. Developers can convert Agitator

Aug 03

Now you can even blog on Amazon.com?

Personal No Comments »

I ran across the Amazon Plog.

Everyone is getting into the blogging act!

Or should I saw Plogging act :)