Tech Brief

Inside Silverlight 2

Microsoft's new RIA technology extends .NET across platforms.

Microsoft Silverlight is a cross-browser, cross-platform plug-in that was developed to deliver rich Internet applications (RIAs) via the Web. As user-experience demands grow, developers and designers can increase their productivity by working in common technologies.

Silverlight is designed with this in mind; it empowers your project team to work together efficiently to deliver the best-possible experience to end users.

At the heart of Silverlight is XAML-Microsoft's Extensible Application Markup Language. XAML is an XML-based language that's used to define your user interface, animations and interactions. Silverlight renders XAML and offers a full programming model that supports AJAX, .NET and dynamic languages such as Python and Ruby.

Silverlight 1.0, released last September, is programmable by using actual Web technologies including AJAX, JavaScript and DHTML.

The first beta of Silverlight 2, released last month, adds dynamic and .NET language support, enabled by a subset of the .NET CLR and Base Class Libraries. Based on the Windows Presentation Foundation graphical framework, Silverlight 2 offers a host of new features that are only possible when using .NET, such as Isolated Storage, networking and a rich control set.

Application Architecture
Silverlight is a browser technology, so its use is not dependent on a server. Your Web server hosts a Web application, which can be built using ASP.NET, PHP, JEE or other technology. This delivers a Silverlight app, which in Silverlight 1.0 is comprised of HTML, JavaScript and XAML. With Silverlight 2, compiled .NET apps are supported, and are bundled and manifested in the XAP format.

The browser renders HTML and processes JavaScript as normal. Silverlight handles the XAML and XAP content, rendering it and exposing it to the programming model.

Control Model
Silverlight 2 offers a full control model for building RIAs. The control model includes a full set of standard GUI controls, such as TextBox, TextBlock, DataGrid and CheckBox. Layout controls-StackPanel and Grid-make fine-tuning your interface a lot easier. You can override the basic control styles using a full templating model, or modify the controls with XAML.

The control model is fully extensible. An ecosystem of control vendors is working on providing third-party control sets for Silverlight.

In addition to the "standard" set of GUI controls, Silverlight also supports some unique controls. The DeepZoom control in Silverlight 2 renders a Zoomable User Interface (ZUI), providing a super-huge virtual view of a XAML canvas that can be zoomed around. DeepZoom can be used to present super-high resolution images in a network-friendly way; the ZUI only downloads the parts of the image that are necessary. A great example of this is the Hard Rock CafŽ memorabilia museum at http://memorabilia.hardrock.com. Check it out to see if you can find the hidden surprises.

Basic architecture
[click image for larger view]
Basic architecture of a Silverlight application

Tooling
Visual Studio 2008 supports Silverlight 2 through an add-in that can be downloaded from www.silverlight.net. These Silverlight project and control templates work in the Express and Standard Editions of Visual Studio as well as the Professional and Team System Editions.

The Microsoft Expression line of products (version 2) also supports Silverlight. As a brand-new technology, the Silverlight 2 beta is currently only supported in the Expression Blend 2.5 preview. Expression Design is aimed at graphic designers to empower them in building visual assets. It supports full creation and management of graphical assets as XAML that Silverlight can render and support. Expression Blend is aimed at interaction designers, giving them the facility to build user interfaces, interactions and experiences using XAML. Expression Encoder is targeted at developers interested in building video sites and experiences. It allows video to be encoded into .WMV and VC-1 formats for playback by a Silverlight player, as well as automatic bundling of the video into a skinned Silverlight application complete with playback controls, full screen mode, chapter stops and more.

Adoption
In a time when productivity is key, Silverlight provides the ability to bring designers directly into the development process. .NET developers can use their existing JavaScript/ DHTML skill sets to build RIAs, and have those skills span not just the Web, but also the server, desktop and mobile markets.

Silverlight continues to experience explosive growth and adoption. The Silverlight.NET showcase (http://silverlight.net/showcase) provides links to many of these apps. In early March at MIX08, Microsoft announced that Silverlight is downloaded and installed at the rate of about 1.5 million copies per day.

comments powered by Disqus

Featured

Subscribe on YouTube