Mobile Fail Point No 1

July 23rd, 2008

I’ve quickly come to realize that the mobile worlds has a huge dependency on synchronization tehnology to make things work smoothly. Toucan read your email on the phone and reply from your laptop. Read rss items should be synced and just about everything else on your phone should be synced with somewhere else.

The problem is that generally synchronization support is lousy. NetNewsWire is too slow syncing feeds, Mail.app doesn’t seem to notice if a message changes from unread to read and the WordPress iPhone app doesn’t seem to download drafts that you created in the browser interface.

Sync is the killer requirement that goes unsaid on mobile devices. You can spend as long as you like polishing he UI but if your synchronization isn’t seamless your app will be a chore to use. If you get it right users won’t notice at all.

The iPhone Is A High Bar

July 15th, 2008

I’ve been looking forward to the iPhone 2.0 OS and the App Store for a fair while, not because there was new functionality I desperately wanted on my iPhone but because having access to native resources should make the few common webapps I use better. I was particularly impressed by Apple’s notification system and looked forward to say having a flag on NetNewsWire showing me how many unread items I had or being able to be notified me when someone sent me an instant message.

Sadly, the launch of the app store for me demonstrated just how much effort Apple put in to polishing their applications and getting them right and just how important it is to get real user feedback during development. None of the applications on the app store that I’ve tried have really impressed me. Most are good applications, but none have really thought through the use cases well, none of rounded off the corners and been polished. In short, none of them are iPhone standard.

The thing is, by Mac software standards they’re all notch applications but the iPhone requires really going the extra mile and getting the whole package right.

NetNewsWire on the iPhone was my biggest disappointment, mostly because NewsGator was my most used webapp and I looked forward to NetNewsWire taking advantage of the extra things an iPhone app could do. Sadly, it simply didn’t add anything over NewsGator except that it downloads everything at the start and is then generally snappy. It doesn’t provide a badge showing the number of unread items which is the one thing an app could have added over NewsGator’s iPhone tuned interface. Worse though, it takes a number of steps backwards - it doesn’t show all your feeds but it also doesn’t show the ones with new items. It shows the feeds that have recently had new items. The net result is that you don’t have access to older unread items and you have to scroll through your feeds to find the unread ones.

Worse, it provides a “Next Unread Item” button but not a “Previous Unread Item”. Sure it removes clutter, but it also means you wind up reading posts in reverse chronological order. With the blogs I read that means reading conversations in reverse.

On the responsiveness front it comes tantalizingly close. I like the fact that it does the downloading upfront and can then let me whizz through all my unread items but if you try to whizz past a post with images you’ll just find yourself coming back to it at the end. Items aren’t marked as read until the iPhone has downloaded every last referenced image in the item. I’m sure there’s another way to mark it as read, but it completely defeats the point of using the next unread item button to quickly flick through feeds.

The synchronization is a major step backwards too. With NewsGator once something is marked as read, it’s read and you can just refresh your feeds with desktop NetNewsWire and it becomes marked as read. With iPhone NetNewsWire that’s not the case. If you open it, whizz through your feeds and close it to do something else, everything you read will be left as unread on the server. Synchronization only happens when you refresh the feeds. This is true of desktop NetNewsWire too but it at least runs in the background (though it’s still annoying if you read your feeds then close your laptop and walk off - you’ll read those feeds again on your iPhone).

Now I know the iPhone NetNewsWire isn’t designed to be full featured and I’m glad it’s not. It’s designed for those times when you’re bored and want to quickly check and maybe read a few feeds. It’s pretty good at that, but wouldn’t the “reading feeds on the train” use case seem important to anyone? Wouldn’t that imply wanting to have synchronization happen rapidly (so you can read right up to the minute the train pulls up and not have to reread stuff when you get into the office)? Wouldn’t that imply wanting to skip things quickly instead of waiting for images to load? After all, you’re doing the same sorting and filtering that you’d do on the desktop, just more likely to clip long articles and read them later.

I really don’t mean to pick on NetNewsWire here, it’s just that I so enjoy using the desktop version because everything is so well thought out that if there was one app on the iPhone that was going to be insanely great it had to be NetNewsWire. I still think it’s the best non-Apple app on the iPhone but I think that’s a shame. We’ll have to wait a while longer before a truly awesome 3rd party iPhone app turns up.

My bet is it will be NetNewsWire 2.0.

All Links Must Be To Web Pages

July 10th, 2008

Jeff Atwood posted a rant about the iTunes Music Store requiring iTunes to be installed in order to access it. In particular, he didn’t like how a link to something on the iTMS resulted in an error page if you didn’t have iTunes installed.

Is it so unreasonable to expect links in your browser to resolve to, oh, I don't know, web pages containing information about the thing you just clicked on? Is there anything more anti-web than demanding users install custom software to display information that could have just as easily been delivered through the browser?

It’s an exceptionally compelling argument but there’s one small flaw. If you’re not sure what it is, just drop me an email.

Creating Clean URLs With IBM WCM

July 8th, 2008

One of the challenges with many content management systems, and IBM’s is no exception, is creating short, clean URLs. As part of structuring and managing your content, the URL segments tend to build up to very long URLs. While most systems have a way to provide shorter aliases they need to be manually created and tend to just redirect to real URL rather than being the one canonical URL for content.

For example, while redeveloping LiveWorks! to be served from an IBM WCM server instead of a WordPress blog (there’s really only so far you can push WordPress before it breaks), I wound up with URLs like: http://liveworks.ephox.com:10038/wps/wcm/connect/LiveWorks/lw/home/mailing-list/ instead of the desired http://liveworks.ephox.com/mailing-list/

