December 20, 2006

Vista Gadgets are JavaScript -- Their JavaScript!

OK, I had a Soylent Green moment a few minutes ago (use your best Charlston Heston voice and scream "Soylent Green is people...its PEOPLE!") .

I just realized the shinny new Vista Gadgets are JavaScript. Not using some language like JavaScript, but JavaScript. Oh, and there is some HTML mixed in there as well.

See more here: http://microsoftgadgets.com/Sidebar/DevelopmentOverview.aspx
You can see what other people have done here: http://microsoftgadgets.com

This is was a jaw dropping moment for me. Hard to believe, if you will. "You mean you can modify the Windows Desktop with JavaScript? Not VBSCript, not some unknown .NET library, or a Win32 api hidden so far down in the bowels of the OS that you would need a spelunker with a love of dark, cramped places to find?" Yup, just JavaScript and HTML.

Then I stopped, drank some green tea, and closed my Slashdot browser tab. Deep breath. (Did I really close Slashdot? No way! Next time I'll try closing Digg.)

OK, so if you create some new shiny feature in your beloved, money maker operation system, there are reasons to make it as approachable as possible. Mainly, so every two-bit web developer can make some cool (and probably worthless) to show off. Then your side bar can be even more shiny! But I digress.

Personally, I don't have a love-love relationship with JavaScript. I view it as you would the ugly daughter of the rich guy at school. Not much brains, but she is rich, and she has a lot of friends.
Most of the time when I need to do something with JavaScript, the first place I turn is Google. Then, if need be, I will write it myself. C#, VB.NET, Delphi, SQL, MDX, C++: no problem, I'll dive right in. We are swapping phone numbers, trading IMs, and sharing milk shakes. JavaScript? Where did I put that 10 foot pole? OK, not that bad...2 foot pole.

But, considering the problem, JavaScript probably is the right solution. JavaScript is well known, lots of developers already know it, and it is very free for the average SlashDot whiner. Hey, even an ugly rich girl needs a bit of love from time to time.

But...what about code security? If these things are JavaScript, and you create the worlds shiniest gadget EVAR that everyone is going to want...how exactly do I charge for it and turn myself into a billionaire? Hey, I'm a pro and I don't code for free. Well, maybe just once, but that was for a really good cause.

Next, how do I hack into that Windows API thing that I keep hearing about. Vista ships with a couple of cool gadgets already, like a CPU and RAM performance gauge. Very nice. And I think you would need to hack that Win32 thingy to get there...but I don't remember JavaScript having those hooks.

Unless there is a second API that Microsoft isn't telling us about! Some secret API only available to its own wizards and otherwise locked away in the basement of the tallest, darkest tower filled with trolls and dragons (the trolls are dragon food). Meh, probably not. Sounds like I have another reason to brush off my JavaScript book and start reading.

I should have started doing that a long time ago anyway.

Update: The default gadgets can also be found on the hard drive, and they are written in JavaScript and HTML. You can find them at C:\Program Files\Windows Sidebar\Gadgets

1 comment:

Anonymous said...

I agree. But isn't it just a matter of degrees? So JavaScript allows any dork to create a nasty gadget but even if it were in C# the gadget can still be created, just by a somewhat more sophisticated dork. Am I missing something?

The good news is all the gadgets become open source.

Sean M.