XPages in Domino Beat Maker Designer 8.5
If you've downloaded the public beta of Domino Designer 8.5 (often referred to as DDE, or Domino Designer in Eclipse), you should have seen the new design element called an XPage. If you have been living in a cave (hey, hobbit, leave the zombies alone...), XPages are a web-only (at least for now) canvas upon which you can lay out various controls to produce radically new Domino application designs. XPages are to traditional Domino web development what Notes 4 and LotusScript were to @formulas and then-traditional Notes client development. No kidding, XPages allow for a massive paradigm shift.
Along with Andrew, Nathan and John (and quite a few others), I was at IBM in Westford this week for an class on XPages. We spent most of our time saying things like, "But that means we don't have to..." or "That means now we can..." The possibilities are endless. And I'm really - really - impressed. I've been beating IBM up privately over the fact that the shiny new LotusScript editor isn't in 8.50, and I thought that DDE without it wasn't enough of an improvement to bother with. I was wrong. Completely, totally, utterly wrong. If 8.50 included XPages and nothing else, it would still be the biggest thing that's ever happened to Domino development. Don't take my word for it, though - try it out yourself. And definitely keep an eye on the blogs over the next few months, because I guarantee Nathan's tutorial (on, get this, creating a JOIN in a Notes view - seriously!! Go read it now and come back, I'm not going anywhere...) will not be the last really cool XPages snippet you see.
Things that are difficult or impossible to do without XPages, but easy with them:
- As mentioned above, Nathan already showed you JOINing data from multiple views and forms into a single view, in a quasi-relational way.
- Similarly, performing quasi-relational updates to multiple documents based on a common key goes from being annoying to being completely trivial, because on a single XPages you can bind fields to multiple different forms/documents and save all the elements at once.
- Paging through views, a la Google search results, which currently requires jumping through hoops, is as simple as dropping a control on a form. And yes, it handles responses and categories correctly. There are several styles built in, or you can choose to create a custom one.
- Tabbed forms, currently hack-tacular, are also just a control on a form.
- Multiple views and/or forms on one web page, which is another hack-tacular treat, typically requires iFrames and isn't supported visually in Designer, is trivial because XPages doesn't care how many view or table or field (or ...) controls you drop on a page.
- Complete control over view output, including multi-row view entries, is as simple as using a repeat control to let you iterate over the view entries and do anything you want to them.
- Search results, and their UI, and their sort order? Not a nightmare anymore. A simple matter of passing the search query to a page with a view control (or a repeat control), setting a 'search' property to reflect that query, and configuring the control and the XPage's layout however you want to see it. Passing that query involves using the application (or session or ...) scope, which you can see in Nathan's tutorial.
- AJAX partial page refreshes are as simple as choosing which elements to refresh.
When I originally heard some of the capabilities we would be given by dropping controls on a canvas (seriously, IBM, that's what the name should be, not XPage), I thought we would be restricted by what those controls included when IBM built them. In other words, I thought this was just the Java applets all over again. And, as you should know by now, I was wrong. First of all, it's possible to build custom controls ourselves. Secondly, if we don't like the way the Designer's IDE is doing something on our XPage, we can go directly to the source and edit it manually. And finally, just about everything I saw, properties or events or labels, can be computed. In his 'join' tutorial, Nathan points out the 'little diamonds' that allow setting things dynamically, and the fact that they exist is extremely (or XTremely?) cool.
Conclusions: These are MY conclusions, not IBM's or even Acme, Inc's (the legendary employer). And I am, as always, an idiot. Believe me at your own risk.
- XPages will give Domino (web) developers a 500% productivity increase. For free.
- XPages will allow us to build applications we either cannot build at all or can build only at prohibitive cost and effort now.
- Once XPages are available in the client (not hinting at NDA secrets here, I'm not saying that will happen at all, much less any idea of when, but IBM has been asked to provide that by quite a few people, publicly, and they aren't idiots - they have to see the potential), forms, pages, framesets, subforms, navigators, outlines, and MAYBE even views become effectively deprecated - or at least unnecessary. This is huge. If XPages, and the custom controls that come with them, contain the entire application UI and business logic, why use the traditional elements at all? So many of our current limitations and restrictions go away with XPages, and they are so much more powerful and flexible that we won't WANT to use the old elements. And hopefully IBM will develop future XPages iterations in such a way that we don't HAVE to. I'd like to see a data schema editor, rather than binding my XPage fields to fields from a form. A decent XML editor would do quite nicely. I'd like to define view indexes, but not formatting, and I don't think I need to see the view in the current visual representation in order to do that (think SQL). Maybe those things are impossible, but that's what occurs to me when I think of a world where most of the current UI design elements are irrelevant.
- XPages are NOT difficult to learn. They are very powerful, very flexible, and the possibilities may seem overwhelming at first. But - and remember, I'm the guy who ranted at great length on this site about how unnecessarily difficult it was (and is) to do CA and Eclipse plugin work, so I'm not a PollyAnna when it comes to this sort of question - it isn't difficult to USE the techniques. The difficulty will lie in learning what they all do, and figuring out which one is the best way to accomplish a particular goal. But the actual code and the techniques involved? Not hard at all.
Start working with XPages in the beta. Really. And be prepared to be blown away.