bespin chromend

This post is kind of extension, to the idea described in the previous post, so if you have not seen it yet it’s recommended to check it first. This idea is not only extension to the previous idea but it’s also an extension to a firefox :) Basically it’s a bespin backend implemented on the chrome side as an extension to the mozilla toolkit.

Not sure if you ever wrote some code for firefox or any other xulrunner application, but if you have this experience I’m sure you’ll agree that biggest problem with it is a lack of good tools. (This doesn’t applies to the Emacs users :) What I can see now is the really big potential in bespin to change all this, I will try to describe how.

Not sure if you ever heard or might even used mozrepl which is firefox extension which lets you program Firefox and other xulrunner based applications from the inside :) Extension listens to a port and by default, input is considered to be a JavaScript code which get’s evaluates by extension and result of the evaluation are printed to output. Cool thing about mozrepl is that it has a support for custom interactors, what means that, you can define what should extension do with data on it’s input. I had a project with a goal of building a client for mozrepl inside komodo edit. It already had a custom interactor for mozrepl capable to reply to XMLHttpRequests. It would be pretty simple to modify interactor the way that it will act as a bespin backend :) The hardest part here is to implement all the User, Project, File etc.. models defined in current python backend. Guess what ? As I am already working on a port of backend to JavaScript all this work could be reused without any modifications in extension as well. Only thing that would have to be done, would be an implementation of File API defined by ServerJS usingĀ  xpcom’s, which is won’t be a big deal anyway. Afterward all this could be packaged as a nice extension and then ….. 0_o

Just imagine to open bespin inside firefox, with a project firefox inside. There you’ll be able to modify any file, which will actually modify the source of firefox, and changes will be available on the fly in the firefox where bespin wll be running :) So does this blows up you’re mind ? Not yet ? Ok then imagine being able to open a page source on view-source in bespin inside firefox instead of the regular source viewer window !! Hmmm still not enough ? Ok then imagine being able to set a breakpoints in the bespin inside firefox to the source of the firefox in order to debug it :D And remember it doesn’t really has to be you’re local firefox it can be even onĀ  a different machine on a different platform :)

Hope I got you exited, as all this will be something I’m going to focus on as soon as JS port will be finished. Well debugging part won’t be as easy as the rest, but hope you are able to smell the future of xulrunner development using bespin!!


About this entry