Jason Sheedy's blog

An attempt to record some of my thoughts on the alphabet soup of software engineering and web development technology .... Java, Flex, ColdFusion, Linux, etc, etc

Dynamically created remoting destinations with BlazeDS and Spring Annotations

In our current flex project we're using BlazeDs in combination with the Spring Framework to provide the middle tier infrastructure. As part of the requirements we need to be able to dynamically create flex remoting destinations, so rather than creating destinations manually inside the flex services config, we're using a handy little library written by Marcel Overdijk that enables you to mark your services as a @RemotingDestination. Using these annotations Spring will dynamically add your service class to the BlazeDS destination list. More detail about it can be found on the original blog post by Marcel.

The library is posted on the Adobe exchange. However, it's not current and Marcel has been having trouble getting Adobe to update it. The new version includes a fix that I contributed for an issue with proxied services. i.e. If a bean was already proxied, it wouldn't be recognised as a @RemotingDestination because the proxied bean didn't carry the annoation over. There are also a couple of other minor fixes in the new version,

While we're waiting for Adobe exchange to reflect the changes, I'm posting it here for anyone that needs to download it in the interum .

 

Handy regex tester for AS3

I found this tool really useful for testing regex in AS3. There's a few of these around, but this one is very nicely done.. http://gskinner.com/RegExr/

WebDU 2008 card game

One of the highlights of this years conference was the great card game created by Kai. It basically required you to collect cards during the conference and put them together in a certain combination in order to achieve the highest score. In my desperate attempt to win I decided to build a calculator that would enable be to calculate the highest score. Unfortunately, I was about 30minutes away from getting it into a functional state before the deadline :(

As it turns out the rules i used to calculate the score must have been slightly different from what Kai had used, so the scores didn't add up exactly the same. On the up side, it think it would still give you the correct combination of cards to get the highest score. Congratulations to Zoe for the big win !!! The cards selected by default are actually the wons she used to win.

The interface is still a bit rough, so be kind. :) The drag'n'drop handler is working properly, so you have to click an item again to re-calculate the score after you drop it from the selected list to the discarded list.

To have a play with it click here.

To download the source click here.

Google Code Jam and webDU day 0 code war

This looks like fun .. wish i had time to go in it. More here.

Along the same vein was the webDU 2008 code war. It was a heap of fun and produced some amazing examples of what NOT to do. :) Four of us from the sunshine coast team produced a "Love Calculator" in Flex. It was good fun and not too serious. Unfortunately, our competitors had a couple of Adobe guys on the team so they won the heat. It was an inside job for sure!! I'm sure the clap'O'meter registered higher for our app, but in the spirit of good sportsmanship we didn't ask for a recalibration :)

Apple announces SproutCore Javascript framework for RIA development

Not sure if this is news worthy, but it's the first I've heard of it. Yet another framework for RIA development. I haven't really looked into it, but it sounds promising. More here.

An awesome new video from HolidaysWithPurpose.com

Why do I torture myself by watching these video's ?? I guess it's to show myself that there is life outside of computers. Anyhow .. here it is. For more info go to www.holidayswithpurpose.com.

Hibernate tips and tricks

I was prompted to write this post to mention a "featue" that I discovered in hibernate. I've been using hibernate for a little while and have found it to be a love / hate relationship. It may be that I just don't have enough experience with it to fully appreciate the productivity gains that seem to dangle so tantilisingly close. Whatever it is, I'm too far down the track to turn back, so I labour on in the hopes that one day it will all make sense.

When using a <timestamp /> in my bean mapping and in conjuction with using session.merge, the new tmestamp value is not updated in the original object after it's persisted in the database. i.e. hibernate updates the timestamp in the database, but it's not reflected in the original class.This behavior differs from the behavior of session.update, where the new value IS correctly reflected in the original object.

The reason for using merge is to update a detached object, but one would think that in doing the merge the object would be re-attached to the session and synconised with the database version. This is what the doc imply in any case.

The issue I have with hibernate is that there are some less than transparent behaviours being exibited. Even if this behavior was documented, it is less than intutive and seems like an oversite on the part of the developers.

Another example of this kind of 'side-effect' based behaviour is the very reason I'm using merge to start with. Cascading deletes won't work on detached objects, so hibernate requires you to use merge in order to re-attach the object to the session. In order to do this it first needs to read the object in from the db before doing the update(merge). This kind of makes sense in that it would be difficult for hibernate know which related sub-classes in the object graph would need to be deleted, but for performance reasons it's a bad idea in my opinion. It would be possible use the intersection of the parent and it's composite classes to cascade the deletes. i.e. delete from composite_class where parent_id =  ? and composite_id not in (?,?,?).

Anyhow, there are allot of benfits to using hibernate, but annoying little tricks like that have been slowing down deveopment for us in a big way.

Update: Here are a few links from people talking about the issue with cascading deletes on detached objects.

Update 2: I posted the issues on the hibernate forum. Let's see if anyone has any reasonable solutions. http://forum.hibernate.org/viewtopic.php?t=986706

Firefox Browser Sync

I just started to use this really handy firefox extention. It enables you to sync your browser settings, the bookmarks, history, cookies, open tabs, etc from one compter to another. It will syncronise transparently without interupting the user experience. 

Another one recommended by one of my collegue's is FEBE (Firefox Environment Backup Extension). It will syncronise your firefox extentions between computers.

With these two put together you can keep your browser state syncronised with as many computers as you like. VeRY handy !!

 

Google is hiring

Google Australia are looking for software engineers and project managers to join their R&D team. This article from ZDnet suggest that they're taking a "don't call us, we'll call you approach". I wonder what you have to do to get them to notice you.

 

Minor bug fix release for Bytespring CMS

new version 1.3.101
- fixed minor bug with case sensitive file path i.e. /data/UserFiles changed to /data/userfiles

For more details and to download go here.

 

This is cooool !!

Researcher says the solid-state fan is the biggest improvement in cooling since the heat pipe. I just had to post this coz I think it is really cool. :) Pun definitely intended. Thanks to Ben Scales, the network administrator at work, for sending this one through.

More Entries