The future of Ajax

GUI layout in Ajax goes like this: You are fine as long as long as you have absolute values (“this sidebar is 300 pixels wide” etc.), but when it comes to relative sizing (“I want the toolbar to be as small as possible and the content to take up the remaining space”) one is in for a world of pain. After having spent way too much time in that world recently, I wondered when web browsers are finally going to implement better layout features. After all, this problem has been largely solved (really nice layout managers for Java are JGoodies Forms and MiG Layout). Here is what I found:
  • The OpenAjax Alliance has voted on a browser wishlist that includes a lot of interesting details. This wishlist is supposed to guide browser vendors towards features that make sense for the Ajax community. Not suprisingly, layout issues rank high on that list.
  • The Future of CSS and the end of 3.0: This article is almost one and a half years old, but it still rings very true to me.
  • XUL is a Firefox-based widget toolkit that can be programmed in JavaScript. It avoids many of the Ajax CSS problems, because it has specifically been designed for applications (and not for hypertext). Firefox-only, but it should not feel alien to Ajax developers because it does not stray to far from browser technologies. While some test code for using XUL via GWT is out there, I wish there was something more usable.
Update 2008-03-16: The browser wishlist entry “Better UI Layout” links to a css-flexbox proposal that borrows layout ideas from XUL.


Switching to Mercurial

So far, I've stuck with CVS, with occasional excursions to SVN. Both CVS and SVN are centralized version control systems. But I like the idea of distributed version control systems (DVCS) and it seems that the SVN developers agree. With a DVCS, everything is a repository. You don't have a working copy that you check out, you have a local repository that is cloned from another one. Changes are always pushed from one repository to another one. This means that you can use any number of intermediate repositories with the following advantages:
  • Offline use: You can check in and have the complete history even when you are not connected.
  • Branches: If you have something that is not yet finished (say, when moving from your work computer to your home computer) or want to try out things, you can always introduce an intermediate repository. If you are not happy with where you ended up, you can discard this repository, otherwise you push its changes.
There are quite a few DVCS around; you might have heard of Mercurial (used by Sun's OpenJDK), Git (used by the Linux kernel), or Bazaar. I've decided to use Mercurial, because it is more popular than Bazaar and less complicated than Git. Quickstart:
  • Install: a binary (easy_install works really well)
  • Test on command line: hg debuginstall
  • If the test fails on Mac OS X: In Terminal, uncheck the option “Preferences -> Settings -> Advanced -> Set LANG environment variable on startup”.
  • Eclipse: Merclipse plugin (simpler than Mercurial Eclipse).
  • After installing it, check its section among the Eclipse preferences and make sure that it finds the “hg” command.
  • If not, there are two ways to fix things under Mac OS X: Start Eclipse from the command line (where it uses the same environment variables as during the debuginstall test). Or set the GUI environment variables in ~/.MacOSX/environment.plist
  • Netbeans: support is built in
Things to know:
  • Authentication under Merclipse: work-around via user:password@http://hosting.org/repo/
  • Cannot group several projects in one “module”, need a repository for each.
  • Mercurial files are only in the top-level directory: .hg/ and .hgignore
  • More information: at the Mercurial web site.
First steps (uploading)
    cd mydir
 hg init   # turns the directory into a repository
 hg stat   # check what files are visible to Mercurial, edit .hgignore accordingly
 hg add    # add all files that are visible to Mercurial
 hg commit # commit the changes to the local repository
 hg push http://hosting.org/repo/  # push change (URL only needed for the 1st time)
First steps (downloading)
    hg clone http://hosting.org/repo/
 # perform changes
 hg commit
 hg push
Mercurial hosting: There are many great options if you want to host your Mercurial repository on a public server. Free examples:
  • freeHg.org: Only hosting, nothing else (issue tracker, wiki, ...)
  • Bitbucket: Nice clean interface, adequate free plan.
  • ShareSource: For open source projects, a bit more complicated than Bitbucket.


Synching Google Calendar with iCal and Thunderbird

Via the CalDAV protocol, Google now supports bi-directional(!) synchronization between Google Calendar and iCal or Thunderbird. Details [source: fscklog]:
This is great, previously one needed the purchaseware BusySync to do so (note though, that BusySync also allows you to sync iCals in a WLAN).

Related post: Cloud-sync your iOS calendars (bonus: PC/Mac)

Apple pushing Mini DisplayPort through no-fee licenses

Good. This makes the display plug that Apple will use exclusively in its future machines a little more like a real standard.