Random thoughts from an unusual company

Why I love XPages

Tim Davis  7 February 2012 16:09:01
I have been thinking a lot recently about why I love developing XPages. I had a few conversations at Lotusphere around this subject, and certainly while most people consider it powerful and the right way to go for developments, few seemed to find it easy or enjoyable. The general feeling was that learning XPages was a huge hurdle to get over before you can become comfortable.

I do keep trying to encourage people to get started, and Ben Langhinrichs and I did a session at Lotusphere where our theme was how easy it can be to get some nice results quickly using XPages. You won't be an expert in a short time, but you needn't be scared of them.

However, I have just thought about where I was before I came to XPages and how that may have made a difference for me.

For the previous three or four years, almost all my Domino development had been in websites or intranet systems. I did virtually no development for the Notes Client.

As part of this development, I found myself using passthru HTML, CSS and JavaScript almost entirely. I had built myself libraries to handle all the effects I wanted to achieve, with AJAX and JSON and all of that stuff. I had tried to create standard 'template' design elements for cookie-cutter layout components (mainly subforms), and tried to standardize field and form behaviours so that newer developments could be fairly quickly put together from existing designs.

Then, when I came to use XPages, I found that they do all this for me with just a few button clicks. The handling of styles across controls is elegant and simple. The whole concept of custom controls is the natural extension of what I had been trying to do previously with my 'template' subforms, except so much better. JavaScript was already my favorite scripting language. The Source view in DDE looks like my earlier passthru HTML forms, except more concise with the lovely way a control is expressed with XML tags.

I think I may have had an unfair advantage in the transfer to XPages, since I was already developing using the same tools, and to a degree some of the same concepts. If I was a 'regular' Domino developer, mainly writing Notes forms, views, agents, @formulas, etc, then I can imagine the move to XPages would be very different. All that Notes stuff is hidden away in the XPages world.

This isn't to say it was all plain sailing, I've had trouble along the way, but I can remember what it used to take to create an effect in my old developments, and I just find it a joy to work in XPages.

So what can this tell us? I think if you are struggling with XPages, then the thing to do is to first make yourself familiar with the web development techniques. Get to know HTML, JavaScript and CSS. Learn the browser object model, especially the way every thing is contained inside another thing.  If you can feel comfortable working with divs, with identifying objects on the page by id, and with accessing them using JavaScript, then these ideas will help you a long way along the path of learning XPages.



Comments

1Paul Withers  07/02/2012 18:15:12  Why I love XPages

Before XPages I didn't do a huge amount of web development, but immediately prior to working with XPages I did. I remember writing AJAX requests, requiring quite a bit of JavaScript, plus then LotusScript for an agent. I also remember battling cross-browser compatibility. There were utilities for managing views, but with nowhere near the flexibility that repeat controls allow.

XPages is a steep learning curve. But the resources available and the outcomes that can be achieved make it more enjoyable.

2Brendan Long  08/02/2012 02:31:11  Why I love XPages

I can sympathise with traditional client developers grappling with XPages - my current job of four years is almost exclusively client work and I've grown extremely rusty on the web side since I changed jobs. I'm learning XPages at the moment and it's a bit of a slog at times.

However, I'm finding that when I work things out in XPages I almost always have a "wow, that was actually pretty easy" moment when it all comes together. I can see that once you get up to speed, it's very powerful and much cleaner than the old, kludgy notes web apps that I cobbled together in my early days.

I'm actually enjoying it despite the learning curve.

3Avinash Kharbanda  08/02/2012 09:39:40  Why I love XPages

Very true! It has added a new dimension to development of web apps in Notes world. Even though my current job projects are still client based but the opportunity of running XPages apps in dual client has added a new shift. I agree with the learning curve (which is always good and also important to stay in momentum) but then at the same time it adds up to your resume as well :-)

4Murray Sinclair  08/02/2012 23:56:08  Why I love XPages

I remember at Lotusphere 1996 (yep, I've being doing Domino for a while), at one of the sessions a Lotus self-proclaimed marketing guy showed us devs how to build our first Lotusscript agent.

We had all being using @formulas until then and were cautious about this new LotusScript thing.

Well, he did a great job of breaking down the psychological barriers that stood in the way of our own personal development - the rest is history as they say and I have been using that experience during my xPages learning curve to help me push ahead into the unknown.

5Sven Hasselbach  09/02/2012 11:03:11  Why I love XPages

I totally agree with your opinion.

I have seen some "notes only"-developers who had enough problems understanding the differences between web development and client development. And then, they have to learn and understand XPages-development too - this was too much for the most of them.

For me it was much easier, because I am developing web and notes applications for more than twelve years - so I just had to understand the XPages concepts only.