Editing Firefox

Wednesday April 13th 2005, 8:07 pm Printer Friendly Version
Filed under:Software Development, Firefox
Posted By: Matt

Axel and Geoff both responded to my “Eclipsing Firefox” post, pointing out the difficulting of grafting an editing environment onto Firefox. Axel goes on to suggest that creating a XUL/Javascript IDE inside Eclipse itself might be a more appropriate course of action.

I agree that a great Eclipse-hosted IDE would be a darn sight better than nothing. Nonetheless, I’m not nearly as enthusiastic about this approach, for a number of reasons. First of all, this means that XUL developers would have to be running Eclipse. This isn’t the end of the world, but Eclipse is a bit of a monster in terms of footprint. I haven’t used it in a while, so perhaps this has changed, but in my recollection it has a propensity to eat up a few hundred megs of RAM if you leave it running for a while. I’d rather keep my toolset lean and mean, if at all possible.

The second reason is that there are significant synergies that can be exploited by hosting the IDE inside Firefox itself. For example, this would aid greatly in cache management, since the IDE could be smart enough to reload modified files into the Firefox cache automatically. Just the fact that I could change a XUL, Javascript or CSS file and immediately see the updated behavior of my extension, without having to open a new window, would be a huge boost to productivity. This could surely be achieved in other ways (I’ve thought about trying to write an extension that exposes the contents of various caches and lets you refresh individual files manually), but it also hints at the intrinsic elegance of having Firefox be its own development environment. I’m convinced that many other advantages of this type would become apparent if this route is taken.

The final reason is perhaps the most significant: every good browser requires a good editor, for reasons that have nothing to do with software development. Clay Shirky wrote a pithy diatribe on this topic a while back and provoked a lively discussion. His whipping boy was auto-save; I have to say personally that there is just so much that I hate about writing text inside an embedded text box. It makes blogging and wiki-ing far more laborious than they need to be. It’s true that Firefox along with certain extensions represent a great improvement — Resizable Textarea alone has eased my pain significantly — but it’s not enough. When I see a text box on a webpage, I want an option to open it up into a full window containing an all-singing, all-dancing text editor that:

  • Supports undo, find and replace,
  • Is WYSIWYG,
  • Uses an XHTML subset as its internal data format, with pluggable filters so I can expose Wikitext and other niche formats,
  • Automatically saves every character I write in case of crashes or user error (like closing the wrong tab at the wrong time), or at very least supports Ctrl-S so I can save frequently without reloading the page,

Since I want to leverage this as a code editor as well, it has to have pluggable interfaces for attaching syntax coloring, bracketing and autocomplete logic for specific programming languages, which I suspect is not the hardest nut of the bunch to crack.

That said, I can totally appreciate the difficulties of writing a cross-platform editor. I don’t believe that this should be written in XUL. It should be written in C++ using the GFX APIs. I don’t know much about Nvu, but I assume that it is built in this way. I’d be very interested to find out more about the problems Alex hints at with the Nvu project. Are they really intractable, or are they tied somehow to the specific implementation, which I assume is based on quite a lot of legacy code?

Bottom line is yeah, this is very tough to achieve. But it is also a total necessity. Perhaps I’m alone here, but I see Firefox as a platform rather than a mere browser, and in that role it sorely needs a kick-ass editor to go with its world-beating browser. I’m not talking about recreating Microsoft Word here. The last thing the world needs is another bloated monolithic app-that-does-everything. What I imagine is a small, efficient editor that lets you perform the most essential tasks in an intuitive way, with an extensible architecture that lets third-party developers tack on more specialized features in a modular fashion. Kind of like Firefox itself.

[]


1 Comment »

  1. […] over the lack of auto-save (though modern web apps seem to handle that pretty well), and I’ve whinged at length about various other aspects of the same issue […]

    Pingback by Just Browsing » The Trouble with Google Docs (And How to Fix It) — 5/8/2008 @ 7:08 pm

Trackback URL RSS feed for comments on this post. TrackBack URI

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)


 

AllPeers File Sharing



AddThis Feed Button



Creative Commons License
This work is licensed under a Creative Commons License
Conestoga Street Wordpress Theme by Theron Parlin