Links

pmuellr is Patrick Mueller

other pmuellr thangs: home page, twitter, flickr, github

Wednesday, April 15, 2009

shiny simian scripts

We know them as Greasemonkey Scripts, but in Aaron Boodman's recent blog post, he says the new name may be "Content Scripts". Kinda boring. How about Slick Gorilla Scripts? Shiny Simian Scripts? Ach, "Content Scripts" sound pretty good I guess.

Aaron's post is chock full of meaty information; looks really good from 50K feet. Nice to see multiple files will be supported, including .css and resources like images.

I still use Greasemonkey for a few scripts I've written, but found the environment a bit limiting to get into it too deeply. Debugging was difficult, installation/deployment a bit unwieldy. And of course the endless issues having to do with writing screen scrapers, reacting to changes in your target's pages. I tried writing a few scripts for the Moz-based browser on my N800, which supports a flavor of GreaseMonkey via an system-installable update, but that was really painful. I hope we see a simpler workflow for developing these extensions, eventually.

The reason I'm so interested in this stuff is that I think user-scriptability provides a big paradigm shift. Much like writing editor macros for emacs or XEDIT or similar, it transforms an already powerful and useful tool into an extendable one. If you combine this sort of extensibility with the ability to publish/deploy and install these extensions easily, you have an actual platform on your hands.

It's easy to imagine, for instance, the sort of "content scripting" you could do, might subsume the whole "mashup" scenario; kind of flip it on it's head. Instead of having to host an environment to pull and push content from other environments, you can do it right from the primary content site.

Eventually this drives us to the point where the web applications we use are actually installed (ok, cached) on our machines, as extensions, and just push and pull data via HTTP/XMPP/whatever to data/service servers as needed. Of course, we've had a good 15 years of being able to do this, in theory, and are still stuck with icky, unusuable web sites that trap our data behind inscrutable wads of HTML. But things seem to be changing for the better here, over time; REST and all.

Something like Giles Bowkett's Hacker Newspaper could just be an extension, instead of having to be a 'site' with a 'server'. Who wants to deal with that junk?

Beyond all the content scripting stuff, Aaron also mentioned: "There is a team in Chromium working on an out-of-process version of the web inspector." This is great news. WebKit's Web Inspector is quite useful, but as an "in browser" debugger, it is also clearly totally unsuited for debugging on small devices. You know, like all those devices that are using WebKit? An external debugger is required for such situations. Something like Drosera. Both modes of debugging are nice to have - in browser and external; I want them both.

All GREAT stuff. Of course all of this is for Chrome, and not for WebKit. Which makes you start to wonder how we can get all this stuff into WebKit so all the WebKit consumers will have access. Either that, or start considering Chromium to be a platform to consume instead of WebKit. If these Chrome extensions heavily depend on things not already in WebKit, like V8, the multi-process model, etc, there would be even more reason to consider Chromium as the lower level platform rather than just WebKit.