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

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube