Monday 16 March 2009

RIA's xpages and Flex

I have of late being experimenting with Adobe Flex and xPages in V8.5.0 with a view to creating Rich Internet applications (RIAs). I started with both at roughly the same time and have spent roughly the same amount of effort on both. Now I have to stress I am not an expert in either so this is an opnion based on my experiences to date rather than an indepth exploration of the pros and cons of one or the other.

To be fair it is a bit of an "apples" and "oranges" comparison xpages is aimed (at the minute) fair and square at Domino Data and Domino apps where as Flex is data source agnostic, if you can get JSON or XML out of a data source Flex will be able to play with it.

Both Flex Builder 3 and xPages are based around Eclipse so the IDE is pretty much the same and there is no real difference when faced with developing in either. You can develope Flex apps in Notepad (or my favourite Notepad++) and use the Flex SDK to compile your project up but this is for REAL geeks!)

In Flex Builder you design your UI by dragging and dropping components from a palette onto the design area. there are 65 components and you can also create your own Custom Components. On an xPage same sort of idea except you only have a palette of 26 components.
and here comes my first whinge about xpages. It is a domino product, loads of apps have a requirement for a NAB lookups but no Name Picker in the components, you have to build your own using one or more of the databinding form components which isnt that hard but hey it would be nice to have a drag on one to save all the bother of doing that.

Flex has chart controls and OLAP grid control and two types of data grid and all sorts of interesting things xpages at the minute in 8.5.0 has either not got them or has them but you cant tweak them as much.

Which brings me to visual tweaking in xpages you have to play with the CSS and preview in all your target browsers to see what it looks like, in Flex you design on the screen and thats what it looks like for the user. Again some might say this is an unfair comparison as the two technologies are totally different and yes I accept that, but to drag and drop and tweak is easier and quciker than drag drop fiddle with CSS and preview.

I also have a fear that a lot of xpages are going to stay with the oneUI css and will suffer from the generic Xpage "look". This certainly makes development easier if you do that, but for me will start to wear thin as a look after a while. "themes" certainly sound like the answer but I have had all sort of bother getting a floating and fluid xpage to stick together and display on the browser with any sort of sucess.

Xpages bind to the back end domino data really well and with a minium of fuss and bother which is really sweet, and the new JS impliemented @commands are fantastic, needless to say Flex has none of these facilities nor ever will and xPages wins hands down in this respect as you have to build agents to serve the XML or JSON to the Flex App or take POSTED data and apply it, whilst not difficult it is time consuming and you don't have to do it in xPages.

There is a bit of learning curve for both Flex and xPages when adding the code that goes behind the buttons and switches etc and it is much of a muchness there in that they are equally difficult/easy to pick up the basics.

You need a V8.5 server and V8.5 Designer to create and run xpages, you can leverage Flex from any Domino server that serves up XML or JSON, which I believe is way back to 6.5 or before. I can hear some of you say "...but you MUST be on V8+ to be on anything less is just silly." well yes but there is and it seems has been an intertia in some if not all Domino sites to be one or two versions behind the cutting edge. At the minute those that have not upgraded could leverage Flex based UI's but can't leverage xPages. I would of course recommend all readers to upgrade :-) Version 8+ it is really very good.

Xpages of course is not dependant on the browser having any plugins flex needs Adobe Flash Player 9 or 10. However even allowing for Adobe's hyperbole the flash player does seem to be pervasive in the installed browsers attaching to the internet.

There doesn't appear to be any difference speed wise from a user perspective, although I would hazzard a guess that Flex is more bandwidth intensive when getting data from the server for views.

In conclusion having used both for around 3 months, I feel considerably less constrained in the way I design a RIA when I use Flex. Xpage development is locked in much closer to the domino data and is less flexible as a result. (or so it seems)

I am not giving up on Xpages ... as it matures, as I am sure it will, it will become much more of a lived in "environment" and better for it, however it would be foolish to overlook an environment that gives a better and more adaptable over all "finish" to a RIA.

This is of course my opnion, but I would suggest you have a look a Flex, particularly if you are stalled (for what ever reason) on version 7* or 6.5* with no immeadiate plans or budget to move up to Version 8*.

Disqus for Domi-No-Yes-Maybe