First steps with offline Silverlight and Live Framework
Big technology, simple app
I wrote a simple test application for Silverlight running on Live Mesh. It is an interesting scenario, which enables Silverlight applications to run offline, in the style of Adobe Systems' AIR.
I wrote a to-do list that stores its data in the cloud, I added some items online, and deleted and added some items offline on another machine, and when it reconnected all the edits synchronized. Cool.
Even so, I'm not finding this particularly easy. Note that this is a limited-access Community Tech Preview (CTP), so make big allowance for that. Here are some of the problems I've run into to.
Convoluted sign-up and web site navigation
This is a preview controlled by developer tokens. It's complicated by the fact that a variety of different types of token control access to different parts of Windows Azure. You get a token, think you are done, then discover you have the wrong kind of token and need to apply for another one.
Even when you have the token, navigation is tricky. I've wasted time clicking through from one overview page to another. There are even promising links that seem to go back to the page you are looking at. Tip: when you find a useful page like the Developer Portal, for provisioning Azure and Live Framework apps, bookmark it quick.
OK, I guess this is to be expected in a preview. But I'm finding an over-abundance of overviews and diagrams, too many videos, and a lack of plain-speaking developer-focused documentation that answers obvious questions. Most of the entries in the .NET reference for the Live Framework client look like the pictured screen grab.
That's right, auto-generated docs with no description of what the class member is for or how to use it. You can expand the plus symbols, but it is not rewarding.
Microsoft's online MSDN documentation and forums work, but I never look forward to visiting them because I know they will be slow to navigate and I'll be sitting waiting for pages to refresh. I'm not sure that Microsoft understands the importance of this point. It works - so why complain? Well, because the cumulative effect over time is to make me want to go elsewhere. Google and Yahoo!, by contrast, usually run much more responsive sites.
Microsoft could improve this quite easily. The key: fast is more important than pretty.
Bugs and outages
I certainly expect bugs and outages in a CTP. Still, they are frustrating. My very simple Mesh app did not work at all on a Mac, even running in the browser. In this scenario, you don't need the Mesh client, it is just a Silverlight application running in a web page. I asked about this on the forum, and got this reply:
I confirm it from the core team. With quite aggressive timeline for PDC release with the current level of resources and CTP goals, we could only test XP SP3/Vista SP1 and IE7. We will eventually support Mac and Safari but this is not an immediate priority in the near future for CTP QFEs.
Fair enough, though to me cross-platform is at the heart of why I might want to use this technology.
Subsequently my Silverlight Mesh application wouldn't run at all. I got a 404. I guess it's the bleeding edge.
I've also asked a couple of simple questions on the forum about the online/offline scenario. I'm finding that offline applications don't run unless you are signed into Windows Live. That is, you can sign in and then go offline, and it works, but if you don't sign in (for example, because you start up your laptop in an aeroplane), then the app does not start. There must be some way to use cached credentials?
My other question is about synchronization. How do you enforce constraints on a Mesh datafeed, given that it could be edited online and offline simultaneously, bypassing checks in your code? This is not quite the same as a conflict, where the same entry is edited by two different people. My example is how to make sure that duplicate items are not added to a list.
I expect that this Azure stuff will get much smoother in future updates, and bear in mind that what I'm working with here - Mesh, Silverlight, and the .NET Live Framework client library - are just one small corner of the whole.
I can't help wondering, though, if Microsoft is being over-ambitious. Another technology I've been looking at recently is Adobe's AIR. The scope of this is small relative to Live Mesh. You can describe it in a few words: run a Flash application on the desktop. It has limitations and frustrations, but at least it is easy to understand, and furthermore, it has pretty much worked as advertised from the earliest public previews.
By contrast, Mesh for developers feels like a huge thing that is part of an even huger thing (Azure). It has lots of promise, but it is harder to describe its essence in a few words (that are not marketing fluff).
That said, I like Silverlight itself. This piece at least is easy to grasp and works well, in my experience so far.
Working with Live Framework or Azure? I'd love to know how it is going for you.
This article originally appeared in ITWriting.
Copyright (c) 2008, ITWriting.
A freelance journalist since 1992, Tim Anderson specialises in programming and internet development topics. He has columns in Personal Computer World and IT Week, and also contributes regularly to The Register. He writes from time to time for other periodicals including Developer Network Journal Online, and Hardcopy.
Sponsored: Quit your addiction to storage