It recently came to my attention the existence of this heavily-client-based web framework to develop desktop-like applications called Sproutcore and is backed up by Apple (there is another cool alternative called Capuccino). Basically it relies on Javascript to create nice desktop-like applications, but on the web.

Ever since i heard about node.js i have been curious to try out one of these things. My ideas on it will come later but, for now, here are the required steps to make Sproutcore work well on OSX snow leopard. And i say work well because if you rely on the vanilla Ruby 1.8.7 that comes with snow leopard you will have a very crappy experience with Sproutcore; It will take approximately 35 seconds to reload any webpage every time you make a code change. And that will make you not want to use it at all.

Fortunately a lot of people have been kind enough to explain me, on twitter, how to make it faster.

But let's start from the beginning:

1. Install Sproutcore using GEM, like so: sudo gem install sproutcore Note: I don't remember if gem comes installed with snow leopard. If not, you can always google it :)2. Follow the rest of the steps to setup your first application

By now you should have realized that (if you are using OSX snow leopard) the damn thing is freaking slow. So...

3. ...download and compile the Ruby 1.9 source code for OSX tar xzvf ruby-1.9.1-p376.tar.gz cd ruby-1.9.1-p376 ./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1 make sudo make install Note: The actual version could be different, as stuff evolves over time ;)4. Update the symbolic link on your system to point to the new ruby installation sudo rm /usr/bin/ruby sudo ln -s /usr/local/bin/ruby /usr/bin/ruby 5. Make sure the correct Ruby version is in use ruby --version Should return something like this: ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.3.0] 6. Install thin. This server is faster than the one that comes with Sproutcore sudo gem install thin 7. All done. Give it a try again

If you try to refresh the page of a Sproutcore example now you will notice the speed difference, like night to day. Have fun coding client-side desktop web applications :)

I'm planning to also take a look at Capuccino, another similar framework, but created in Objective-J - a derivative of Objective-C for javascript. Looks interesting and it might get me into iPhone development at last :)