In-Depth

Turning on Silverlight

Developers start building rich applications with Silverlight 1.1.

As summer faded into fall, .NET developers Pete Brown and Steve Suing sat down at their keyboards to update their Silverlight 1.1 Carbon Calculator to keep up with breaking changes in Microsoft's alpha refresh, which was released in tandem with the Silverlight 1.0 release candidate at the end of July.

"We actually have the fixes done on our side; we're just trying to get them deployed at the customer's site," says Brown, a lead systems architect and project manager at Applied Information Sciences Inc. in Reston, Va. Brown and his colleague worked on the Microsoft-sponsored project for Conservation International. The Carbon Calculator, designed to help people track carbon emissions, was built on the initial Silverlight 1.1 alpha. It went live on July 7 in conjunction with the Live Earth concert.


Since its launch in May, Silverlight has emerged as one of the most provocative technologies to hit the developer community in some time. Silverlight 1.1 extends the reach of the .NET Framework to the Web, even as Microsoft battles Adobe Systems Inc. and others for the hearts of programmers building rich interactive applications.

One of the first Silverlight 1.1 apps in production, the calculator was developed by integrating Silverlight 1.1 alpha technology with Microsoft's Virtual Earth mapping platform and Microsoft Office SharePoint Server (MOSS) 2007, which was used to store all of the videos, images and list data. Working in Visual Studio 2008 beta 2 with the Silverlight Tools alpha extension and designing the layout in the Expression Blend 2.0 beta, Brown and Suing built the browser-based calculator in about two months.

"We were able to get something pretty decent out in a very short amount of time," says Brown. "From a pure application developer standpoint, it's very easy to get into Silverlight even in the alpha. We found it very stable and the tools were there."

Expression Blend 2.0 adds tooling for Silverlight, but lacks support for any UI controls, third-party or otherwise. "Right now, you have to type the XAML in yourself -- you can't just drag and drop," says Brown, who expects UI controls to emerge as Silverlight matures.

The Silverlight 1.1 alpha provides some sample controls such as list boxes and buttons, observes Brown, but it doesn't offer a way to capture data input by users -- in text boxes, for example. "That's really the only pain point right now," he says.

"Until it has the control in it, you won't be able to do an awful lot -- you'll be able to display data and do a drop-down list," he explains. "But anything where a user actually has to type something in, which is going to be the vast majority of corporate applications, you can't do very well at the moment -- unless you turn to some third parties or you look at some of the sort-of-OK text-box implementations that people have come up with."

The next major revision of the Silverlight 1.1 alpha is expected to offer some controls, "but I don't know when that's going to happen," says Brown.

Still, Brown is upbeat about his Silverlight dev experience, citing Microsoft's support. "I went to the MIX conference, downloaded the Silverlight 1.1 alpha, and there was already a community site. There were people that I could talk to, get support, and the fact that we were able to do that and put out an application so quickly speaks very highly of the ecosystem that Microsoft has set up."

Silverlight 1.1, which adds a subset of the .NET Framework to the 1.0 version, has caught the interest of .NET developers and component vendors, some of whom are sitting out the first release.

"I wish they wouldn't have even bothered putting out a 1.0 because I honestly believe that was a bit of a waste of their time," says Brown, who hopes version 1.1 achieves "some decent level of parity with competing technologies."

"We're choosing to target 1.1," says Devin Rader, product manager at Infragistics Inc. in Princeton, N.J., and co-author of "Silverlight 1.0," published by Wrox (2007). "A lot of the plumbing that we need doesn't exist in 1.0."

A prominent component vendor in the .NET space, Infragistics demoed a tech preview of some Silverlight components in June, with functionality similar to its Windows Presentation Foundation (WPF) controls.

Stake in the Ground
In September, Microsoft released Silverlight 1.0, a multimedia browser plug-in that supports Internet Explorer, Firefox and Safari. Silverlight 1.0 is designed to scale from a low-density media format to high-definition video implemented with a VC-1 codec (Windows Media Video 9). The patent for VC-1 is shared among multiple companies, but Microsoft initially developed the technology, which is the same format supported by HD DVD and Blu-ray DVD players.

Silverlight 1.0 uses a JavaScript programming model with UI controls based on the JavaScript Object model to interact with the player. The Silverlight 1.0 software development kit (SDK) includes code samples, Visual Studio templates and documentation.

