1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
Microsoft Silverlight 3, the company's answer to Adobe's Flash and AIR platforms, promises to be boon for web video. Thanks to its Smooth Streaming technology, which can offer live, adaptive video streams without requiring dedicated video servers, just about any website will soon be able to offer smooth, up to 1080p, HD video over the web.
While Silverlight's future is looking bright, its past is underwhelming. The initial release lacked many features that Flash has offered for years, and was really a dressed up beta masquerading as a 1.0 release. The current release, version 2, is an improvement, but still lacks many advanced features.
Fortunately, the third release, already available to developers as a beta preview, promises to boost Silverlight out of its also-run status and put it on a nearly level playing field with Adobe's Flash framework.
Silverlight 3 brings a staggering amount of improvements to the table -- loads of new APIs, new features by the dozens, support for video and audio codecs like H264 and AAC, hardware-based graphics acceleration and more.
In short, it's the sort of release developers salivate over. But how easy is it to develop in Silverlight? And how much has Microsoft closed the feature gap with Adobe's Flash platform? To find out, we took the Silverlight 3 beta for a spin.
From the development IDE to the massive load of new APIs, Silverlight 3 is designed to make developers lives easier, and that's an important part of Microsoft's strategy because, many web developers remain wary of Silverlight's primary development environment -- Microsoft's family of .NET languages.
For newcomers the .NET experience can be quite a bit more complicated than typical web development tools like JavaScript or ActionScript, which powers Adobe's Flash platform. However, thanks to efforts like Iron Ruby and Iron Python, we were able to construct a basic photo gallery application using pure Python. Although it's probably a bit easier, you need not be a .NET expert to build a Silverlight app.
But because Silverlight uses the .NET framework it, offers some much more robust programming tools than Flash developers have access to -- for example, Visual Studio 2008, the primary IDE for Silverlight, blows Adobe's Flash IDE out of the water. Of course most Flash developers have long since moved to outside tools like Eclipse and there are also Eclipse plug-ins for working with Silverlight.
The other thing you get with Silverlight is access to "real" programming languages. Sure Adobe's ActionScript is capable of creating some powerful apps, but Flash and even the Flex framework lack the sophistication and maturity you'll find in the .NET framework. Silverlight also offers a much wider range of development tools -- Silverlight apps can be built with anything from C to Ruby.
That said, if you're a designer, familiar with the Photoshop, Illustrator, Flash workflow, you'll absolutely hate Microsoft Expression Studio, the primary tool for building Silverlight interfaces. Expression Studio feels like it crawled out of 2001 and it's primary component, Expression Design, could compete quite nicely with Illustrator 3.0, but Adobe long since left this sort of primitivism in the dust.
In some ways this is the basic answer to the question Flash or Silverlight. Designers love Flash, programmers love Silverlight.
Consider animation, a mainstay use of both apps. Flash has some programmatic animation libraries but most Flash projects still rely on some amount of timeline animation. Now contrast that with Silverlight, which uses the WPF animation model -- a time-based model.
WPF also lets you define the start and end conditions and can automatically calculate the movement for you. In fact, once you wrap your head around it, WPF "just works," and can save you tremendous amounts of time. Animating the opening of images in our slideshow app, for example, required just ten lines of code cut and pasted straight from the documentation.
Of course the main niche Silverlight is fighting for is the one that Flash has settled into -- drawing complex graphs and charts, animation, and of course, delivering audio and video over the web.
Indeed, Silverlight's biggest inroads so far have been in streaming video applications and the new tools in version 3 only make it more tempting for developers. With version 3, Silverlight will be able to stream up to 1080p HD video.
Like Flash 10, (which can also stream 1080p HD video) Silverlight now takes advantage of GPU acceleration, but Silverlight has a new trick that might give it an edge over Flash -- something Microsoft calls "Smooth Streaming."
Smooth Streaming allows Silverlight 3 to stream at up to 1080p, but automatically adjusts video quality based on a your internet connection and local processor load. If your bandwidth is lower, say you're stuck on a slow public wifi, the streaming server will lower the video quality to ensure that you aren't stuck in buffering hell.
Anyone who's watched Hulu's Flash-based player is probably familiar with the occasional playback lag, which is precisely what Silverlight 3's Smooth Streaming claims to avoid. Developers can check out the smooth streaming tools available at <a href="http://www.iis.net/media/experiencesmoothstreaming">IIS.net</a>
So does it live up to the hype? Well, obviously degrading video quality is not ideal, but Smooth Streaming may be able to tide web video over until broadband speeds catch up with our demands.
Smooth Streaming reportedly helped with NBC's 2008 Olympics coverage, but that was broadcast using Silverlight 2. In fact, we may have to wait for the 2010 Vancouver Olympics to really find out how Silverlight holds up under massive real-world loads. NBC, whose NBCOlympics.com site will be streaming the 2010 Winter Olympics, plans to use Silverlight 3 to stream video at 720p.
One other thing to keep in mind, Smooth Streaming requires the Internet Information Services 7.0 environment in Windows Server 2008. That means you're never going to smooth streaming videos from your LAMP stack and simply relying on Silverlight 3 just to handle the player.
In typical Microsoft fashion, the Smooth Streaming tools are a package affair and you'll need to swallow the package hook, line and sinker before you see any benefits.
That's a big commitment if you're not NBC and aren't broadcasting movies to an Olympic-size audience, but Silverlight 3 offers another tantalizing tool for developers to sweeten the deal -- the ability to build offline, stand-alone, desktop applications -- much like Adobe's AIR platform.
The best part about the standalone apps aspect is that you don't need to alter any of the application's code. The only thing to do is create a short XML file (AppManifest.xaml) and define a few settings. Suddenly your app can be run both inside and outside of the browser.
But that's only part of the appeal, there's also a revamped and much improved local data store API, what Silverlight calls "Isolated Storage." The Isolated Storage API is a way to store data for offline web-apps in Silverlight. Again, accessing it is dead simple and thanks to the updates in v3 you can now store data for your users regardless of whether they're using the web apps, desktop version or switching back and forth between both.
Unfortunately, Silverlight's desktop app experience is a little behind Adobe when it comes to the end user's experience. To get a Silverlight app running outside the browser, users first need to visit the app in the browser and then right-click and select "Install app onto this computer."
Adobe's paradigm -- just download an application and double click the icon -- is clearly has the edge when it comes to user-friendliness, but Silverlight is getting there.
It is possible to create a Silverlight app that detaches from the browser somewhat like a traditional download, but you'll need to create your own interface and then call the Detach() method on the Application type -- or so the documentation informed us. Sadly we were unable to get our app to install on the desktop using this method.
Still, while there are a few bumps, the new out-of-browser features may well end up being Silverlight 3's most important new feature. With the massive developer base of .NET we fully expect to see an explosion of desktop-oriented Silverlight apps once version 3 is out of beta.
In our time working with Silverlight we found development to be fairly easy and in many ways much more flexible than Flash (and that's coming from someone with eight years of ActionScript experience)
The framework is well documented and thanks to the .NET back end, there's no shortage of developers available to build Silverlight applications
Comparing Flash and Silverlight has already ignited many a flamewar, but the truth is -- as of Silverlight 3 -- the two are equally capable and which is best suited for your project is really something that only you can decide.
We're not crazy about the idea of needing a new plug-in, especially one from Microsoft, which doesn't have the best track record with web technologies, but if developers can take Silverlight where Microsoft is clearly hoping they can, then we better get used to the idea.
|