By most accounts, the best word to describe the state of Silverlight development today would be “frustrating.”
With Microsoft withholding information about the future of the technology until next month’s BUILD 2011 conference, third-party software providers and organizations with big investments in Silverlight find themselves on unsteady ground.
Publicly, Microsoft has said that Silverlight is not dead, and the announcement of Silverlight 5, said to be released to the public some time this year, included new features such as hardware video decoding support that enables users to offload video to a system’s GPU instead of its CPU. The release also is expected to have the capability of calling unmanaged DLL libraries and Win32 APIs, which Microsoft’s corporate vice president Scott Guthrie has said “opens device possibilities and integration with the operating system.”
Yet a lot of angst in the Silverlight community remains. Despite Guthrie’s assertion at a Silverlight Firestarter event last December that “there is a Silverlight future, and we think it’s going to be a very bright one, ” the fact that Windows 8 will support CSS, HTML5 and JavaScript leaves developers to wonder where Silverlight fits in Microsoft’s new world of cross-platform, cross-device, cloud-based computing.
“I’ve spent the last 27 days—ever since the Windows 8 demo—trying to help answer the question: ‘What’s the future of Silverlight?’ ” said Scott Lock, the Microsoft practice lead at consulting firm Excella. “I run a .NET user group, and this conversation happens every month at the meetings. With the emergence of HTML5, CSS and JavaScript, and serious tooling around it, it feels like the paradigm has shifted.
“All they say is Silverlight is not dead. They’re not willing to share details. Look at LINQ to SQL. It’s an ORM tool that sits next to the Entity Framework. Microsoft said LINQ is not dead, but they’re only adding features to the Entity Framework. In this case, they’re saying Silverlight is not dead, but what does that mean?”
Until next month’s BUILD 2011 conference, at which Microsoft is expected to make clear its going-forward strategy on Silverlight, Windows Presentation Foundation, [Extensible Application Markup Language] and other technologies, the meaning of “Silverlight is not dead” will remain unclear.
Pete Brown, Microsoft Developer Division community program manager for Silverlight, said, “I am really excited by what I saw in the Windows 8 demos. As for how to write Windows 8 applications, we’ll learn more at BUILD; I encourage people to reserve judgment until then.”
Several Silverlight experts have offered up their take on where they think the technology plays best, what the future might hold, and why it should remain a viable, important part of Microsoft’s stack.
The general consensus among Microsoft partners and consultants in the field is that the company will push HTML5 and the other extant Web standards for cross-browser application development and deployment, and it will advance XAML, or some merger of Silverlight and WPF, for applications intended to run natively on the Microsoft platform.
“I think we’ll see two camps: a pure HTML5 camp using ASP.NET MVC and other tooling; and a Silverlight camp that will continue to write line-of-business applications in Visual Studio,” said John Waters, president and CTO at Falafel Software, an application developer for mobile platforms.
It’s not so much about what Silverlight can do that HTML5 can’t, so much as how you create applications, according to Brown. “Many developers find the XAML + C# model more appealing than the HTML + JavaScript + CSS model. You can do just about anything with HTML/JS/CSS, but it often takes more effort. However, as those libraries continue to evolve, the effort goes down.”
And right now, according to Excella’s Lock, Visual Studio 2010 is how you build applications in Silverlight. “The story is awesome for developers,” he said. The fact that developers can use existing skills to create rich .NET applications “is part of the selling point” of Silverlight, he said. “Most feedback says developers have richer experiences using Visual Studio 2010 for Silverlight development.”
Yet Lock said Silverlight people were disappointed when Microsoft, at its MIX 2011 event earlier this year, lumped the forthcoming Silverlight 5 heavily in with Windows Phone 7. “If Silverlight is the answer to the phone, why wouldn’t it continue to be supported” for .NET applications, he wondered aloud.
“People see a plethora of devices and want their services consumed in different ways. They don’t have experts in all the platforms,” Waters said. “A one-size-fits-all HTML application will look weird on each platform. You need to make them feel native. But the tooling’s not there yet for HTML5 development…no good text editor, no style sheets. We’re used to using Visual Studio with drag-and-drop designers.
“My feeling,” he continued, “is there will be a tool from Microsoft that bridges HTML5 and Silverlight…something that lets you use XAML and .NET classes that produce HTML5, that keeps the level of abstraction but generates the code.”
Critical role for XAML
A new UI layer in Windows 8 that brings together Silverlight and WPF has been rumored, according to Lock. The key to this is XAML, which, according to Microsoft regional director Stephen Forte, has been part of Microsoft’s vision for creating user interfaces for .NET applications since it shipped as the underpinning to WPF “Project Avalon” inside the .NET Framework 3.0 release.
Microsoft is expected at BUILD 2011 to pull back the curtains on “Project Jupiter,” which Forte said looks like a native XAML application for delivering .NET-based applications that separate the user interface and the business logic.
“XAML is not just a way to describe pages,” Waters explained. “There’s a whole framework behind it. It is a well thought-out way to set up data binding and patterns and bring pieces together in a very productive way.”
Some would argue that if Silverlight were to go away, it wouldn’t be missed by many, as user adoption has not been great. Silverlight is running on 70% of the world’s computers, but much of that is due to major players. For instance, Netflix streaming is a Silverlight application, as was the NBC Sports site dedicated to the Olympics. Those two alone accounted for millions of runtime installs.
On the developer side of things, “It wasn’t as if .NET reached the masses,” said Forte. “Silverlight reached the masses minus one.”
Part of the reason for the slower developer acceptance of Silverlight is that it forces developers to use asynchronous design patterns, which Forte said “junior developers find as a turn-off.” But patterns such as Model View ViewModel give you complete separation of the UI from the actual coding, he said, adding that the “bane of every developer’s existence is merging code with a designer’s front end.”
Silverlight, he added, requires developers to put more architecture around their applications, and that is just not applicable to many Web applications. “ASP.NET is so ubiquitous, and you can just throw up a Web app,” he said.
Excella’s Lock said his favorite thing about Silverlight is the data-binding capability. “It’s not perfect in Silverlight 4, but you can create observable classes, so apps refresh automatically and feel like they’re alive.” Observable classes allow applications to avoid having to make multiple calls to the database, and they don’t have to ping for updates, he explained. “If the underlying data changes, the presentation automatically updates,” he said.
With Silverlight 4, developers can create rich animations on top of the battleship-gray data, Lock pointed out. “You can’t do that in raw HTML. You need a rendering engine.”
On the flip side of that coin, Silverlight does not render HTML; it renders XAML inside a plug-in. It is the very plug-in that people speculate is moving Microsoft away from the technology.
Lock said, “My first reaction [to the plug-in nature of Silverlight] was, ‘Yeah, it causes more problems than it’s worth,’ especially with backward compatibility. But Google Frame is a plug-in; Flash is a plug-in.”
Silverlight advocates also point out that HTML5 is not uniformly supported across browsers and platforms. “Support in [Internet Explorer 9] is okay, but [HTML5] is not supported in earlier versions,” Lock said.
Further, he wondered, how many .NET developers will be writing applications that must span multiple devices? “There’s no compelling reason to see Silverlight on an iPad,” he said. “Apple won’t put Flash on the iPad, and I can’t see them opening the door to Microsoft.”
Finally, HTML5 is not yet on par with Silverlight for streaming media and video-rich content, so until that technology can catch up, developers will want to continue to use Silverlight to create those kinds of applications.
“Silverlight has great support for 3D,” said Microsoft’s Brown. “It enables reuse of lots of .NET code written for other platforms. The same code has the same functionality across all supported browsers.”
He added that Silverlight also has offline and desktop support, noting that “out-of-browser applications have turned out to be a real sweet spot. Applications like Seesmic and MarketsPlus are great examples.”
For Falafel Software’s Waters, it’s all about the tooling. “With Silverlight 5 and tooling, the ability to debug, use [Microsoft] Expression, and data bind, the right tooling makes all the difference,” he said. “In Visual Studio, you have support for profiling to find performance problems. It’s an ecosystem. You can grab third-party controls and drop them into the toolbox. Visual Studio itself is a huge part of the productivity of .NET development.”