In-Depth
Silverlight 2: Olympic Trial
If Silverlight 2 wins the gold in Beijing, will it be ready to light up your rich Internet apps?
- By Kathleen Richards
- August 1, 2008
Microsoft's Silverlight 2 will endure the ultimate test over the next three weeks as millions of sports enthusiasts flood
MSN and
NBCOlympics.com to follow their favorite competitions among the 302 events that will make up the 2008 Summer Olympics in Beijing.
A Web video player based on beta 2 of Redmond's rich Internet application (RIA) runtime will bring interactive features to real-time and on-demand video content. The player was developed by New York-based multimedia production outfit Schematic Inc., in partnership with Microsoft and NBC Universal.
"We've been working on a product built on beta 2 for six months and a lot of their development has been happening over that period of time," says Matthew Rechs, chief technology officer of Schematic. "It's especially challenging to do design and development against a platform as it's being born, but we live for that kind of danger -- it makes things a little bit more interesting."
With the enhanced video player, users can watch a full-screen HD image, six other screen sizes, picture-in-picture and pop-ups. They can also use embedded players. A "Live Video Control Room" offers up to four video streams simultaneously of the same or different events -- one large picture and three smaller pictures -- with the option to go "full screen" or "swap" a smaller view for the larger one at any time. You can also e-mail and share video links.
The enhanced player's "Explore Videos" menu takes advantage of the transparency afforded by Silverlight, offering viewers the option to scroll through a features menu -- Live Video Control Room, Olympic Events, Most Watched, As Seen on TV and Highlights -- while watching an event, similar to a high-end cable TV experience.
The Standard Player, also powered by Silverlight, allows users to watch on-demand video, while perusing content such as Inside This Sport, Athletes, Related Video and Trivia.
"It's a complicated piece of software by any measure," says Rechs. "It's got so many different ways to enjoy the programming, so many different video formats, combinations of video streams, the image size, resolution and bit rate and ways to enjoy those combinations."
The player takes advantage of adaptive streaming, a new variable-bit rate feature in Silverlight 2 beta 2, which automatically adjusts the bit rate for an optimal viewing experience based on the user's connection speed and hardware.
Silverlight 2 offers a programming model and media capabilities that allow developers to enhance the users' interaction with content. "A lot of our work was about the user experience and talking to sports fans who will be watching the Olympics and understanding what their interests were and what their needs were," says Rechs, "so really the project has been about getting to know the content and the viewer and figuring out what kind of features are going to be interesting and compelling for them."
Fundamentally, he points out, NBC is bringing an entirely new viewing experience to its audience via the Web. People can get information about the athletes and their favorite Olympic sports, historical data, broadcast commentary, and watch all of the coverage online if they choose as though it were live, instead of setting their alarms to get up to watch a broadcast of volleyball or parallel bars, for example.
"I think it's going to be one of the most important video experiences on the Internet, ever," says Rechs. "And I can't think of another where the content is of interest to so many people and the experience of watching it online is so unique to the viewing experience."
Beijing or Bust
With the world watching, Microsoft's fledging RIA technology must survive this qualifying round to secure a foothold in the Web technology race alongside Adobe Systems' ubiquitous Flash technology. People who access the NBC site can use the Adobe Flash Player, Windows Media Player or Silverlight 2 beta 2 to view different types of content.
A major stumble could consign Silverlight 2 to the fate of the 2008 Summer Olympics torch relay. That "Journey of Harmony" turned into a public relations disaster for China, as protesters around the world tried to derail torch bearers as a show of support for perceived human rights infractions in Tibet.
There is precedent for concern about Silverlight's performance. In 1996, IBM widely promoted its Web site promising real-time content and updates from the Atlanta Olympic Games. That effort failed badly, leaving Big Blue with egg on its face.
This year's high profile venue is also fitting for the Silverlight development team, which has essentially run its own marathon to get to this point, working tirelessly on a technology that was first announced in March 2006. Silverlight version 1, essentially a media player that supports the JavaScript programming model, was released in September 2007. Silverlight 2 (formerly Silverlight 1.1) added support for the .NET programming model, a key driver for companies and developers that have invested in the Windows/.NET ecosystem.
Beta 2, released just two months ago at the end of the developer portion of Microsoft Tech-Ed, offers a commercial Go-Live license, which NBC has with the Olympic video player. The Silverlight 2 beta 2 technology is "mostly feature complete," according to Microsoft.
In beta 2, Microsoft spruced up its controls, namely the Calendar, TextBox and DataGrid, and introduced a TabPanel, but the ComboBox -- commonly called a drop-down box -- is glaringly missing. A Visual State Manager was added so that designers and developers could more easily customize their controls, templates and skins without writing a lot of code.
"It's easier to understand the concept of visual states in a Visual State Manager than to do everything manually with triggers," says Tony Lombardo, lead technical evangelist at component vendor Infragistics Inc., which offers a community technology preview of a Silverlight beta 2 chart and gauge. "Triggers are still very powerful and light and let you do a lot at different levels, and if you really want to dig into it, it's great. But that first experience of setting it up, they really needed to make that easier and I think they've accomplished that."
The Visual State Manager is also one of the features that Microsoft is going to port back into Windows Presentation Foundation (WPF) in "a one-to-one code mapping," says Lombardo.
WPF shipped without a DataGrid, and Microsoft did not repeat that same faux pas with Silverlight 2. A rough version appeared in beta 1.
"Just about everything in the DataGrid has been improved in beta 2," explains John Papa, a senior consultant for ASPSOFT Inc. and the author of the upcoming book, "Data Access with Silverlight 2" (O'Reilly). Microsoft also added a few features to the data binding in Silverlight that WPF already had.
Beta 2 introduces an ADO.NET Data Services wrapper. And LINQ to JSON, available in beta 1 but not confirmed as a feature, is full-fledged in the second beta.
One of the best things about beta 2, says Papa, is that it can communicate with a variety of Web services, and those Web services can return data in a variety of formats.
"Silverlight can talk to Web services, WCF, REST or plain-old XML," he explains, "and then the data that it can get from those services can be XML, JSON or it can be a construct from a business. You can also talk to a server using single sockets, which allows two-way communication."
Early versions of the Silverlight 2 technology housed most of the controls in extended assemblies. Microsoft, in beta 2, moved 30-plus commonly used controls into the main DLL. Papa expects the company to move additional controls like the calendar and the data picker into the main DLL before the final release.
"Now when you create an application, once somebody has a Silverlight program, your app is really tiny," he says. "An application that might have been 250k before might only be 20k now. " The plug-in has retained its small size, going from a 4.3MB to a 4.6MB download in beta 2, according to Microsoft.
Microsoft also held true to its promise that it would work on making the Silverlight 2 API a true subset of WPF, where possible. At the Microsoft Tech-Ed North America 2008 Developers conference, an attendee asked Microsoft founder and chairman Bill Gates if Silverlight and WPF were being merged together. Gates, who gave the opening keynote address, replied, "Silverlight will probably have almost everything WPF has today, but WPF will keep getting richer and richer as we go forward."
But the company still has some work ahead. "The big thing I'm expecting between now and the final release is not so much about additional controls being added, although they may get added, but more about finalizing the API, the namespaces, and just generally tweaking the libraries with a particular focus on making them more compatible with full WPF," says Daniel Chait, managing director of Lab49, a New York-based consultancy.
Along with Silverlight 2 beta 2, Microsoft released the Expression Blend 2.5 preview. "Visual Studio is integrating more and more of Blend into it, but it's still behind, so you almost need to have them both open at one time," says Papa. "They kind of complement each other right now. I think the intent of Microsoft is to move a lot of what is in Blend into Visual Studio. To at least see [your design] in Visual Studio will be a big step."
Visual State Manager is not really supported in Visual Studio and for developers using the designer and XAML in Blend, there's no IntelliSense. "A lot of it is that the design experience is a little bit behind in terms of features," he says.
New in Beta 2
Media
- Adaptive streaming
- Server-side playlists
- DRM content protection
Programming Model
- Many more controls in the main DLL: Button, ListBox, Slider
- Visual State Manager
- Greatly enhanced DataGrid
- Wrapper for ADO.NET Data Services
- LINQ to JSON now a definite feature
- Duplex communications for WCF services
- Web services: REST, JSON
Tools
- Expression Blend 2.5 June 2008 Preview
- Silverlight 2 Beta 2 for Visual Studio 2008
- Deep Zoom Composer
-- K.R. |
Go Live?
Although it's still a beta technology and the tooling has a ways to go, Microsoft says Silverlight 2 should be considered as a technology solution for mission-critical applications in business environments. The company holds up as proof the high-stakes NBC Olympics site and the use of Silverlight 2 beta 2 for the upcoming Democratic convention.
"There will be some API changes between beta 2 and the final release, so you should expect that applications you write with beta 2 will need to make some updates when the final release comes out," writes Microsoft Corporate Vice President Scott Guthrie in his June 7 blog announcing the release of the beta 2 technology. "But we think that these changes will be straightforward and relatively easy, and that you can begin planning and starting commercial projects now."
Indeed, hundreds of millions of dollars exchanged hands as NBC lined up vendors and prepared to offer unprecedented Olympic coverage for the first time via Web programming and content, according to Rechs.
"It's important for people to think about the business that Silverlight represents for our client [NBC]," he says. "It's not an exaggeration to say this is a billion dollar project. It's easy to get excited about the visibility of the product and the highly public, highly trafficked thing, but when you look at it from a dollars-and-cents perspective, there's really a ton riding on this."
Schematic also had to consider their client's business model and did a lot of work with NBC and their advertisers to figure out how ads were going to be incorporated into the viewing experience.
Lab49 has several Silverlight projects in the soft launch/pilot stage. "All of our Silverlight applications took the beta 2," says Chait.
Broadly speaking, clients are choosing Silverlight for the same kinds of apps that Lab49 builds with WPF and WinForms-interactive trader desktops. Lab49 also uses the technology as a way to build management visualizations for infrastructure-level applications.
"The main application focus is turning the bank inside out," says Chait, "providing functional applications that use bank systems for pricing, for access service management, but providing those apps to customers directly rather than having them communicate over the phone or over e-mail or enter your systems manually. Now I can essentially give them the same tools that my institutional clients such as hedge funds use to trade on my systems directly, and I can deliver that through a browser so I don't have the desktop-compatibility issues that have been obstacles and big costs to support."
Chait says adoption of Silverlight has been faster than WPF by Lab49 clients. "The decision some of our customers have made when they're looking at their legacy internal apps is, what's the benefit of making the leap from WinForms to WPF? It's not as easy to justify. I think with Silverlight, you can say, "Oh, here's an opportunity to build the only kind of application that we deliver over the Web and it's a quantum leap over the HTML- and AJAX-style apps. The apps are a lot more functional and mature."
"From a business standpoint, I think it deserves serious consideration; Should we build a desktop app at all or should we just use Silverlight?" he adds.
A project's timeline is also an important consideration. The final version of Silverlight 2 is expected this month. "Right now WPF is more complete than Silverlight," says Papa. "If your app needs to work in a smart client and a browser, WPF is going to work in both. If you need to reach multiple browsers, Silverlight is a very good choice."
But he cautions: "If it needs to go live in the next two months, I probably wouldn't go there because even though it's mature, there are going to be some changes."
Infragistics' Lombardo says the technology is ready but developers need to be prepared for a bit of a learning curve. "It's certainly practical and it's a lot easier than writing two lines of JavaScript to get the same thing accomplished, and you can do things to get a better targeted experience," he says.
However, it's not going to be a 1-2-3 app. "You should expect to spend a little bit of time learning Silverlight," he advises. "The data model is going to be different. If you're used to building an ASP.NET-type app or even a WinForms app, now you're dealing with Web services and WCF in order to get your data back and forth, persistence moves. There are some challenges that developers are going to face, but once you've learned the Silverlight way of doing that, it's pretty easy and it just becomes standard practice."
Rechs says developers need to weigh the adoption costs against the advantages of the technology and its business value. "Silverlight is a new plug-in. It's going have adoption costs for the developer," he says. "You want all these benefits, but you have to consider this issue: People's desktops are often locked down and the install process is a little disruptive. Intrinsically there's some risk, although Microsoft has made it quick and easy to install."
Schematic, which builds video players with Flash and Silverlight technology, sees the magnitude of the business impact of Microsoft's RIA technology, especially what it enables in terms of user experience, video and cross-platform support. "Many customers have big investments in Visual Studio, Expression Blend and the whole Microsoft ecosystem. Those people have no way to run apps in a multi-vendor environment without having to exit that ecosystem and getting a whole different set of tools and software licenses," says Rechs.
The true test of Schematic's Silverlight video player is approaching, and it will last for 17 days straight. A team of 15 to 20 developers worked on the NBCOlympics.com enhanced video player along with engineers from NBC and Microsoft. Developers from all three companies will be working 24/7 throughout the Olympics to make sure the Silverlight-based video player works as planned.
The stakes are high for Microsoft: A gold-medal performance by Silverlight 2 may spur widespread adoption.