Coding on the client is fun. I started on the Commodore 64 in seventh grade in the 1980s; later moved to DOS with dBASE, QuickBasic, and C++; and eventually began Windows programming using C++, Borland Delphi 1.0, PowerBuilder, Visual Basic 3-6, and .NET. I like the ozone smell of making my CPU work for a living. I like being able to tap into the power of the local machine. I want to be able to hear the individual bits moving across the bus.
I like client application development, and I really like XAML. I like Silverlight, WPF, and Windows 8 XAML. I even like working in the WPF subset on the .NET Micro Framework and Gadgeteer boards I own. Sometimes, when I’m feeling especially dangerous I’ll write some C++, or C, or even a little assembly. It’s all about the power.
A year and a half ago, Manning published Silverlight 4 in Action. As proud as I am of that book, I’m even more excited to bring you this updated version. Not only because of the work involved in bringing you this edition, but because of how far Silverlight has come in that time. With Silverlight 5, Silverlight has the power.[1]
What a difference a year and a half makes! Silverlight 4 saw significant uptake among business application developers, and those same developers helped drive the features that made it into Silverlight 5. These developers are writing the types of bread-and-butter applications that leverage Silverlight for its simple deployment and great validation and data binding capabilities.
General adoption of Silverlight is up too, as you can see in figure 1. These unofficial third-party charts, reformatted for print from http://riastats.com data obtained in early 2012, show Silverlight and Adobe Flash adoption taken from a large segment of the general internet population. They reveal overall Silverlight adoption at a hair over 75 percent with version 4 at a bit over 67 percent and overall flash adoption around 96 percent, with Flash 11 at a hair over 70 percent.
I’m not a marketing person; I’m a developer. Although such a blunt numbers comparison between the two competing products may look dire at first glance, adoption numbers like these aren’t at all bad, considering Silverlight was a far more recent introduction and didn’t benefit from either the late 1990s boom in website intro apps or bundling with Internet Explorer 6. You can do a lot with 75 percent of the PCs out there. It’s my goal to help you do it.
2011 was also a rocky year for Silverlight and Flash developers, with confusion over what Silverlight is to be used for and where it fits into the development strategy at Microsoft and in the web as a whole. The Apple position on Flash didn’t help Flash or plug-ins in general. Flash definitely had a reputation for websites, whereas Silverlight evolved to more of a browser-delivered client technology. There were as many, if not more, out-of-browser apps as in-browser apps written in Silverlight.
With HTML5 (and JavaScript and CSS3, all of which I’ll lump into “HTML5” just as the media tends to) having picked up serious speed, especially on the media and casual games front on the public web, I think it’s a sure bet to become the way forward for broad-reach, public-facing website content. There’s so much momentum behind HTML5 that to fight it would simply land you behind others. HTML5 will suit you just fine, especially for run-of-the-mill, non-digital rights management (DRM), non-smooth-streaming media like what you see on YouTube.
But for many, HTML5 isn’t a realistic choice. Either you can’t count on browser support for key features, or you have a behind-the-firewall (or other controlled network) application scenario that makes it easier for you to use technologies you’ll be more productive in. Two key points rise above any trendy discourse and well into the realm of GSD (Getting Stuff Done):
Without a doubt, most .NET developers are more productive in Silverlight when building business applications. There’s so much there, right in the box, that makes it easy for you to quickly create stunning, feature-rich apps. Not only that, but the added system integration features of Silverlight 5 (like COM and p-invoke) make it even more compelling as a platform.
As a developer, or manager of developers, you must choose technology based not only on the longevity of that technology, but also on what makes it possible for you to deliver the best possible application for the most reasonable cost.
Regardless of where Silverlight goes in the long term, you already know that XAML, C#, and Visual Basic are all here to stay. In addition to continued desktop support for Silverlight and WPF, Microsoft is using XAML in Windows 8 Metro and on the Windows Phone. I believe in XAML strongly enough to have written this book (around 1,200 pages if you include the downloadable content) while working at Microsoft, as well as a book dedicated to XAML on Windows 8. Given the resources dedicated to XAML development and tools at Microsoft, I’m glad to see they believe in it too.
Ultimately, it’s good to have a choice. I choose XAML. I choose Silverlight.
[1] And now, you have C&C Music Factory’s “I Got the Power” looping in your head. You can thank me later.