Desktopx 3 Journal: Day 2

Adding your own features to DesktopX

So our story so far - in the beginning your desktop only supported little static pictures called icons.  Your computer could also load programs but they are contained inside a "window" that is separate from your desktop.

The idea DesktopX postulated in 1999 was to have something new on your desktop. Something more than an icon but not a traditional program.  And today, widgets are slowly becoming very popular and DesktopX is no longer the only provider of extradesktop level content.  You've got Konfabulator and you've got Kapsules and you've got Samurize and a few others that veer a bit further away from the widget concept but still fill the basic premise.

But these widget enablers all suffer a common problem - they have trouble creating things that the developers of the original program didn't think of.

That's because widgets are innovative for TWO reasons: The first is the aforementioned fact that they're a new type of desktop content (i.e. mini-applications that are smaller than a typical program that lives on your desktop.  The second is that widgets are supposed to be able a lot easier to create than regular programs.

And so they make a fairly reasonable trade-off -- they make it easy for you to create this stuff but you have to use their APIs to do it, usually through a scripting language like JavaScript or VBScript.  And hence, if they don't make the API you need, you're up the creek.

The net result is pretty obvious though many people may not understand why - widgets have become (unfortunately) associated with pretty looking but not necessarily useful desktop jewelry. Clocks, calendars, and data retrieved from the net (RSS readers, weather info, stock tickers, etc.).

I'm not saying there's anything wrong with clocks and and web-based headline readers and the like. But eventually, when the hype about widgets starts to die down and people start to look hard at this stuff, if that's all they do, widgets will end up in the dust-bin right along with "Push" technology and "Thin" PCs.

So what can be done about this? The answer in DesktopX 3 comes in the form of scriptable plugins.

Scriptable Plugins

Plugins are no joke to make. They require real coding (C++ or whatever). They're not for casual users to crank out.  But the DesktopX 3 plugin format is open so that anyone who knows how to program can create them.

These plugins can then add new methods to DesktopX 3 that we haven't thought of that are then accessible from scripts.  When an object uses a plugin, it becomes part of the object so when you send it over to another user, the needed plugins are created. So there's no need for users to have to run around downloading third party plugins to make sure their widgets work.

So if there is some feature or API you feel DesktopX is missing, if you know how to code, you can write a plugin and add new APIs to DesktopX itself and it's totally seamless in the scripting.

For example, while DesktopX 2 contains a mail checking plugin, you can't access it from script.  So it's pretty limited.

So for our example, we created a DesktopX 3 plugin. Its features are accessible from script.  So I create an object and add the plugin to the object abilities. So in your JavaScript or VBScript you now have access to a new object class called "Mail" (defined by the plugin).

So in my script (JavaScript here) I'd have it first have gotten the user's username, password, and server and then make this call:

Mail.CheckMail( "1", sLogin, sPass, sServer, 0);

The API, of course, would have to be documented by the author (for instance, the "1", and 0 aren't germane to our example but would be part of the plugin's docs).

The Mail class also includes its own mail event (and DesktopX's built in event explorer will automatically display events that the plugins add).

In this example (using VBScript this time) you then have:

Mail_OnMailEvent(requestID, mails)
  If mails Then
    strailing = ""
  If mails = 1 Then strailing = "mail awaiting!" Else strailing = "multiple email waiting!"
  desktopx.Object("mail_info").text = "You've got " & mails & " new " & strailing
  Else
    desktopx.Object("mail_info").text = "You've got no new email"
  End If
End Sub

This is obviously a simple example. But what you see here is that DesktopX gains a new object class called "Mail" along with its corresponding methods to control it.  In addition, its own event is defined and can be  used as well.  And all this created without the developer of the original program (DesktopX) being involved. 

This is important in particular to DesktopX 3 Pro gadget makers who might want to make something pretty sophisticated to sell or distribute.

DesktopX 3 is scheduled to be released this March. Its home page is www.desktopx.net. The standard edition of DesktopX 3 will be included as part of Object Desktop, Stardock's suite of desktop enhancement utilities (www.objectdesktop.com).

17,285 views 10 replies
Reply #1 Top
I am definitely looking forward to dx3. It sounds like it's a bit of a quantum leap away from dx2.

Will there be many scriptable plugins released with it? I like the idea of being able to interact with the plugins via scripting.
Reply #2 Top
We'll probably include the mail one at the very least since we have that. Along with source code.
Reply #3 Top
Good stuff - it's a start at least. Hopefully having the source code may provide some kind of a springboard for trying to develop a plugin of my own
Reply #4 Top
While I dont know much about this scripting business , im probably going to just buy the engine part so I can run user made items
Reply #5 Top
What languages does the plugins have to be made in? I've never done C programmin, only Visual Basic. Can it be done with VB? (Thought, I assume it'd then be dependent on the VB runtime files) How about Delphi? Or C#?
Reply #6 Top
VBScript and JavaScript. They don't need additional runtime components.
Reply #7 Top
For the plugins? So it's not like in DesktopX2 where you had to use C language to make plugins?
Reply #8 Top
Very exciting stuff. Just think of all the cool stuff that we'll start to see being created with DX3.. it's going to be awesome.
Reply #9 Top
I went ahead and pre-ordered desktopx 3. Do you have any idea when we can expect to have it for download?

Posted via WinCustomize Browser/Stardock Central
Reply #10 Top
Another thing that came across my mind. Sell a deluxe CDROM set in the retail stores so everyone get a chance