"We realize that Microsoft has had to put a stake in the ground and this is their entry point into trying to compete head-to-head with Flash," says Mark Brown, co-founder and CEO at IdentityMine Inc., a Microsoft Gold Certified Partner that specializes in presentation technologies and is based in Tacoma, Wash.

Mark Brown"We're able to share some of the design assets and even some of the expertise that they've gained in-house on WPF, [and] they can transfer that to developing applications for Silverlight."
Mark Brown, Co-Founder and CEO, IdentityMine Inc

"Getting Silverlight 1.0 out the door was, I think, a fantastic move. Now that we've got this desktop that can be deployed on many desktops and a common UI paradigm based on XAML, our hope is that people will appreciate that you can leverage the same design and development resources whether you're building rich interactive applications for the desktop or the Web."

Microsoft is trying to cover a lot of ground in a short time. Silverlight 1.0 is geared toward what Microsoft calls the "rich media scenario." Silverlight version 1.1 includes the rich media component, but it also extends the .NET skill set to rich Internet applications.

"We're shipping in tiers, but over time there will be just one Silverlight," says Parimal Deshpande, a senior product manager for WPF and Silverlight at Microsoft. To that end, Silverlight 1.0 and the Silverlight 1.1 September alpha refresh are now compatible.

Microsoft is also extending Silverlight to Linux. In September, Microsoft announced that it would support Novell Inc.'s Moonlight project, which will extend Silverlight 1.0 and Silverlight 1.1 across Linux distributions.

The company is also lining up a network of partners. IdentityMine worked with Microsoft on the Silverlight Airlines demo at MIX07, and it's co-developing Silverlight 1.1 apps with several enterprise customers, including a product-lifecycle management company, whose Silverlight app is hosted in a SharePoint portal.

"The same company's looking at WPF and they have a certain investment in that platform," says Brown. "We're able to share some of the design assets and even some of the expertise that they've gained in-house on WPF, [and] they can transfer that to developing applications for Silverlight."

Framing the Competition

As Microsoft plugs in to the rich Internet application (RIA) market, Adobe Systems Inc. and Sun Microsystems Inc. are pursuing client-side desktop framework strategies.

"AJAX is nice, but once you get to a certain level it becomes very unruly," says Frank LaVigne, a developer at Applied Information Sciences Inc. in Reston, Va. "If you can house things in a miniature version of a framework, it doesn't matter if it's Java or .NET -- it makes it a lot easier."

Microsoft's entry into the space has definitely motivated other vendors.

"Our strategy is to extend Web technologies to ever richer applications, and we'll offer a range of tooling that appeals to both the developer and the design community," says Pam Deziel, director of the platform business unit at Adobe.

"We see those communities as sort of approaching the same space from different directions. The design community is very concerned with the user experience and the overall richness of the applications that they deliver. The developer community cares about the user experience but they're also very concerned about the kinds of things that you expect enterprise developers to be concerned about -- how easy is it to create, how easy is it to maintain, how easy is it to deploy?"

To that end Adobe is planning to open source the Flex IDE and promote a new client framework, Adobe AIR, that extends its Web client framework to the desktop. The AIR runtime can run Flash content and AJAX apps. "The HTML engine in Adobe AIR is open sourced as well," says Deziel. "You can use the Web Kit for HTML, which is the basis for Apple's Safari browser and Nokia's Mobile browser."

Sun in June announced at JavaOne that it was developing a declarative JavaFX Scripting language that developers can use alongside Java2D Swing to build desktop and Web UI components. Designers and developers could use the language, in theory, without knowing anything about Java.

The JavaFX platform would provide a consistent interface for tying apps to back-end systems based on J2EE, asserts Matt Thompson, director of Sun Developer Network and Open Source Platforms Office. JavaFX is still in the very early stages. James Gosling, well known as the lead developer of the Java programming language, is heading the JavaFX development effort.

-- K.R.

Enterprise Savvy
For enterprise apps, Silverlight opens up new opportunities for data visualization. Brown says Silverlight can enable a SharePoint page to present complex, hierarchical data that users can drill down on. "It's a lightweight plug-in so that you don't have to push an ActiveX for each data visualization that you want to pull off," he says.

The technology also gives enterprises a distribution system across platforms for remote workers or clients, while still retaining the advantages of having a rich client UI, says Andrew Whiddett, IdentityMine's vice president of interactive technology. This summer, IdentityMine used Silverlight 1.0 as the basis for the 59th Prime Time Emmys "mini-site," which enabled users of the "Entertainment Tonight" Web site, ETonline.com, to view video from the event and read news articles and other content before, during and after the 2007 Emmy awards, which aired in September.

