July 07, 2004
Minimal App-Launcher (part one)
Here's a first, minimal example of the "app-launcher" extension mechanism for Groove V3. As I hinted earlier, this is a straightforward framework that lets developers build applications integrating really nicely with the Groove launchbar and with Groove's decentralized platform -- consistent, secure, shared data models; awareness, presence, instant messaging -- without requiring the application to "live in Groove". In fact, it's possible to have a single version of your app which "knows" when it's being run from a Groove context, by having Groove launch it with a special set of commandline parameters, and use that to switch on whatever collaborative features might be important (without preventing its use as a standalone app). The standard commandline, though, is what gives your app its context. Remember, in this application model your program "has" a Groove workspace "underneath" it, and can use that workspace to share with other instances of the program running at other users' machines. Each member of the workspace (ie. anyone you invited, just as with any Groove space) has a synchronized copy of the data in the space. But when they open the workspace, instead of the Groove user interface, your application is launched. So the two basic commandline parameters are: the "IdentityURL" of the current user, and the URI of the current workspace. [There's a third -- the verb with which the application was launched -- but in my minimal sample I've no need to use that]. The URI is the Groove Web Services address of the workspace: the space can be accessed by POSTing SOAP messages to that identifier. So, here's my sample code. I've called it "Minimal". There's not even any compiled code there; the application is an HTA (DHTML and JavaScript). If you download the zip and look at the .HTA file with a text editor, you'll see how the application works. (More on that below the fold here). The app has its own icon in launchbar: although maybe the user interface of my application could use some work: Still to come in the next instalment: some words about the half-dozen support files other than the HTA. They're fairly intricate, but not scary. (I made mine almost entirely by search-and-replace from the AppLauncher sample which ships with the v3 Groove developer kit). The app When the HTA loads, it looks at its commandline, to find the two parameters given it by Groove: these are held in global variables "g_sSpaceURI" and "g_sIdentityURL". Pressing the "Space information" button calls a function ShowSpaceInfo(), which sends a SOAP packet to Groove. The packet's body is a regular SOAP envelope, with some Groove stuff in the header, and in the body an empty ReadSpace element. The packet is sent to http://localhost:9080/xxx, where xxx is the URI of the space (which we were given on the commandline).
<?xml version="1.0" encoding="UTF-8"?> Groove returns an XML fragment with information about the space: its name, and so on. HTTP/1.1 200 OK <?xml version="1.0" encoding="utf-8"?> Of course, if we wanted this sample to do anything really interesting, then building SOAP packets by hand would be a really stupid approach. It does let you see exactly what's happening, though. For a larger application, you should point your favourite development environment at the Groove-supplied WSDL and have it build you some handy proxy classes to make these calls. We're assuming that .NET is the way most people will want to do this, although the Groove dev kit comes with some perl samples, and I'd hope to see some examples using Python and Java sometime too. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
vcard
archives: January 2005 December 2004 November 2004 October 2004 September 2004 August 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 December 2003 November 2003 October 2003 September 2003 August 2003 July 2003 June 2003 May 2003 April 2003 March 2003 February 2003 January 2003 December 2002 November 2002 October 2002 September 2002 August 2002 July 2002 June 2002 May 2002 April 2002 March 2002 February 2002 January 2002 December 2001 November 2001 October 2001 September 2001 August 2001 July 2001 June 2001 see also: {groove: [ ray, matt, paresh, mike, jeff, john ], other: [ /* more blogroll to follow */ ] } The views expressed on this weblog are mine alone and do not necessarily reflect the views of my employer. RSS 2.0 RSS 1.0 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||