logo

XPages vs Flex -- Let The Challenge Commence

XPages vs Flex is a topic I've considered for discussion for a while now, but couldn't decide whether to. Mainly as it doesn't really seem a fair or equal comparison to make.

Then I got an email from somebody suggesting it as a topic for debate, so I've decided to open it to the floor. Not so much as a debate, but more a challenge.

In the words of Harry Hill "Which is best? There's only one way to decide... ...FIGHT!"

Now, let me just say first of all that I am not against XPages or so in love with Flex that I've already decided who I think will be the victor or which I'll support.

While the idea of this is that it might be a bit of fun I do really want to learn something from it too. I'm genuinely curious about XPage's abilities. Rather than saying "I bet it can't do this!" I'm actually wondering "Can it do this?".

The Challenge

Take the demo from my last post. The challenge (assuming it is in fact a challenge) is to recreate the functionality using XPages.

You can download the Notes database here. In it is everything you need. Data included. All the Flex code is in the File Resources section as ready-to-import Flex Project Archive (.zip) files.

Who Wins?

Who wins I guess is open to interpretation. Should it be the quickest and/or easiest to code or the best-looking end product? Or should is be the best performing of the two? For me I'm most interested in seeing how quick it is to code in XPages.

If, as I'm half expecting to be the case, nobody takes me up on this I'll just have to assume Flex the winner ;-)