The six-member dev team needed to build a Silverlight 1.0 app that could tie into existing content on the ETonline site and surface media in real time on the Emmy mini-site as it showed up in ET's content-management system (CMS). "We had to develop a complete integration point between our CMS and this Silverlight application experience," recalls Brown.

In an interesting twist, the back-end technology was based on a LAMP stack -- Linux, Apache, MySQL and PHP. "We had to ride on top of existing infrastructure that was at Entertainment Tonight," says Brown. "The whole data-services layer is written in PHP. We're consuming an XML feed from their CMS and doing a variety of things in the middle tier to generate both XAML as well as to retrieve data down to the Silverlight client."

The company has plans to offer components for Silverlight 1.0 and 1.1. "Once we can do managed code in the browser, the components will become much richer and easier to interface with," notes Brown.

"We now have a consistent runtime engine, a consistent runtime model; XAML is sort of the lingua franca of how we talk to that presentation engine," says Brown. "JavaScript is the companion that provides all of the glue logic for the application, and thankfully, across these platforms, they're consistently supporting JavaScript in the same way, so we get a predictable experience regardless of whether we're running on the Mac or the PC."

IdentityMine Uses Silverlight 1.1 for 59th Prime Time Emmys site
[click image for larger view]
IdentityMine Inc. used Silverlight 1.0 as the basis for developing the 59th Prime Time Emmys "mini-site" for ETonline.com, the Web site for "Entertainment Tonight."

Plugging into the Community
Despite upbeat reports from partners and early adopters, the journey ahead for developers and third-party vendors is anything but certain. Microsoft is launching a worldwide training tour for design agencies and others who want to get up to speed on Silverlight, says Brown, whose firm offers customized training.

Books are beginning to appear. In addition to Devin Rader's book on Silverlight 1.0, Safari online released a "rough cut" of an upcoming book by Microsoft's Adam Nathan on Silverlight 1.0. Developers can download and read the PDF before the book is even published.

Silverlight DevCamps, based loosely on the BarCamp "unconference" model, are popping up as well. At press time, DevCamps were scheduled in San Francisco, Chicago, Washington, D.C., and Dublin, Ireland. Some developers and ISVs have talked about starting a platform-neutral coalition of user groups. This "User Experience Council" would focus on Adobe's, Apple Inc.'s and Microsoft's UI technologies, among others.

"Part of the reason that .NET became so successful is this grassroots user community that evolved," says Don Demsak, an independent .NET consultant based in New Jersey.

World Wide Web Beyond .NET
Microsoft faces numerous challenges as it builds the ecosystem for Silverlight, including moving beyond the captive .NET audience and forming a mobile platform strategy.

"The biggest challenge is that Flash is very well entrenched and a large part of that is because it has been around for 10 years," says Frank LaVigne, a longtime Flash developer who refers to himself as a "frustrated cartoonist" and now works in Visual Studio and .NET.

Primarily used for content distribution, the Flash player enjoys an installed base of 97 percent of Internet-connected PCs, according to Adobe. "We actually have a broader support for Windows than Microsoft does with Silverlight," says Pam Deziel, director of the platform business unit at Adobe.

Flash is popular among animators and designers; however, some people question its role in enterprise app development.

LaVigne, an Applied Information Sciences developer who's learning WPF and Silverlight 1.1 to rebuild the UI of a customer's document-management system, says: "For me, the real selling point about Silverlight is the development environment. The Flex environment has only been around for a few years with a few revisions and Visual Studio has been around for a decade."

Adobe is aggressively pursuing enterprise developers. In September, the company announced plans to bundle FlexBuilder 2 and the Adobe Flex SDK with BEA Systems Inc.'s WorkShop Studio. Adobe also has a partnership with Salesforce.com Inc.

"The biggest differentiator when it comes to Flash and some of the competing products that are out there, is being able to use .NET 3.5 and write your stuff in C# or whatever," says Applied Information Sciences' Pete Brown.

Brown cautions that Silverlight is more tightly restricted than Flash, with apps limited to a browser sandbox and unable to do things like access the local file system. "That has some people concerned because it doesn't do everything that Flash does," Brown says.

But he says Silverlight 1.1 is a boon to enterprise developers: "I can really see folks building browser apps and being able to avoid a lot of the pitfalls that we always have with Web applications, and doing more of a desktop-type model and running that on the Web."

Reader Comments:

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above