Biz & IT —

Bespin, Mozilla’s editor for the cloud, gets a reboot

Mozilla Labs has released Bespin applications.

Mozilla Labs has rolled out a major update to Bespin, an open source text editing engine that is built with standards-based Web technologies. The project has undergone a "reboot" with the aim of improving the ease with which it can be used and enhanced.

Bespin 0.6, codenamed Ash, reflects the significant effort that went into the architectural overhaul. The code is more modular and is designed so that virtually all of the core functionality is implemented in plugins. The developers have also made it considerably easier to embed Bespin in webpages, an improvement that will lower the barriers to adoption.

Mozilla Labs launched the Bespin project last February in an attempt to create an integrated development environment (IDE) for the cloud. It uses emerging Web standards, such as the HTML 5 canvas element, to provide a rich interface with support for advanced text editing features like syntax highlighting. The goal was to build a tool for collaborative software development in the cloud that would leverage the portability and ease of use of the Web to improve the traditional concept of command-driven programmable text editors.

During its early stages, the project was driven by JavaScript gurus Ben Galbraith and Dion Almaer. They left Mozilla last year to join Palm, where they have continued to be supportive of the Bespin project, though in a less central role. Palm recently unveiled its own experimental Web-based mobile development tool called Ares that couples an interactive form layout tool with the Bespin editor to provide a complete cloud-based rapid application development platform.

Bespin was originally designed as a holistic Web application with front-end and back-end components that can be deployed on a server to create a Web-accessible programming environment, but the developers behind the project are increasingly focused on producing a stand-alone text editing component that can be used anywhere on the Web. In November, they released an early preview of a new embeddable version designed to be easy to integrate into existing Web applications.

The Bespin text editor embedded in a webpage

The release of version 0.6 includes a "drop-in" build of Bespin—a single JavaScript file and accompanying CSS file that can be trivially included in a webpage to embed a Bespin editor. They also provide a build system, created in Python, that allows the users to generate their own drop-in scripts with specified plugins and components. This makes deployment easy, but also allows for a lot of customization and third-party enhancement.

The underlying editing component itself has also been rewritten to increase flexibility and add support for critical features like international text input. Mozilla's Kevin Dangoor supplied an inside perspective about the rewrite in a blog entry about version 0.6.

"We started out with the thought that we'd leave the editor itself alone, and build up a new app around it. This turned out to be impractical for a variety of reasons, including event handling models and general component interaction. The Bespin editor has been reborn as a SproutCore component," he wrote. "The editor has been reworked into a more proper Model-View-Controller design, which is something we've wanted to do for a long time. This makes the editor easier to extend."

Another major change that has arrived with the 0.6 release is new licensing. Bespin was initially only distributed under the MPL, a relatively permissive license that is unfortunately not compatible with the GPL. In order to address license compatibility issues, Mozilla Labs has tri-licensed Bespin under the MPL, GPL, and LGPL—just like Firefox.

The Bespin project has been a powerful driver of innovation in the Web development community. The ambitious way that it uses the canvas element is especially fascinating for Web standards enthusiasts who are interested in seeing real-world uses of HTML 5 that break new ground. You can download the new version of Bespin from Mozilla's FTP servers.

Channel Ars Technica