« Missing Carlin (or How to Look Thirty Years into the Future) | Main| Andrew's Allusion (or Creating Primary Keys in NSFs) »

Some Notes on Xpages (or What I Did Over My Summer Holiday)


With props to John Mackey and Andrew Pollack for publishing tips that I leaned on in my work today.  And a deep, ingratiating bow to Thomas Gumz for taking the time to talk to me about some tricky pieces on Thursday afternoon!

You must use Session-based authentication for Xpages.

applicationScope and sessionScope variables totally kick ass.

Finding all the detail controls for things like "what to iterate over in a repeat control" is some deep voodoo.  But it's very satisfying once you find it.

When in doubt, Project - Clean is your friend.

Speaking of the Project menu, make sure "Build Automatically" is turned on.  Unless you don't want it on -- in which case make sure you remember to Build before testing.

It's helped a lot to have a second machine on my desk, with 8.0.1, where I can do things like create new libraries, since that's broken in 8.5 Beta 1.

Screen real estate is VITAL when working with Eclipse.  I already kinda knew this working with Component design, but now that we have visual editors for xpages and HUGE property sets for various controls, dual monitors is going to be a minimum requirement.

The Outline control is one of the most useful aspects of DDE (Domino Designer in Eclipse).

Debugging is a major challenge.  Sometimes the engine throws a global error page.  Sometimes it doesn't.  Sometimes you have to just use the print () command in your server-side script to trace what's going on.

You MUST just open your mind and explore things.  There's no way it's all going to get documented, and it's going to be years before there's a broad base of design patterns and tools to make things obvious.  But you can learn a lot just by going to All Properties and reading the hover help on the properties labels.

The visual editor really only scratches the surface.  Try this: create an Xpage.  Go to the All Properties tab.  Go down to the "data" section.  Click on the property value and you'll see a little plus icon.  Click it.  Read the list of options.  You won't be disappointed.  

All the editors controls -- every place you type in text -- still need a LOT of work in DDE.  The script editor is really rough, and you particularly don't want to try to use the mouse to select content in the script edit pane.  But even some of the edit boxes in regular properties try to deal with type-ahead, and can drag on like a Friday afternoon in the summertime.  (oh... wait... it IS Friday afternoon in the summertime!)

Okay... it's late.... probably no one will read this until Monday, but today is Independence Day, and that's exactly what I feel like I'm getting as I start trying to do some serious projects with Xpages!

Comments

1 - It was XPages day for me too (still going - no get-a-life jokes please). I have no time for holidays Emoticon

As for screen real estate, keyboard navigation is critical. Ctrl+M is your friend when editing. Multiple screens are good too.

There's no context menu for Editor tabs: Close, Close all Others etc. It's all really is a strange brew of Eclipse and Domino Designer and lwpd. My background track today was "It's beta..maybe leta..It's just beta..so maybe leta"

The javascript is standard ECMAScript 3. The parser was implemented with JavaCC. The ~EBNF file is in there. The JSDT allows adding in additional syntax libraries that are supported in the tooling. I think this gives enough IDE extensibility but I'd really still like to see some modern javascript features (E4X, for each, generators, array comprehension, __iterator__, split etc..). ECMAScript 3 is circa 1999.

Hey, there's no line numbers in the javascript editor popup, dialog thing.

Speaking of the javascipt editor popup dialog thing, why can't all the javascript editors just be standard Eclipse editors? And everything else too. So much UI, so many contexts...Alan Cooper's not gonna like this.


2 - Nate,

Can you fill us in on how you see XPages and Comp. Apps coming together at some point?

3 - @2 Bruce, who says they will come together? ;)

Seriously ... the end goal has to be for Xpages to be the non-java composite app component tool in the near future. But we need client support first, don't we Bruce ...

4 - @2 - If I had any ideas, I'd certainly share them with you. Clearly the UI flexibility of Xpages is going to be something that we need in the client realm sooner rather than later. Ultimately, they're going to require some sort of JSF rendering engine locally to work on a client. Whether that's possible in the local Expeditor setting, I really have no idea. I'd like to think so. I fear an overly simple implementation that's little more than an embedded browser and an enhanced DOLS server.

@1 - Dan, it can't be the standard Eclipse editors because they check syntax, and this syntax is not Javascript. It's not at all. And people need to disabuse themselves of this notion. It's not server-side Javascript. It's server-side XpagesScript.

5 - @4 - Nathan - I get that it's XPages javascript. By standard editor, I mean behavior common to all editors, not that they should use an existing editor, but it doesn't matter...I just discovered that I can Ctrl+M form the Events Javascript editor to get full screen. The editor behavior is standard. The line missing line numbers are just a beta thing.

Language features are another discussion.

6 - The '@' function prefix is the naming rule for all XPages Javascript identifiers. You can use '@' as the first character in any identifier:

@revenue = 200;

function @sqr(@v) {
return @v * @v;
}

@plan = @sqr(@revenue);

I doubt that I'll use it but there it is. You could build script libraries of '@functions' and import them into your XPages. Or not. @Functions...Just like any other function but with an '@'.

F(oo)B(ar)Script? F(an)B(oy)Script? Who knows what the 'FB' in FBScript(2) stands for? Is the 'B' for B(ill)?




7 - @6 - Interesting. I could see wanting to build my own libraries for the @functions that they left out. @SetDocField and @GetDocField for instance.

8 - Or maybe @SetDocumentUniqueId(...)

I don't know how document context is established yet. You could pass the doc in explicitly but that would not be idiomatic @Formula (@Formulaic? ).

Well designed script libraries using this naming convention would be guaranteed not to clash with names imported from standard libraries, thoguh any standard libraries worth using should have their own 'namespace' anyway.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Search 

Disclaimer 

Welcome to Escape Velocity!

Opinions expressed here by Nathan T. Freeman are not necessarily those of his employer. However, there's a decent chance they are, so check with them if you really want to know.

But really... do you need that kind of validation? Are the opinions expressed here in doubt?

MiscLinks