Notes and Domino

Useful new preference in DDE 8.5.2 for Java Agents

Having the proper Eclipse Java editor instead of the old style editor was introduced in 8.5.1, but there was one huge annoyance. When you edited a Java file, you had to save that, but then also remember to save the agent as well. Cue plenty of swearing and head scratching when your change wasn’t showing up.

Well in 8.5.2 there is a new preference setting which allows the agent to be automatically saved when you save the Java file:

Just check the “Autosave Java design element on save of individual Java sources” box to make your Java coding a lot less annoying.

Pleasant 8.5.2 surprise… everything works!

Well maybe that’s too bold a claim, but from the point of view of regression testing IdeaJam and IQJam for XPages issues, a vanilla application works absolutely fine. And better than that, it seems to be faster as well.

Why is this even worth commenting on you ask? Well between 8.5.0 and 8.5.1 there were some quite significant changes in the way XPages worked which meant I had to do some re-coding of my XPages apps to get them to work properly when we migrated up to the new version. But, so far, and all of the usual caveats apply here* (see below for more information), I can simply copy an NSF from my 8.5.1 VM onto my 8.5.2 VM and it works.

We’ve not done any proper testing on the performance side of things, but from my usage of the application everything feels snappier.

So, who needs new features when we’ve got stability between versions. Well OK, I’ll not turn down the spangly new development features (dragging controls into the source XML of an XPage is far and away my favourite), but even without them, I’m a happy camper this morning.

*** 8.5.2 is still in beta things may change between now and when it’s released. Let’s hope not eh?

Notes and Domino 8.5.1 – The Upgrader’s Guide – Review

So this is the official 387’th review of IBM Lotus Notes and Domino – The Upgrader’s Guide. Finally every Lotus blogger in the world has now received a copy of the book!

It’s an odd situation for me to find myself in, it’s great to see a book being published about Notes and Domino again. There’s not really been anything of value for the developer since Rocky and Brian’s seminal Notes and Domino 6 Programming Bible which was published seven years ago. And I wish I could say that this new book from Packt Publishing was worth buying, but from the point of view of the developer there is really very little of value in here.

What we (and by we, I mean you and I, the gentle, unappreciated Notes/Domino developer) get is 40 pages of basically extended release notes with very little detail about how to do anything with Notes and Domino programming. To take my favourite topic, XPages as an example, there is a single page that just says “and we now have XPages, yay!”. There are books of material that could be written about the subject on it’s own. It’s faintly ridiculous to just skirt over this whole new programming paradigm in a single page.

So what is the point of the book? I’ve been trying to work out who it would add value to and I am really struggling I’m afraid. I guess, at a push if you have an R6.x based environment and you just want to spend a couple of hours getting the list of new features straight in your head then you could do worse than reading this over a couple of hours. Hardly a ringing endorsement really. The problem that the writers and publisher faces with a book of this style is that it doesn’t really know what it’s trying to achieve. Now if there was an XPages Bible in the style of Brian and Rocky’s book then I would probably end up with several copies but this upgrader’s guide is just not any use to me.

Why using FTSearch in LotusScript is usually a bad idea

Well it’s New Year’s Day so the obvious subject that is on everyone’s lips is database full text searching. Isn’t it?

Yesterday I tweeted about having to remove a load (and I mean a load) of database.FTSearch calls from an application I’ve inherited recently. Several people asked why I would want to do that, so I thought I’d explain.

On the face of it using the Full Text Index to find a collection of documents is an ideal way of working, it saves you having to create a suite of views that will only be used by your LotusScript and we all know that less views is a good thing. But, in my view, there is almost no situation when you should use an FTSearch unless you are looking for a word or phrase across *all fields* in *all documents* in your database. If you find you are writing query syntax that uses the FIELD or CONTAINS keywords then you should probably be thinking again about your code design.

The main issue with relying on the Full Text Index is that it is normally out of date. As a rule of thumb you can’t rely on any changes that have happened in the last 30 minutes to show up in your search results. So in my case yesterday, the agents were being run almost immediately after a new document is added to the database and then expecting to find that document and ones related to it. When you’re relying on luck rather than judgement then you know you have a problem.

So, what to do? Generally the answer is to design your database views carefully. You can build a suite of views that can be used across the database that will allow you to build collections of documents that match your requirements. Remember, you can have multiple sorted columns if needed and pass an array as the key parameter in you getAllDocumentsByKey call, or build composite keys in the first column of your views.

In fact I’d go as far as saying that if your document collection isn’t too big that it may be better to build a larger collection than you need and loop through it to find the exact documents you need, rather than performing an FTSearch. The other benefit of using views, of course, is that you can build a NotesViewEntryCollection which will perform a lot better than a document collection and you get the added benefit of being able to use the sorting from the view design rather than having to apply your own quick sort after you’ve built whatever output array you’re trying to get to.

As with all of these types of general design principals, your mileage may vary, if you have a good reason to use the Full Text Index then go ahead and use it. But please make sure you understand what limitations you face when using the index rather than views.

Domino Designer is Free!

I can’t imagine why you’ve not seen this news, but just in case, with the release of Notes / Domino 8.5.1 next Monday, Domino Designer will now be free.

This is huge news for the platform, as it means that anyone can download and have a play with 8.5.1 which is the first really good version of Domino Designer on Eclipse. It means that you can have a play with XPages without having to worry about CALs. And I’d really recommend taking that look, whereas XPages in 8.5.0 were very much a “dot zero” release, with 8.5.1 we have a vastly improved dev environment and hugely increased performance and stability on the server side.

