« Back to home

Search is hard

Getting search right in applications has many interesting subtleties. One problem is that most people don’t understand boolean algebra, to the point that they don’t understand the difference between “and” and “or” in a set of search clauses. Unless your audience is highly technical, giving them a choice between “and” and “or” will only confuse them. If you look at sites which successfully allow complex queries, they do it by using the type of UI component to express whether the choice is “and” or “or”.…

Read more »

Implementing live search on a web form using XPages

Given that people find it hard to select from more than around 8 options, the “drop-down selector with live search filter” design pattern is useful for all sorts of situations. If you have a reasonably small number of options, you can do it all client-side. A couple of thousand select items can be read as JSON and filtered client-side without too much of a performance hit — at least, on the desktop, with a reasonably fast Internet connection.…

Read more »

On ad blocking and ethics

Apple’s introduction of an API for browser content blockers on iOS has reignited the debate over ad blocking on the web. While Apple have promoted the feature as something aimed at improving the mobile user experience, others have pointed out that it’s transparently an attempt to harm Google. In truth, it’s both of those things. The mobile web experience without a content blocker is wretched. Just yesterday I attempted to read an article on the New York Times, only to have it forcibly scroll my tablet to the top of the page in an endless loop to try to force me to read the ads.…

Read more »

Why the mobile web sucks

Posted on

Over at The Verge, Nilay Patel writes: I hate browsing the web on my phone. I do it all the time, of course — we all do. Just looking at the stats for The Verge, our mobile traffic is up 70 percent from last year, while desktop traffic is up only 11 percent. That trend isn’t going back; phones are just too convenient, beckoning us to waste more and more of our time gazing at their ever-larger screens.…

Read more »

User friendly edit buttons with XPages

I wrote my first full application using XPages, the new IBM Domino web development environment based on Java Server Faces (JSF). It’s been quite a brutal learning curve, even given that I already knew both Java and JavaScript in some depth. Some things that are trivial ‘the old way’ (in Notes) are harder on the web with XPages. For example, when you try to edit a document and don’t have permission, the Notes client will give you an error message.…

Read more »

Tracking down misbehaving Domino web agents

The problem: You have a web agent somewhere which uses LotusScript MessageBox to output an error message. However, the message doesn’t say which agent or database it’s being output by, so you need to locate the agent which is printing the text. The solution: At the console, set config AgentThreadDebug=1 tell http restart The HTTP task will then display a debug message for each web-triggered agent that starts or ends.…

Read more »

Cookies with XPages

My first XPages app is coming along nicely. Today I needed to add some cookie support, and discovered that the otherwise comprehensive Mastering XPages had no information on the topic. There’s a post on the Lotus Developer Domain, but it’s a bit vague and makes the whole thing look harder than it really needs to be. I started by writing myself a quick Server Side JavaScript library to encapsulate the details.…

Read more »

Getting UTF-8 out of Domino web agents

A common technique for getting XML data out of IBM Lotus Domino is to build an agent which outputs the DXL encoding of a document and call it via HTTP. The code typically looks like this:

Print "Content-type: text/xml"
Dim session As New NotesSession
Dim doc As NotesDocument
[...obtain your data somehow in the variable doc...]
Dim exporter As NotesDXLExporter
Set exporter = session.CreateDXLExporter
exporter.OutputDOCTYPE = False
Dim stream As NotesStream
Set stream = session.CreateStream
Call exporter.SetInput(doc)
Call exporter.SetOutput(stream)
Call exporter.Process
Print stream.ReadText()

However, there’s a subtle error in the above code. The kind of error that can make everything look fine in testing, then cause your integration work to fall over in production.

Read more »

Form design: You're doing it wrong

One of the most valuable qualities for a software developer is an ability to recognize and admit when they have been doing something wrong. Yesterday I discovered an excellent summary of HCI research regarding online form design, and discovered that I’ve been designing forms incorrectly for years. In summary, the best way to lay out a form is with labels above the fields, left-aligned. The labels should be in smaller regular text, not bold.…

Read more »

Domino date/time format gotcha

I inherited a legacy Domino application which had been coded to assume mm/dd/yyyy format for dates. Bad idea, but there’s a lot of it about. I got a steady stream of users who complained that sometimes when they entered data via the web, the months and days were being switched around at random during save. Yet no matter how much I tried, I couldn’t reproduce the problem. Days of attempted debugging followed.…

Read more »