Bespin is yet another cool project from Mozilla Labs. Ironically, Mozilla Labs seems to be geek through and through: they create stuff and it pretty much disappears. What software has come out of Mozilla Labs that really moved into mainstream use? Firefox does not count. It predates "the lab". The idea of Bespin is that you do your code editing online. Cool. Especially for web programmers (which is how I spend the majority of my development time, of late), as it means that you can work on the fly, anywhere that you have an internet connection. That caveat is becoming a smaller and smaller one as of late. With the dawn of netbooks and easy to find WiFi, the idea of coding without an internet connection is becoming the harder sell.
You can already start using Bespin without the hassle of setting it up. Mozilla allows you to create an account and use their software as a service at http://bespin.mozilla.com/. This tends to make me uneasy and has the disadvantage of not allowing me access to the compilers and interpreters I love to play with. So, here is how you go about taking the latest source and running it yourself:
- Get the latest revision via Mercurial. Normally, I would suggest using a stable release, but in a package this young, no release is stable and the difference between release and head is much larger than usual. Use this command:hg clone http://hg.mozilla.org/labs/bespin/If you do not have, do not want, or cannot get Mercurial, navigate your browser (you do have that, don't you?) to the URL above. Mercurial's web interface will come up and you can simply download an archive (zip, gz, bzip2) of the latest revision.
- Bootstrap the setup. Bespin's backend is written in Python and uses a fair number of Python libraries. The easiest way to get all the dependencies at their correct versions is to install the libraries into a virtual environment--which is basically all the bootstrapper is for. To do this, enter the directory you grabbed above and run the command:python bootstrap.py --no-site-packages
- Bespin uses some very specific versions of two libraries: Path and Paste. Development revisions, as of this writing. To install the correct version of Path, run this command:
bin/pip install http://pypi.python.org/packages/source/p/path.py/path-2.2.zip
- Next, run:
bin/pip install ext/Paste-1.7.3dev-r7791.tar.gzto install paste. The wiki is out of date here as it gives the default location has lib instead of ext.
- To build a package that you can run on a server, run:
bin/paver dist - This will spit out build/BespinServer.tar.gz; copy this file (if necessary) to your web server and unpack.
- Next, we need to configure Apache (at least, I assume we are using Apache; I am, but I would assume you could run this anywhere you could run it under IIS as there is an ISAPI filter for it, though I do not know how good it is).
Beyond this, I never got anything that worked. I installed the WSGI application, but got continuous complaints from it about missing files. I ran the development server out of the bespin source and it kind of worked, but I reached a couple of conclusions. Bespin is too finicky (dare I say buggy?) for anyone to really deploy outside of its creators and that I didn't really want to deploy it. Ultimately, it felt like jEdit on the web. Now, jEdit is a fine editor, but I am too wired into the vi mindset to swap for a jEdit wannabe. At any rate, I can see some real potential here and I hope they do well. It's just not for me. Finally, I am posting these notes to help anyone else who may want to give the whole thing a whirl.
Sources