This chapter is from the book

Talk about cross-browser and cross-platform compatibility for Silverlight 4.

Consider alternatives to Silverlight, both in the browser and out-of- the-browser.

Look at the earlier versions of Silverlight 1.0, 2 and 3 and take a look into the future of this technology.

Install Silverlight 4 as a user and explore a few demos.

In three short years, Silverlight has come a very long way. In this chapter, we review what Silverlight is, where it comes from, and try to peek into the future of this technology, illustrated by the "shiny logo" shown in Figure 1.1.

Discovering Silverlight 4

It seems like yesterday that we published Silverlight 2 Unleashed and introduced it at the Professional Developer Conference 2008 in Los Angeles just a few days after Silverlight 2 had been released to the Web. And yet here we are talking about Silverlight 4 already! In these less than two years, the Silverlight team at Microsoft has been very active listening to the community's feedback and implementing new features to transform what was an already solid, yet basic platform into a very rich framework, able to accommodate most client application developers' needs.

The very first public glimpse of Silverlight 4 beta was offered at the Professional Developer Conference 2009, when Scott Guthrie (Corporate Vice President, .NET Developer Platform, Microsoft) gave one of the exciting talks full of demos for which he is famous. Although still in beta stage, we were already able to clearly see the direction that the technology was taking. Even more important, we were told often that Silverlight is the future of client applications at Microsoft!

With this new release, the border between web applications and desktop applications is becoming much thinner. For example, Silverlight 4 can now install applications "out of the browser," with a shortcut in the Start menu or on the desktop. Although these applications have fewer privileges and features than full-blown desktop applications, they have the huge advantage to be cross-platform (you can run them on Apple computers, too) and provide a very elegant way to offer rich functionality in online and also offline mode. We talk a lot more about out-of-the-browser applications in this book.

Tip: What About Windows Presentation Foundation?

The richer (but running on Windows only) "big sister" of Silverlight called Windows Presentation Foundation (WPF) is still actively developed and extended by Microsoft, although in a maybe less-glamorous way. See the section "Alternatives to Silverlight," later in this chapter.

A lot of other features, which we discuss later too, help the developers to build so-called line-of-business (LOB) applications (for example, rich data applications for businesses, catalogs for products, data visualization screens, and many more). Silverlight is often mistaken for yet another media framework, when it is in fact much more than this. This new release makes the point very clear, and should help to put Silverlight in the focus of enterprise applications developers while continuing to build on the success it already has for multimedia applications.

Learning Silverlight Is Betting on the Future

With all this in mind, it is quite clear that learning Silverlight is a perfect way to advance in the future of client application development:

For web developers, it adds important skills to your arsenal that will help enrich your web pages. Silverlight is not replacing classic web technologies such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), and JavaScript, but it enhances them and plays an important role in the way that websites are evolving always more from document presentation to rich interactive applications.

For "classic" desktop developers in the Windows world (with technologies such as Microsoft Foundation Classes [MFC] or Windows Forms), it teaches you a modern and exciting framework with revolutionary features such as the fantastic data binding system, rich animations and graphics, media integration, and so on.

For WPF developers, you leverage a lot from what you already know and gain cross-platform compatibility for your applications, easy web deployment, and exposure to a wider audience.

One important thing to keep in mind is that Silverlight is not a replacement for HTML web pages, and will absolutely not kill HTML. Silverlight is here to enhance your web pages with richer content, and with the out-of-the-browser feature, to create lightweight applications that can function online or offline. Learning Silverlight does not mean that you should avoid writing HTML code, or that you should stop investing in technologies such as ASP.NET. But it means that you can now realize applications that were impossible (or very difficult) to do in HTML/CSS/JavaScript, and that you can use the same languages (and in some cases reuse code) on the server and on the client.

How Can They Be So Fast?

There are a few aspects that explain how new versions of Silverlight can hit the market so fast, and yet be so stable:

Silverlight is developed in an agile manner. With short iterations and early releases, the team is able to react quickly when problems are found in the code or new features are suggested. This explains why we had three releases in less than three years.

Silverlight is taking advantage of the experience gathered by the Windows Presentation Foundation team. Many features are similar, and some code can even be reused. Other features are re-implemented in a different way based on customer feedback. The teams are communicating to leverage the experience gained since WPF was released.

The community is involved in an interactive manner. Your input counts! We will talk about ways to get involved in this chapter.

Tip: The Community Counts!

Did you know that approximately 70% of the features requested by the Silverlight community have been implemented in Silverlight 4!

How About Compatibility with Older Versions?

An agile team at work for Silverlight provides a great basis for a rich feature set evolving very fast. With version 4, we can say that Silverlight is reaching maturity. There will, of course, be additional versions in the future, but it is obvious that versions 3 and 4 were major steps for this platform, which explains Microsoft's enthusiasm at the conferences where early versions were shown. Note, however, that a lot of effort has been put into backward compatibility:

If you open a Silverlight 2 (or 3) project in the Silverlight 4 development environment, a lot of your code will work as is. Some of it will need to be updated, but the changes are, in general, painless ones. Note that the project files (*.CSPROJ) will be updated to the new environment, though.

If you run a Silverlight 2 (or 3) application on a PC with Silverlight 4 installed, it will run without glitches, because the runtime environment is fully backward compatible.

In fact, your Silverlight 2 (or 3) applications should run even better in a Silverlight 4 runtime environment, because of the improvements brought to the core and to the plug-in. This history of backward compatibility is most certainly going to continue with future versions, so what you learn now is going to be a major skill for your future as a developer.