Developer

Silverlight 2.0 offers paradigm shift from predecessor

Even though the beta release of Silverlight 2.0 is a more robust platform for delivering full-featured applications, Tony Patton says it still may have trouble catching on.

Most Web developers know better than judging a Microsoft product by its first iteration. For this reason, I was intrigued by the recent beta release of Silverlight 2.0.

Silverlight provides a platform for Rich Internet Applications (RIAs) to build dynamic user interfaces that are platform and browser agnostic. It competes in the same space as technologies such as Adobe Flash and OpenLaszlo. Here's a quick overview of what you'll find in the latest version of Silverlight.

A new architecture

In terms of development, Silverlight 2.0 is a major shift from its first iteration. While Silverlight applications still execute in a plug-in that runs in all major browsers, the behind-the-scenes programming model is more reliant on .NET technologies, with Windows Presentation Foundation (WPF) being a major component. This pushes Silverlight 2.0 development more in the direction of Adobe Flex, which relies on programming via the Flex SDK.

Windows Presentation Foundation

WPF is the .NET graphical subsystem introduced in version 3.0 of the .NET Framework. The version included with Silverlight 2.0 is a Web-based subset. It is provided via a scaled down version of the .NET Framework's Common Language Runtime (CLR) included in Silverlight 2.0, and it supports Windows, Macintosh, and Linux platforms. Multiple instances of the CLR may run within a single process, so running in a browser will not be a problem.

The inclusion of the CLR means Silverlight 2.0 applications may be built via any .NET language such as VB.NET and C# as well as JavaScript. The CLR is scaled down, so not all namespaces and classes available in the base .NET Framework will be available for Silverlight development. This includes a set of extensible controls, networking components, XML Web services, LINQ, and more.

WPF includes its own programming model, which allows you to build user interfaces with shapes, documents, animation, and media objects. With the integration of WPF, Silverlight 2.0 includes more than 20 controls that you may use to build the user interface. These allow you to display data, as well as accept user input and control the layout of other controls. In addition, data binding, skinning, and template support is available.

It is worth noting that Silverlight 2.0 development may still be tackled via the approach offered in the first version via XAML and JavaScript. XAML is still a Microsoft technology, but it is an XML derivative. In fact, XAML is used to create WPF user interfaces, so you can choose to interact with the user interface objects and data via a .NET language or JavaScript.

Development tools

At the core, Silverlight 2.0 applications may be built using your favorite text or XML editor. This allows you to build the XAML from scratch. Further up the development chain is the use of more robust development tools. Two Microsoft development tools, Visual Studio and Expression Studio, provide alternatives with the goal of simplifying development.

The Microsoft Silverlight Tools Alpha for Visual Studio 2008 Beta 2 makes the many Silverlight controls available for user interface design. You can easily drag and drop the controls on a .NET Web form to use Silverlight functionality.

A beta version of Expression Studio 2 was recently made available. It is designed to work seamlessly with Visual Studio. Designers would use Expression Studio 2 to build the interface, while developers use Visual Studio for the backend code. This promotes the collaboration of the two teams during development.

There is loads of information available on the Web for tackling Silverlight development. I recommend checking out Essential Silverlight 2 Up-to-Date by Christian Wenz, which includes plenty of information on the early release and provides updated information in a timely fashion via the O'Reilly Web site.

Will Silverlight catch on?

As you can see from the features available in Silverlight 2.0 with the inclusion of .NET programming, Silverlight is now a more robust platform for delivering full-featured applications. This is in stark contrast to the previous version, where user interfaces were built with JavaScript and XAML. Version 2.0 includes a robust programming model that developers can use to deliver full-fledged applications in addition to slick user interfaces. Microsoft is pushing another paradigm for delivering applications with Silverlight.

While Silverlight is a great platform for .NET developers, I don't think it will get much traction outside of this realm, especially given Adobe's established presence with Flash. And given the shift to a more Microsoft-centric programming model, it remains to be seen whether non-Microsoft developers will embrace Silverlight to build and deliver Web applications.

Accessibility may be another sticking point. The first release of Silverlight offered very little in terms of delivering accessible user interfaces, so it remains to be see what the latest version will offer. With these types of technologies, it is better to provide an alternative user interface for users with disabilities.

