Let’s Play Pollyanna

Springing into Flex

Work has been slow of late so I have decided to investigate the so-called RIA technologies. Firstly my current apps are written using Java and the Spring Framework and do use Ajax (via DWR) however the clients are constantly pushing the limits as to what is sensible in an html only environment. So I spent a good day reading up on the two main alternatives JavaFX and Flex. JavaFX, I discounted, the people involved with the project all seem to be concentrating on completely different problem domains – there is very little on what some would consider boring business applications. The few apps I did find that were using the technology seemed to have quite a heavy startup time. Also there didn’t seem to be a very focused community for JavaFX.

So I decided I would look at Flex with BlazeDS. This was a bit better although the community is still more diffuse than I am used to. Most of the technical info I used was found in the Blaze DS Integration demo by Christophe Coenraets.

I decided not to do things the easy way – I was able to grab a section of db layer and business logic from an existing spring application and used it to create a new project. I copied in the appropriate jar files (for spring-flex and for blazeds) and changed the spring configuration to suit. With a very simple flex UI to display a button and do a query on the Spring back-end when it is clicked (just like Christophe had) I very rapidly had something that actually worked. So that was good.

So now I have to think about the next steps. Quite obviously I would like Spring Security to be well integrated with the flex front-end in a similar way to the way the JSP tag library is. I will also need to think about how the application is architected. I don’t want to put a lot of code into the flex layer – just stuff that is directly concerned with the UI. Fortunately for me time is on my side. I do not have to do this in the project I am currently working on or any which we are discussing at the moment. It is purely a bit of fun looking at possible future directions so by the time I have to write something for real I expect that there would be some best practises documented out there.

March 8, 2009 Posted by | Software Development | Leave a comment

Object Oriented CSS

Nicole Sullivan talks about her OO CSS, an attempt to control and eliminate CSS bloat when creating complex web sites. One of the slides says to “Design individual pages only once all the legos have been defined” which is very good advice which many (including me) should take to heart. Of course in the real world we don’t always have the luxury of infinite time and very often we (and the clients) don’t know what they want on the page at the start of the process. Of course in such cases the hoary old chestnut of “plan to throw one away; you will, anyhow” comes in handy as long as you really do turn the ad-hoc or novel components into reusable lego as part of the development process and then throw the nasty hacked CSS away.

I only had one small peeve with Nicole’s work – I hate it when people use Legos as the plural of Lego.

March 3, 2009 Posted by | Software Development | Leave a comment

Javascript Prototype and Namespace stuff

Via Ajaxian there has previously been talk about Javascript inheritance performance. Now Ben Gerrissen asks the right question “Why is everyone trying to superimpose Classical OO on Prototypical OO” – and has developed a library to help with prototypical OO. After a brief flirtation with a bad name (one that was already used for a high profile javascript library) his work is now visible on his blog under the name JSoo.

Also on Ajaxian there is a post about Maxime Bouroumeau-Fuseau’s namspace.js library which looks interesting.

February 27, 2009 Posted by | Software Development | Leave a comment