If you’re in any doubt about what you can achieve with XPages in a relatively short amount of time (i.e. less than it took us to develop the first version of IdeaJam), then have a look at http://IQJam.net, the first commercially available application developed specifically for Domino 8.5.1 using XPages.

Ytria tools just saved me half a day

I mentioned yesterday that we are planning to release the UKLUG Site Template onto OpenNTF later on in the year, having been through the process of “shrink wrapping” a database with IdeaJam I was dreading the process of just adding some consistency to the look and feel of the Notes side of things. It’s the silly little things like consistent fonts, colours and layout that take ages and ages. Enter the Ytria tools called ViewEZ and ActionBarEZ, in 10 minutes I was able to apply a consistent look and feel to the entire database and I’m free then to spend the rest of my Saturday afternoon on more interesting things instead.

So thanks to the Ytria guys for making my weekend better. If you’re a Notes developer and you haven’t tried them out then you really do owe it to yourself to have a look.

Two free XPages workshops

I’ve been at Staines today working with Tim Clark and Chris Freestone preparing for two XPages workshops which will be held at IBM Hursley at the end of November and start of December. I’ll be helping out on the first (and possibly the second one) and they should be pretty good, especially if you want an introduction to getting started with XPages.

The first session details are:
25-27 November 2008
IBM Innovation Centre, Hursley
Cost is FREE
Registration is from the IIC events pages

The second session details are:
9-11 December 2008
Hursley Technical Exploration Centre
Registration: Please email hurtec@uk.ibm.com to resgister.
Cost: Free

Hope to see you there.

Have you checked out the Domino Designer "Wiki"?

The content of the Domino Designer Wiki is really starting to get very useful. If you don’t check there when you have a dev problem then you really should add it to your list of “go to” places. It still doesn’t gell with what my understanding of a wiki is (a wiki should be editable and have automatic cross linking in my view) but setting that aside it’s useful stuff so go have a read.

Continuing XPages progress and first public demos

Another week of developing IdeaJam in XPages has passed and we’re really making progress.

A lot more behind the scenes coding this week that improved voting, but also the first drafts of the Idea screens in read and edit modes, plus a lot of the supporting screens that are accessed from the header menu. So some screenshots (these are as much a record for me as for the blog as I suspect it will be interesting to look back on how quickly we were able to progress with this stuff in the future):


IdeaJam in XPages Progress
IdeaJam in XPages Progress
IdeaJam in XPages Progress


Both Bruce and I will be doing presentations this week. The boss will be at NEOLUG on Thursday and I will be presenting with a certain Mr Mooney about what’s new in 8.5 at UKLUG in London. It should be interesting, Paul is the veteran expert speaker but he gets all the boring admin content (;-)) while I, as the newbie inexperienced speaker, get to talk about XPages. If you’re coming along to either user group you’ll get to see whatever point we’ve got to in the development. Always good to try and demo *very* alpha level code, come watch as I try to explain the error messages!

In all seriousness, development is progressing very nicely, of course we are encountering issues, but with a combination of workarounds and help from IBM we hope to have a really classy extra string to the IdeaJam bow in the next few months.

If you listened to the new 1352 Report podcast (and if not, why not?) then you may also have noticed that Bruce mentioned a new tool that we plan to have ready in the next few months as well, called TaskJam. There will be a lot more to come on that as we make progress.

Anyway, this week is going to be good fun, if you’re coming along to UKLUG then say hi to me if you see me around.

Continuing XPages Progress and some lessons learned

Well we’re now 9 days into the porting of IdeaJam to run in XPages:
IdeaJam in XPages Progress
The screenshot hasn’t changed an enormous amount but you can see that voting is working properly now and I have added the view filtering so that you can look at individual IdeaSpaces. All of those bits were surprisingly easy once I had worked around a couple of bugs. And these are my lessons learned for the week…

Firstly, the new server side @DbLookup() javascript function does not work in conjunction with the @DbName() function if your database is in a sub directory. THis is obviously a bug which will be fixed before 8.5 goes Gold but it took me a while to work out. Anyway, there are two current workarounds, first just work in the root of the server (which is what I’m doing) or you can hard code your database path using the following format: @DbLookup(“xpages//DbLookup.nsf”, “RefData”, “Test”, “Value”).

My second problem took a while longer to track down and I’m sure it’s an edge case but it’s a doozie – I have a custom control which contains a <tr&gr; element that gets repeated in another custom control. What I learned is that you do not set styles on the html element directly, you must assign a class name to the element and define the style in CSS otherwise the Designer client hangs while trying to rebuild the project. It’s a better way of doing things I guess, but I wanted to be lazy!

So those two are the downsides so far, and they’re going to be fixed, but on the upside I have still not written *any* client side javascript myself and I’ve only had to write 2 agents (to handle voting requirements which can’t run under the rights of the authenticated user). That is hugely impressive when compared to the “classic” IdeaJam which can amount to 100kb of Javascript… read big performance improvements for the user. I’ve also managed to reduce the number of views required to run IdeaJam from 15 to 5 due to the different ways that you can apply filtering and reuse views for different tasks… read server side performance improvements.

There is still a lot to do but real progress is being made, and (as Bruce will tell you) I am enjoying this so much that I can be found playing with XPages most of the time now!