Have you worked with the current beta or previous version of Silverlight? Do you plan on using it in future projects? Share your thoughts with the Web Development community.

Recent news stories about Silverlight

Tony Patton began his professional career as an application developer earning Java, VB, Lotus, and XML certifications to bolster his knowledge.

---------------------------------------------------------------------------------------

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

About

Tony Patton has worn many hats over his 15+ years in the IT industry while witnessing many technologies come and go. He currently focuses on .NET and Web Development while trying to grasp the many facets of supporting such technologies in a productio...

31 comments
AlessandroBorges
AlessandroBorges

SilverLight is just another vaporware from MS. It changed a lot from 1.0 to 2.0, will change a lot from 2.0 to 3.0, and so on. This is CLEAR sign it was bad designed, then they try to patch in 2.0, and will going in this path for ever. Why companies and developer should put efforts to learn and *support* a thing which becomes obsolete after six months ? NO WAY !

mikifinaz1
mikifinaz1

I used to work at the Evil Empire AKA Microsoft. Their biggest lament was that they couldn't keep all the code on their servers and make people pay by the: minute, keystroke etc. I don't want to back step to the days of the dumb terminal and Silverlight strikes me as an attempt for these companies like Microsoft to put the Genie back in the bottle. Microsoft would like nothing better now that the Intenet is robust enough than to go back to their pipe dream of total control. I for one will not do this and I have begun buying hardware and software with this in mind. One pissed off user

read
read

I'm not sure I understand this point: "Accessibility may be another sticking point...it is better to provide an alternative user interface for users with disabilities." The rest of the article seems to compare Silverlight with Flash. Last time I checked Flash was pretty inaccessible - basically a black hole for screen readers and other accessibility software. These types of software still even have difficulty with some forms of DHTML (those that rely primarily on generating portions of pages rather than simply hiding/displaying them), and so, to truly be accessible one must always provide a UI that sticks to the basics of HTML, or am I wrong?

pete
pete

RIAs by design are client / server. MS will make the client platform independent. But you can bet they'll make the server side only support MS server elements. Good luck to all of you who seem to enjoy the continual Microsoft lock-in. Enough to make me puke.!

dstein42
dstein42

The promise of RIAs uncludes not only usability, but making better use of the massive computing users bring to a web application. That is, an app with 10,000 concurrent users has another 10,000 CPUs that would otherwise be badly underutilized. Since the .NET environment is far more robust than JavaScript/ActionScript (and there is a more extensive exosystem of development tools) Silverlight will allow quicker development of more powerful web apps. For those of you who haven't worked with Flash much, it looks like an opaque rectangle to QA automation tools - hard to test thoroughly. As for the complaint that a future version will abandon Mac and Linus, just remember that Microsoft was originally a languages and tools vendor long before Windows or even DOS. It's still a multibillion dollar business for them. With Jim Allchin gone, they don't have this enforced compulsion to tie everything to Windows. Even though Marketing might lag in the message, it's really about .NET everywhere.

aaronlewis
aaronlewis

Don't know. If they're not even confident enough in the technology to include it in Windows Update...

steven.randolph
steven.randolph

So in version 2 Silverlight supports Windows, Macintosh, and Linux platforms; but Microsoft might wait for Silverlight to become popular and then eliminate support for either or both non-Windows OS's in a future Silverlight version. Don't think they're not capable of such knavery. They will always have this problem as long as they have a vested interest in one OS over the others. Adobe Flex and AIR have no such problems, so their cross platform nature is far more assured now AND into the future. Just something to think about!

djmorrissey
djmorrissey

It almost seems like Microsoft managed to get to a version 3.1 fast (The point when they tend to get it right). The feature set is right and the ability to use it without a skill set overhaul will get this into the hands of developers and the super geeks. What I'm wondering is - what is going to get set-up in this that will make it get the installed base that will drive continued expansion of the base to make this a real challenge to Flash

Justin James
Justin James

Tony - Good summary, thanks! I too question how much traction Silverlight can get. I think it looks solid on the tech end, and the concept is the right direction for development in general. But I am just not sured if these RIA frameworks can dislodge Web apps, despite being arguably better systems to work with. J.Ja

Editor's Picks