Alignment: Chaotic Java

Wednesday, November 16, 2005

WebObjects to Cayenne

Switching to Cayenne from WebObjects was not easy, for me at least. Or maybe, it wasn't easy on the mental level, because I've already seen how easy it is to actually Do Stuff with WebObjects.

There is no doubt, however, that the switch was smooth; I'm going to count some points here about it.

1. I could use Eclipse. Or JetBrain's. Or anything. I wasn't stuck to Xcode which, as strong as it might be in the distributed builds and targeting system departments, it is still nor the Pweak in intellisense, and that's a Major minus for it in my book. It's the thing most used by code writers around the world, it's not a new technology, it shouldn't be too hard to implement (considering Apple's size to say, JetBrains'. Another advantage is the ability to use JUnit on my code to test it out.

2. Creating the model wasn't hard at all. In fact, I tried making it in three different ways, just for the heck of it: First, importing it from the database itself (as I already had a database created using WebObjects' EOModeler), second was to import the .eomodeld file, and third was to create it myself. I noticed that while the importing of EOModeler's file wasn't that accurate as it could be (for example, it didn't import the Optimistic Locking data, nor the Primary Key data), importing straight from the data source worked nicely, and creating it from scratch was as easy as creating it in EOModeler.

3. I could deploy my application Anywhere without fearing that one day it would be bound to a specific OS (Apple doesn't promise they won't do it to WebObjects, more than that: They don't guarantee it working on anything other than Mac OS X Server - Even though it can run a Single Servlet Directory on most common J2EE software-hardware combination at the moment). Just to make an emphasis: A normal J2EE container would cost around 7$/month to "rent". A WebObjects one would cost 50$/month, or buying a J2EE deployment license which, starting with WebObjects 5.3, means buying the Mac OS X Server software - 140$ I think.

4. The most important advantage here, I think, is the ability the J2SE you're used to. Not being bound to a specific NS* extension was much more relieving that I could have imaged. In WebObjects 5.3 Apple tried to make their NS* container classes implement the Collection interface, with limited success in my opinion. Another great thing is the flexibility - I think it would take Apple at least another release or two before they realise that J2SE 5 was out there and could be used. Generics are already in Cayenne, and using the EOD of J2SE 5 just makes things prettier.

There are advantages to WebObjects as well. Most of them are more in the arena of Tapestry, so I will say more on that in a different post.

So far, I'm enjoying my work with Cayenne.


I am aware that WOLips exists. I haven't tried it - So I don't know how it is. But it's only one point (even though major) out of three major points. No-one can fix the cost in money (in deployment) or in frustration (using the NS* classes).


Post a Comment

Links to this post:

Create a Link

<< Home