Original URL: http://www.theregister.co.uk/2008/06/09/silverlight_2_beta_2_review/
Silverlight 2 beta 2 - Go Live if you dare
Tires hard against Adobe, must try harder
Posted in Developer, 9th June 2008 19:17 GMT
Review Microsoft has released beta 2.0 of Silverlight 2.0 (http://silverlight.net/GetStarted/), complete with a Go-Live license that permits commercial deployments for those sufficiently brave.
Silverlight 2.0 is the make-or-break release for Microsoft's would-be Flash killer, since it includes the .NET runtime. While .NET has succeeded as a web platform, it has never been fully convincing on the desktop. The runtime is huge and can be troublesome to install, the Windows Forms GUI framework is slow and ugly, and the Windows-only platform requirement is an increasing burden as the Mac gains market share.
Silverlight solves all three problems. The GUI framework is Windows Presentation Foundation (WPF) (http://msdn.microsoft.com/en-us/library/ms754130.aspx), based on an XML layout language called XAML (http://msdn.microsoft.com/en-us/library/ms752059.aspx). The runtime is under 5MB, delivered as a browser plug-in. Cross-platform is limited, but includes Intel Mac so meets the most pressing need.
However, Microsoft is racing against Adobe Systems, whose mature Flash client covers the same territory. The pace of Silverlight development is energetic, but raises concerns that too many bugs may slip through.
I experienced this first-hand when installing the beta 2.0 development tools. Keeping Visual Studio 2008 running sweetly with all Microsoft's latest add-ons has become arduous. The Silverlight tools beta interacts with the Visual Studio 2008 Service Pack (SP)1 beta; you have to scrutinize the release notes in detail and even then the install may fail and require manual fixing. This is the kind of deployment nightmare that Silverlight aims to fix for end users.
Expression Blend 2.5 - complex but unavoidable
Silverlight developers actually need two products: Visual Studio 2008 with the necessary extensions, and Expression Blend 2.5 June 2008 Preview (http://blogs.msdn.com/expression/archive/2008/06/06/download-expression-blend-2-5-june-2008-preview-and-deep-zoom-composer.aspx). The idea is that developers write code in Visual Studio, while Expression designers work on the same XAML files. The concept is good, but the situation is messy in beta 2.0.
Visual Studio lacks any sort of visual designer, though you can edit XAML and see a preview. Blend is at the other extreme, with a sophisticated visual designer but no code editor. You will probably end up running both at once, which means learning two very different tools. The Blend property editor is so elaborate that it has a property search box to help you navigate.
Core sleight of hand
Earlier Silverlight previews had few controls. Beta 2.0 has a ton of them, 38 in the toolbox by my count. Existing controls have been improved and fixed, so for example the TextBox now supports scrolling and word wrap. The corporate vice president of Microsoft's developer division Scott Guthrie has promised more than 100 for the final release.
Note there is sleight of hand over deployment. The small Silverlight download only includes core controls. Important controls like the DataGrid are not part of the core set, but bundled into your application, which means that users will typically end up with multiple copies; and Visual Studio does not make it obvious which are which.
When combined with a few lines of Microsoft's Language Integrated Query (LINQ) project (http://msdn.microsoft.com/en-us/netframework/aa904594.aspx) and a Windows Communication Foundation (WCF) (http://msdn.microsoft.com/en-us/library/ms735119.aspx) data service on the server, the DataGrid control lets you put together a good-looking database query application in very little time. In beta 2.0, users can sort columns by clicking on the header, and re-order columns at runtime. Another neat control is MultiScaleImage. This is for displaying Deep Zoom images, a technology that enables very large images to be published on the web without loss of performance.
More controls in your toolbox
The new Visual State Manager lets you create custom effects for state transitions within controls, such as Pressed and MouseOver, using only the Expression design tool.
On the media side, beta 2.0 now supports adaptive streaming, which means Silverlight can select from multiple bit-rates at runtime and select the one appropriate for the user's connection speed. Support for Digital Rights Management (DRM) is also introduced.
RESTful complications
Silverlight 2.0 supports both HTTP requests and sockets for general network communication. The socket classes wrap native socket support on Windows or OS X. The big issue here is security, which is based on cross-domain policy files in either Silverlight or Flash format.
Socket support enables real-time duplex communication. You can handle network communication on background threads. There are still complications over using REST (http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) from Silverlight. You cannot use PUT or DELETE verbs within Silverlight, except by going via the browser's XMLHTTP support, which means no cross-domain usage. However, there is a wrapper for ADO.NET Data Services, for which early code is in beta 2.0. There is also new LINQ-to-JSON (http://www.json.org/) support.
Silverlight supports local storage through the Isolated Storage API, which by default provides 1MB of space. New in beta 2.0 is the ability to request more space, prompting a dialog. You can request as much as you like, enabling interesting new possibilities. That said, there is no file I/O support beyond the per-domain isolated area.
DataGrid: you'll end up with lots of these
How good is Silverlight? Despite the Go-Live license, it feels not quite finished; yet the potential is huge. Leaving aside issues about proprietary versus open on the web, Silverlight is strong on many levels, including its GUI framework, media support, and now programming and web services.
There are signs that Microsoft is now putting more energy into Silverlight than into desktop WPF, which is meant to be its big brother. For example, the DataGrid has been added and there are new features like the Virtual State Manager that are yet to appear in WPF. There is also the prospect of Silverlight integrating with Live Mesh (https://www.mesh.com/Welcome/Welcome.aspx), bringing together a rich client with internet storage and identity management.
In short: good work from Microsoft, spoiled by missing pieces and installation hassles.®
For more on installing and using Silverlight 2 beta 2, see Tim Anderson’s blog IT Writing (http://www.itwriting.com/blog/).
