Bespin: code in the cloud

Despite working for an open source company, I have been pretty quiet here about what I’ve been doing in the Mozilla Labs web developer tools group. No more. We’ve gone public!

Mozilla Labs » Blog Archive » Introducing Bespin

Bespin proposes an open extensible web-based framework for code editing that aims to increase developer productivity, enable compelling user experiences, and promote the use of open standards.

I started working on Bespin as soon as I joined Mozilla, hitting the ground running with a new Python server. Ben and Dion had already done a lot of work and experimentation on Bespin prior to joining Mozilla in December, so I must confess that I am still fairly ignorant about the Canvas-based magic that they’re doing in the UI. But, Bespin has an architecture that lends itself well to selective ignorance: the server provides a RESTful API, and the client is responsible for all of the presentation. For their part, Ben and Dion have been able to be blissfully ignorant about the inner workings of the Python server.

Of course, I’m not a JavaScript noob and have done some work in the client, but my focus has been the server. Now that we’re out in the open, you can definitely expect that we’ll be talking more about how things work and how you can bend Bespin to your will. Bespin is honest to goodness open source (MPL-licensed), so it becomes an open and collaborative effort starting right away.

The initial reaction has been fantastic. There are tons of people hanging out in #bespin on, and the mailing list has grown to a couple hundred members already. Thanks to everyone for jumping in with your thoughts and patches!

Here’s some of the coverage:

Dion’s post at Ajaxian:

From Dion’s personal blog:

Foolish chaps and companies have come to me in the past thinking that open source will be a silver bullet for “getting other people to do our work.” Those that have been involved in open source know that it isn’t the case. It is often more work. But, it is worth it.

From Ars Technica:

The project is still at an early stage of development and there is clearly a lot of work to be done before it will be able to deliver the same practical value as existing desktop editors. Despite the limitations, it shows an enormous amount of promise and has the potential to eventually deliver a user experience that rivals even the best text editors.

From Five Questions with Dion Almaer:

Now the browsers are moving fast again and building a first class platform for us to develop, the Open Web Platform. Instead of getting bogged down thinking about what IE 6 gives you, take some time to think about what you could build with the latest technology. I realise that you have to be pragmatic and get things working with your audience, but browsers are changing, and so are expectations.

From What Mozilla’s Bespin Bespeaks (ComputerworldUK):

You can see that Bespin is ticking all the Mozilla boxes, but what’s also striking is that this is a Web-based project: Mozilla is entering the cloud. It’s a further shift to viewing the Web as a platform for doing, well, just about anything. Clearly, against that background, open standards are even more important. And not only for the code: another issue that Mozilla will need to start addressing publicly is that of open data. As more stuff moves into the cloud, it become imperative to establish minimum standards for access to the data that is held there. I look forward to hearing Mozilla’s views on the subject.

While I certainly don’t speak for Mozilla, I would be extremely surprised if there’s anyone at Mozilla that believes that users should have anything less than full access and ability to take their data with them. There can be technical issues involved in providing the data, but the data should be available in some reasonable form. Bespin, for its part, makes it easy to export a project in a tarball or zipfile.

I was surprised to see Bespin covered even on Lifehacker:

Primarily, Bespin is a text editor—the kind you’d use for editing code or managing text-based todos. Using Bespin, developers could collaborate on projects through a unified interface (that still supports plugins!) no matter where they are—so long as they’ve got a browser.

cnet has the story, too:

For example, what about integration with open-source software repositories? If it’s flexible enough, Bespin could essentially act as a source code viewer that repositories such as SourceForge or Google Code could employ.

A nice writeup on the ReadWriteWeb as well:

It’s clear that a great deal of thought and attention went into this early version – and it’s a safe bet that it will only get more impressive as time goes on.

RWW last month surprised me with their coverage of me joining Mozilla.

I’m having a great time at Mozilla so far, and it’s great to be out in the open working with so many people now on Bespin and ServerJS.

11 thoughts on “Bespin: code in the cloud”

  1. I got a kick out of seeing your name pop up in the commits. This project seems to hit all the buttons for me so I’ll probably be seeing you on the mailing list after I work my way though the codebase and see exactly what’s going on.

  2. I don’t buy much into this “cloud” thinggy: can’t wee just see this as client-server model? By that I mean: more like standard e-mail than like Gmail. Of course, it is often convenient to have someone else run the server, but anyone can run his own server, right?

  3. @Dion: Thanks! And I’m looking forward to looking back at you looking forward to looking back 6 months from now.

    @Steve: The collaboration isn’t there now. I can’t make any promises on delivery time, but given that PyCon is later in March there is a possibility that Bespin could be used that way. We’re going to start planning out the collaboration features in the next few days, so that will give us an idea…

    @Karl G: Good to hear from you again, and I hope you like what you see as you wend your way through the code.

    @Marko: That’s unusual. You may want to submit a bug. I certainly don’t see that kind of behavior in the FF 3.1 beta I’m running on my Mac.

    @Baptiste: This is open source, so anyone can certainly run their own servers. The “cloud” aspect is somewhat important, though, because you get interesting side effects when people can collaborate effortlessly.

  4. Bespin is really cool, but I still don’t know what this python server you mentioned is all about. Care to talk a bit more about it? perhaps on another post?

  5. @Flavio: Grab the source. The server uses a very simple a custom rolled (google the do-it-yourself-framework on pythonpaste for the rough idea) framework that reminds me a lot like the first TurboGears releases. That is, if TG was built on WSGI, used route type dispatch, and lacked templating engine support. If you’ve poked around with Pylons/TG2 stuff it’ll be fairly familiar.

    @Kevin: Is this just a preview release a la mozilla/browser or are you interested in outside help? Any plans on releasing design docs or session notes or should I just camp out on the mailing list for a while?

  6. @Karl: While this is a preview release, it’s definitely open source and assistance would help a lot! People have already started sending us patches.

    We’ll likely have some more screencasts soon describing how things work. Hanging out on the mailing list and asking questions is a fine way to get going until then.

  7. Interesting, but it does not seem to work for me. I found an alternative from a service called They allows code editing directly from files stored on any cloud you have plugged into their platform such as Amazon S3, Mosso Cloud Files, etc. They also support pluggin and FTP directory into their platform so you can treat it as a cloud. You can find out more at

Comments are closed.