Fortunately, Apache 2 has a few modules that can help out here, as well as allowing the non-IBM content (mailing list management, download files etc) to be served from the same domain easily. The basic idea is that clients connect to the Apache server which translates the URL for WCM and proxies it through. When the content is returned, the Apache server modifies the URLs so that the links go to our nice URLs instead of the ugly long ones.

To get started we need  to load the module that we’re going to use:

LoadModule proxy_module         /usr/lib/apache2-prefork/mod_proxy.so
LoadModule proxy_http_module    /usr/lib/apache2-prefork/mod_proxy_http.so
LoadModule ext_filter_module    /usr/lib/apache2-prefork/mod_ext_filter.so

Since we’re using the mod_proxy module, the next thing we need to do is make sure we don’t have an open proxy server as that has some rather bad security consequences for our server and the internet as a whole:

ProxyRequests Off

Now we enable a specific pass through to the WCM server, adding in all that extra URL cruft that it requires:

ProxyPass / http://localhost:10038/wps/wcm/connect/LiveWorks/lw/

So now the URL “http://liveworks.ephox.com/hints-tips/article-name/” will go to “http://liveworks.ephox.com:10038/wps/wcm/connect/LiveWorks/lw/hints-tips/article-name/” and display the right content. We’re not done yet though, our mailing-list page from the original example is meant to be in the root level, but all content in WCM has to be in a site-area so we’ve had to add a “home” site area to hold it. That means our pretty URL is currently http://liveworks.ephox.com/home/mailing-list/

We’ll add a specific ProxyPass directive for the mailing-list page so we get:

ProxyPass /mailing-list http://localhost:10038/wps/wcm/connect/LiveWorks/lw/home/mailing-list
ProxyPass / http://localhost:10038/wps/wcm/connect/LiveWorks/lw/

Now our mailing list URL is right, but as soon as we click a link we get the ugly URLs back! This is where we need Apache to rewrite the URLs for us:

ExtFilterDefine change-urls mode=output intype=text/html \
        cmd="/usr/bin/sed -e s:/wps/wcm/connect/LiveWorks/lw::g"
ExtFilterDefine change-home-urls mode=output intype=text/html \
        cmd="/usr/bin/sed -e s:/wps/wcm/connect/LiveWorks/lw/home::g"
<Location />
        SetOutputFilter change-home-urls;change-urls
</Location>

Wow that’s ugly - both in the way the configuration looks and the way it works. Hopefully some Apache gurus will be able to suggest a better way of going about this. It works by adding two output filters, both of which run ‘sed’ over the content before it’s returned to the client. The change-home-urls filter changes all the URLs to documents in our home site area so they appear as if they weren’t in a site area and the second one changes any other links to get rid of the usual URL cruft at the start. Now we can happily click links and everything works nicely.

One slight oddity in this set up that I’ve found, is that it actually works correctly even if the URL rewriting doesn’t pick up every URL. For example, the URLs to components like stylesheets and images don’t include the site name (the lw part of the URL) so they don’t get rewritten. Somehow they still work though and it would be reasonably simple to devise a filter if they ever start causing problems so we’ll just ignore them for now.

Finally, what about those sections of the site that we want Apache to serve directly? The ProxyPass config has an option specifically to prevent URL patterns from being proxied:

ProxyPass /downloads !

Put that before the other ProxyPass configuration items and any URLs that start with /downloads will be served directly by Apache.

Some caveats:

  1. This only handles unauthenticated users accessing the site, it breaks if you try to access the site through Apache from a browser that’s logged in to the Portal server. IBM Portal tries to redirect you to /wps/wcm/myconnect/ and our filters don’t handle that at all. You could switch it so that only authenticated users can access the site by changing /connect/ to /myconnect/ but there isn’t a clean way to make it available to both at once.
  2. By adding two output filters that run sed, every time a request is made for a HTML page, two instances of sed are run to process the content. For small sites that probably won’t matter but if your server is under load it’s very likely to be a major bottleneck.
  3. Since the output filter doesn’t parse the HTML it will rewrite the URLs anywhere it sees them. If you write /wps/wcm/connect/LiveWorks/lw/ in your content it will be converted to just / but any variant like /wps/wcm/connect/LibraryName/SiteName/ would work just fine.

For the Apache gurus out there, I’d love to hear some options on how to avoid the use of separate sed processes all the time. I tried the mod_proxy_html module but had trouble getting it to compile on SUSE 10. Plus I rather like the simplicity of the regex instead of attempting to actually parse the HTML given how unique the URL strings are.

CMS and Mac

July 1st, 2008

Some time ago now, James Robertson blogged about the poor state of Mac support in CMS products. Quite rightly he identified the WYSIWYG editor as the most common problem area which of course got my attention. It’s over six years ago now that Ephox switched over to Java from ActiveX to get support for Mac and it’s probably the smartest thing we’ve ever done. Not because we have vast numbers of Mac users, but because it only takes one Mac user to sink a deal.

It’s taken me so long to post because just talking about your Mac support has no credibility, so I wanted to show copy and paste on Mac - the precise task that James found so many problems with. So I present for your entertainment, copy and paste from Word on a Mac, the 30 second demo, complete with cheesy music. Naturally in QuickTime with iPhone optimized versions built in.

I had wanted to go over the top and do it all in the style of an old silent movie but there’s only so much time I can justify on this…