Archive for July, 2009

OSX and back

by oliver | July 29, 2009 | In Apple, Microsoft, OSX No Comments

Recently I have abandoned my plans of switching to MacOSX as my primary Operating System after using the the OS for four months straight without touching Windows. Don’t get me wrong. I enjoyed the ride – a lot! But I also had plenty of reasons for going back to Windows (7). First of all I don’t like Apple’s attitude. I think they are turning into some kind of evil empire against which even Microsoft during its darkest days pales in comparison. I also regard Apple’s sloppy handling of serious security vulnerabilities as highly unprofessional. Then there were details that many users wouldn’t even notice. For example I’m obsessed with ClearType and could never become really comfortable with Apple’s Font Anti Aliasing which is still a lot better than Ubuntu’s though.

Anyway I decided to ditch the OS but I’m keeping the hardware – my keyboard to be precise. After typing on this fantastic keyboard for a couple of months there is no way going back to that cheap plastic crap that you usually deal with on the PC. What’s really odd is that there are peripherals vendors who are charging more for their plastic toys that do not even feature a built-in USB Hub than Apple for their anodized aluminum enclosure that offers a rock solid typing experience and even includes a USB Hub. In conjunction with an utility called SharpKeys which I use for swapping Cmd with Alt, this fine piece of craftsmanship can used pretty comfortable under windows.

Every Web Application Project I’ve been involved in the recent past had one thing in common: the client demanded more and more rich-client features at an ever increasing pace – without committing itself to real rich-client frameworks such as Flex or Silverlight. This leaves us with Javascript / AJAX for implementing highly dynamic User Interfaces for Web Applications. A very common problem when working with Ajax is the requirement to update multiple parts of a page in response to a single request. This post aims to familiarize the reader with my own approach to this problem.

At its core my solution consists of just two functions – one running server side and the other executing on the client. The first function is intended to run on the server and is written in Groovy. It was originally written in Python for use with the Django framework and I’ve ported it to Groovy when I switched to Grails as my primary RAD Web framework. This function takes a map as argument and returns a JSON encoded map where the key is a valid jQuery Selector designating the targets for the update and the value is a map containing information how the matched elements should be modified and how the content for the update shall be produced. Don’t worry if you find this confusing at first. There’s a sample further down.

[More]