Powershell and the Live Framework SDK?

I have this little command line app that I’ve been using to navigate my developer Mesh with the Live Framework SDK.

It started out as very basic but then today I realised that I should really extend it so that you can use it something like;

cd cloud

list objects

cd meshObject1

list objects

and so on. I was about to set about doing this when I realised that this is essentially already part of Powershell and a much smarter move would be for me to write a plug-in provider for Powershell that exposed the local/cloud Live Operating Environment as something that can be navigated from the shell.

Now…I didn’t actually set about it yet ( mostly because I realised that I’d have to download the entire Windows SDK to get going – can that be right? 🙂 )

If anyone goes ahead and builds it then let me know and I’ll link to it here, otherwise I’ll try and build it myself when “spare time” comes around.

Live Framework SDK – more on inviting others

This previous post had me thinking that the WPF application that I built across these posts;

Live Framework SDK – More Steps

Live Framework SDK – Having a Single MeshObject

Live Framework SDK – Adding a Silverlight MEWA

would start to improve if I offered the opportunity to “invite others” to shared groups of photographs.

So, I re-worked the code. There were a couple of things that I came across whilst doing it;

  1. It’s a bit painful that you can’t do everything whilst created to the Local LOE. I wanted to write 100% of my code against the Local LOE but, because you can’t get a list of Contacts from the Local LOE right now it means that you have to connect to the Cloud LOE to get them. Additionally, as far as I could tell you also need to use the Cloud LOE to send a user an invitation to share a MeshObject. I don’t think you can do that with the Local LOE even if you already have gathered Contact information from the Cloud LOE. That was my finding, anyway.
  2. Mappings. I’m still not 100% sure about Mappings, MeshObjects, DataFeeds. What I think I know is that if I expect the DataFeeds for a MeshObject to show up on DeviceX then there needs to be a Mapping between that MeshObject and DeviceX. However, this became interesting for me when I invite user A to share MeshObject B. That MeshObject then shows up in their Mesh which means that I need some code to create Mappings for that MeshObject onto that user’s device whenever they first encounter that MeshObject on that device. Otherwise, data doesn’t show up ( I think ).

Having re-worked my code, I end up with an application that behaves a little like this.

I run it on two machines.

The left Window in the screenshots below is logged on to my laptop’s Local LOE as mtaulty@hotmail.com whereas the right window is on a remote machine and is logged on to the Local LOE on that machine as mtaulty@live.co.uk;

image

I can start off on the local machine by creating a photograph album;

image

and then adding a photograph to it;

image

Then, if I want to invite another user to my album then I need to authenticate with Windows Live ( to get my Contacts from the Cloud LOE );

image

and then I have a right mouse menu on an album that raises an “invitation” dialog box;

image

which raises a dialog box for me to choose who to invite;

image

and so I invite the other user. He then gets an email;

image

and follows the link to the Live Desktop;

image

in order to accept the invitation;

image

and then the application detects that new MeshObject for the 2nd user and that photograph album shows up for the 2nd user;

image

and that user can then go and add a photograph into that album;

image

and that shows up for the first user again;

image

and we’re syncing photographs quite nicely between the users here. Note the MyAlbums collection would also sync if the 2nd user was the same user as the first user ( if you see what I mean 🙂 ).

I’ve put the updated code here to share.

Naturally, it could be smarter about how it displays those “Other User’s Folders” and I’m sure there are bugs in it but it might help you with something that you’re doing.