Comments

    • avatar
    • ChrisC
    • Wed 30 Sep 2009 03:27 PM

    I am looking forward to this having dabbled in xPages and done a fair bit of standard Domino dev with jQuery I am very interested. Flex is something on the radar so I will watch this space very closely!!

    • avatar
    • Cesar
    • Wed 30 Sep 2009 04:23 PM

    Hey, I'm another spectator of the challenge. My position is similar to Jake's, I'd like to see an assessment on how quick it is to code this in XPages, or something similar.

    I loved the demo, I'm still going to be doing Notes/Domino development but this looks great and if it can be used with Domino back ends sounds definitely a great tool to learn!

  1. Great timing Jake. We are having this very debate at work at moment. We have dabbled a little in xpages and flex but still undecided as to which is best.

    • avatar
    • Erik Brooks
    • Wed 30 Sep 2009 05:28 PM

    Initial 90% setup will probably be faster in Xpages.

    But the on-the-fly group-by, filtering, sorting, column reordering, and scrolling will be Flex's win, hands down. The fact that all that stuff is handled client side - and quickly - for you automatically is fantastic.

    Reengineering that in XPages would be sticky - you're heavily limited with the resorting capabilities of the view(s) involved.

    E.g.:

    1. Click "Oracle"

    2. Click "Group by" "Gender"

    3. Swing open "Male"

    4. Resort by "Department", descending.

    Xpages hook into views fairly well, but as such they hit many of the same limitations. Domino has never been able to resort while within a category in any manner that makes sense, so the XPages will suffer from the same problem.

    Want to really spice things up?

    5. Type "camp" in the "Filter" box.

    6. Drag-and-drop the columns into a different order.

    Yeah, done deal there.

    But don't throw XPages to the curb. They work without flash, and for significantly large datasets will give you much better performance due to the paging incorporated in them. As soon as you want to start paging in Flex (and taking reader's fields into account) you've got more work cut out for you to pull down the XML you need as you determine &restrictToCategory, &start, and &count parameters.

    • avatar
    • Erik Brooks
    • Wed 30 Sep 2009 05:34 PM

    Oh, I forgot to add another BIG area where XPages will rock Flex's world: Pseudo-JOINs from document data.

    If you want to show a JOINed value in the view data, then the view data won't contain that. You would need to add your own additional Flex processing to determine what else to pull down, and then round-trip to the server (and have code on the server lined up to serve that request).

    I guess you could alternatively pull down an entire extra table from your lookup view(s) and JOIN it somehow on the Flex side of things, but now you're talking even more scaling problems as your dataset grows.

    In an XPage you could simply @DbLookup using the rowData attribute to pull in what you want. It'd be one line of code, processed server-side, on-render.

  2. Erik,

    It would be more appropriate to join the data on the server and bring it up to Flex. You should be able to do this quickly with an server agent.

    • avatar
    • Raven
    • Wed 30 Sep 2009 08:19 PM

    But i guess that's the problem.

    Having to code an agent just to produce the desired XML for Flex to read is cumbersome than having a simple formula like @DBLookup for XPages

    But going back, development for XPages has not much flair for me. You have to have a flair for javascript or JQuery and sometimes it's buggy browser-wise (of course, i'm talking about UI here) while Flex is independent, you just have to have flash installed in a browser.

    • avatar
    • Jake Howlett
    • Thu 1 Oct 2009 12:42 AM

    Good points Erik. Thanks for the thought-provoking responses.

    Have I set the bar to high do you think? Or is it not a fair expectation of XPages to match Flex's UI capabilities perhaps?

    Maybe it would be better to switch it round and see if there's something XPages can do that Flex can't.

    I'm still struggling to see how XPages fit in to my world. So far I've not see anything XPages-based that's stopped me in my tracks.

    From the little experience I have of XPages I'm finding it hard to get excited enough about them to give over the time to find out more.

    Back to the comparison with Flex - perhaps we should compare Flex to Dojo to be fair? Is it not the case tha Dojo is the UI for XPages, which itself is more of a backend technology?

    Would still like to see how close to what I've done Flex somebody can get XPages...

    Jake

  3. XPages is not fun but hard work (for me). It is nothing I would consider for a spare time project. It is slow and Dojo really xxx (is not smart enough for me). I haven't liked it when it was IBM Workplace, now that it leverage nsf it has not gained much to me. I use it, I like some of the concepts and I see that you can make money with it. That makes it a nice technology for my income but not for my spare time. What it has in common with classic Domino development is that I want to switch off a lot of the auto generated stuff. I want more control. I want jQuery instead of Dojo, less auto generated code. This has never been the concept of Domino so I demand something that in theory has never been there. The advantage is that for classic Domino I know a lot of hacks to get around this (codestore has always been a valuable resource) but for XPages I am still not advanced enough. Perhaps XPages will allow me to get a more formal relationship with Lotus Notes and Domino just like many other developers.

  4. I agree that the development time is the most important indicator of a win or fail. I'm absolutely positive that the demo can be recreated in XPages, since in the end it will spit out HTML, CSS and JS. These technologies can definitely reproduce what you did, especially using jQuery.

    So in capabilities I see no difference, in timing, I expect Flex to win by far. I'd like to add that I think the comparison is not completely pure. Your are comparing HTML/CSS/JS with Flex, not xPages with Flex.

    xPages has zero UI capabilities, it is just another (smarter) way to turn dynamic data into HTML, just like ASP.NET MVC is a different way to do what you before would do in "classic" ASP.NET. The UI capabilities are exactly the same, they are restrained by what HTML can do. This is completely different from a RIA, which actually introduces new UI capabilities.

    I guess this is a long way of saying: you're right, timing is what matters most.

    • avatar
    • Perttu
    • Thu 1 Oct 2009 06:02 AM

    Have you visited http://xpagesblog.com/

    With 8.5.1 release some nice stuff is coming.

    Those notes in nine (minutes) videos were fun to watch (for me at least) http://xpagesblog.com/xpages-blog/2009/9/18/xpage-videos-on-demand.html

  5. Can I used the Flex site on my Blackberry?

    • avatar
    • Darin
    • Thu 1 Oct 2009 08:19 AM

    Can I use it on my iPhone?

    • avatar
    • Erik Brooks
    • Thu 1 Oct 2009 08:42 AM

    @Nathan - Yeah, the deployment restrictions aren't insignificant with either technology.

    Blackberry Flash support is rumored for some time within the next several months, so Flex obviously will not be a realisitic deployment option for some businesses for quite some time. But XPages isn't the silver bullet yet either, since 8.5.0 is un-deployable for some companies due to other problems. 8.5.1 fixes much of that, but you're still talking testing/ramp-up time before XPages might be an option.

    Regardless, a fair number of businesses simply don't have/allow Flash to be installed at all, so Flex could be a no-go also.

    But, assuming you have no deployment issues on either end... I think Flex will give you far more functionality for views if you're after the grouping/sorting/searching capabilities mentioned above... unless you need the pseudo-JOIN capabilities or lots of other interfacing with document data or need to handle larger data sets. Then XPages rule the day.

    It would be pretty easy to whip up an XPage app in 15 minutes that would take you hours, if not days, of coding in Flex. And vice-versa.

    Personally, I'm counting on IBM to continue to pour significant resources into XPages (and views, which is really the crux of this demo) to where these sorts of indexing/sort/search enhancements are more easily addressed by Domino.

  6. Funny that you might be able to use flex soon on a blackberry but not xpages, just the opposite for the iPhone

    the bb doesn't have the js power in the browser necessary, and of course you cant run flash on an iPhone.

  7. Late to the show...

    I've been using 8.5.1 and the speed for x-pages development is a serious issue. Try adding a view panel and then selecting a column. It takes minutes for the drop down to populate so you can pick it. If you try to get cocky and edit the source to speed things up, two problems occur. First, just changing some of the source xml causes the validation to run and it takes almost a minute for it to decide each... character... you... type... is... accept...ab...le..... painful. Second, get it wrong and the server throws a very non-specific fault.

    Flex does sometimes take something simple and make it seem difficult - like binding xml straight to a data grid. Sometimes this works, sometimes you have to create a custom object collection. But, once you have the pattern for the later, you're good to go with anything complex down the road. (Thanks to Mark Barton for that bit of genius).

    Load time on the browser is a concern for me as well. Flash pretty much loads in the same time on just about any browser I've tried. X-pages takes ages on IE 6, which sadly some corporations STILL have as their standard image.

    If the IDE was a better experience, I would be giving X-pages more consideration in this fight, but for the moment, Adobe Flex shames IBM x-pages.

    • avatar
    • Jake Howlett
    • Mon 5 Oct 2009 03:07 AM

    I was wondering where you'd got to Jerry!

    Like you, I can't give Xpages my time until the IDE is up to scratch.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Wed 30 Sep 2009

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content