News Stay informed about the latest enterprise technology news and product updates.

Silverlight tutorial: .NET, rich media come together

With Silverlight on the minds of many developers, Scott Guthrie offered a tutorial of Microsoft's Rich Internet Application technology at Tech Ed 2007.

The buzz surrounding Silverlight, unveiled at MIX07, has dissipated a bit -- but that is mostly the result of the business of buzz, as both Microsoft and the .NET developer community have been busy putting Silverlight to use. (Tim Sneath's From A to Z...50 Silverlight Applications offers extensive evidence to that end.)

You can now use .NET on the Web server, you can use it on the desktop client and you can run it cross-browser inside Silverlight.
Scott Guthrie
general manager, .NET Developer PlatformMicrosoft

The media capabilities of Silverlight get a lot of attention; after all, HD video and high-quality audio make for a pretty sweet conference demo.

At Tech Ed 2007, Scott Guthrie, general manager of the .NET Developer Platform, offered developers a nice synopsis of what Silverlight is, what it can do and, most importantly, how developers they work with it.

First, he identified the two ways of programming Silverlight.

One method uses client-side JavaScript and Ajax. This can be done with Silverlight 1.0 and 1.1, is fully supported with ASP.NET AJAX and will soon be augmented by the release of client-side libraries. "This provides a nice, fairly lightweight way to include Silverlight within an HTML site," Guthrie said.

The second way to program Silverlight is with the .NET Framework, as Silverlight 1.1 includes the full .NET programming model, a subset of .NET class libraries and the same CLR (Common Language Runtime) engine as .NET on the desktop. The aim here is to bring together the seamless nature of Web applications and the state model, productivity and performance of client apps, with rich media thrown into the mix as well, Guthrie said.

"You can now use .NET on the Web server, you can use it on the desktop client and you can run it cross-browser inside Silverlight," he continued. "You can learn a single, consistent .NET API, and, once you know that, you can target any of those three types of experiences."

Guthrie then offered six additional reasons Microsoft opted, with Silverlight, to bring .NET into the browser.

  1. Multi-language support for client applications. Developers can use Visual Basic, C#, Python and Ruby, not just JavaScript, to build apps.
  2. High-performance runtime. Running the .NET Framework as opposed to pure JavaScript can be between 300 and 1,000 times faster, Guthrie said, adding, "They are wins we're somewhat hesitant to claim because they sound almost unreal."
  3. More on Silverlight
    Reference: Silverlight Learning Guide

    Checklist: What developers need to know about Silverlight

    Podcast: What is Silverlight?
  4. A richer UI framework. Remember, Silverlight got its start as Windows Presentation Foundation Everywhere; essentially, it is a subset of WPF. As time marches on, Microsoft will be adding to Silverlight some high-level controls -- data binding, templating, styling and so on.
  5. The HTML DOM (Document Object Model) API. This, Guthrie said, gives developers the ability to go into am HTML page and use Visual Basic or C# to program the HTML DOM.
  6. A flexible networking stack. Through this, developers can use the XML HTTP request, REST or more traditional Web services (using ASMX or WCF) to define the client-server relationship in a Silverlight application, Guthrie said.
  7. Flexible data support. Silverlight 1.1 supports LINQ (Language Integrated Query) libraries. This gives developers the power to query any IEnumerable data type and manage it on the client, he noted.

Finally, Guthrie let the audience peek into Visual Studio 2008, and the XAML (Extensible Application Markup Language) files that define Silverlight controls, to demonstrate how to write Using statements to import namespaces, access the aforementioned class libraries, and take advantage of IntelliSense.

These XAML files can be passed back and forth between Visual Studio and the Microsoft Expression suite of design products. Guthrie's demo featured a brief foray in Web application design, followed by a return to the more familiar Visual Studio 2008. There the XAML file displayed the color gradient, timeline stamps and other design changes he had made in Expression Blend.

Scott Guthrie on Silverlight
To view Guthrie's "A Lap around Silverlight" session, visit the Virtual Tech Ed Online Sessions page, or download the slides and samples from his blog entry, My "Lap around Silverlight" talk at Tech Ed.

"The ability to have design tools and development tools work on the same project at the same time really lends itself to the collaborative Experience," Guthrie said.

VS 2008 itself reflects Silverlight's cross-browser and -platform capabilities. During a debugging demo that involved an onstage Mac, Guthrie noted, to applause, "You're getting IntelliSense against a live object running in Safari on the Mac remotely within Visual Studio."

As for the future, Guthrie said Silverlight 1.0, now in beta. should be ready for general release later this year; such a timetable has yet to be determined for Silverlight 1.1, now in alpha.

Additional functionality Microsoft is working on for those subsequent releases, he added, is a WYSIWYG designer within Visual Studio Orcas for XAML files as well as support for the Microsoft Expression tools within Team Foundation Server projects.

Dig Deeper on Silverlight and Expression application development

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.