Is Silverlight overtaking both Flex and AIR?
Reading the feature list of the upcoming Silverlight 4 release (now in beta), I am more than a bit impressed. Up to now, there has been a few glaring features by which Silverlight was trailing behind Flex - camera/mic input; printing; clipboard access; and right-to-left text being ones that spring to mind. Admittedly, all of these are fairly niche features which most applications wouldn't require.
Silverlight 4 not only brings in all these features, but also a pile of others. Interestingly, they seem to be making a direct pitch against Adobe AIR with many of the features. The new Elevated Trust Applications feature (for out-of-browser apps), enables a host of features typically reserved for desktop applications: Local file access; Notifications API; Full-screen full-keyboard access; Cross-domain policy-free networking; and Drop targets. Of course, features aside, the huge advantage of the Silverlight desktop approach over AIR is that there is only one runtime plugin required.
At the speed Microsoft is moving forward with Silverlight, Adobe is going to have to start seriously upping their commitment to the Flash platform if they want to stay at the top of the game. Up to now, they could always give the argument of Flex being more feature-rich, and the ease of adaptation to the desktop with AIR - with both of these arguments now void, and Microsoft firmly remaining miles ahead in the developer tooling scene, Adobe's work is cut out. They still have greater marketplace penetration with Flash player, but that lead is only going to narrow also.
You've got to love competition!
Silverlight tools for the Mac
Just reading about the efforts to produce an Eclipse-based Silverlight development platform for the Mac - quite cool.
I have to think though, perhaps the effort would have been better spent creating a port of Blend for the Mac... it seems to me that only a tiny minority of developers would opt for Eclipse over Visual Studio; whereas I'd guess nearly all designers would prefer to work natively within MacOS.
I can kind of understand why they've done it, but I can only hope there's another project underway with that Blend port...
Creating a custom Silverlight 3 Smooth Streaming player
When it comes to video delivery, I come from a Flash background. I've worked on numerous streaming video projects over the years, all of which were created with Flash & Actionscript on the client side. Having been through the process several times, I know all the hurdles I'm going to have to clear well in advance.
Documentation for coding a Silverlight 3 player against IIS Smooth Streaming is a little sparse. IIS.net has several articles on the server setup, but I couldn't find anywhere obvious regarding the client connection.
Unlike progressive video playback, you can't just point the MediaElement.source at the video path then call play(). After a bit of searching, most people were talking about some AdaptiveStreamingSource class, which isn't available in the base SL toolkit, but rather only found in SmoothStreaming.dll within the template players generated from Expression Encoder!
Per some handy forum posts, the steps required are:
- With Expression Encoder installed, go to C:\Program Files\Microsoft Expression\Encoder 3\Templates\en, select any template, and copy the SmoothStreaming.xap file.
- Rename your copied .xap file to .zip, unzip, and take out the SmoothStreaming.dll and PlugInMssCtrl.dll files.
- Reference these assemblies in your project, and you can then start using AdaptiveStreamingSource.
So, once you can finally access the required assemblies, you can then invoke your IIS Smooth Streaming service with something along the lines of the following:
var mediaPath = "testClip_h1080p.ism/manifest";
var source = new AdaptiveStreamingSource
{
ManifestUrl = new Uri(mediaPath, UriKind.RelativeOrAbsolute),
MediaElement = streamElement // the xaml MediaElement
};
source.StartPlayback();
Make sure you put the trailing '/manifest' after your stream path.
Simple enough, once you've figured out the basics! Not exactly sure what MS were thinking by not including the SmoothStreaming assemblies in the SL3 toolkit? Surely they realise not everyone wants to use a templated player. Or have I missed something here?
Visual Studio Silverlight/xaml bug
This one was driving me crazy for at least a few hours. On a fresh install of VS2008 & Silverlight 3 tools, there was no xaml code highlighting at all, no intellisense, nothing - just like any ordinary text file. Checking the same project on another machine, it was all fine. So I starting disabling/uninstalling all VS plugins (ReSharper, AnkhSVN), but still no luck. Was starting to think I'd have to reinstall VS...
The solution was simple enough - run the VS Command Prompt, and enter:
devenv /resetskippkgs
Problem solved. Apparently a good one to try whenever you lose formatting or Intellisense features.
Where to begin?
So I've been thinking about what I could kick start this blog with - stuff in which I've developed a bit of a niche and have something to share with a wider audience. My background has been primarily in web-based application development, with the tools focused largely within the .NET and the RIA spaces.
I recently helped a colleague out with an article on Flex vs. Silverlight in the Enterprise. Both of us have a strong .NET background, and have more recently been heavily involved on a massive enterprise-scale Flex application. Although I still stand by the original article, I realise it's impossible to accurately and fairly detail each platforms' strengths and weaknesses in one post.
So, I plan to start a bit of a series - comparing different user experiences as created with Silverlight and Flex, and hopefully reaching a conclusion on the benefits of each platform, based upon developer experience/efficiency, and of course how the end result meets the original client requirements.
Each post will focus on a technical area that you may find within any enterprise RIA. Example areas could be video streaming, datagrid customisation, push messaging, theming/skinning, just to name a few.
It's as much for my own benefit as anyone else's - in order to deliver the best client experience, you HAVE to know what the best tools or platform are for any given situation!