Category Archives: silverlight

Microsoft pledges commitment to Silverlight – but is it enough?

Microsoft’s president of Server and Tools Bob Muglia has posted a response to the widespread perception that the company is backing off its commitment to Silverlight, a cross-browser, cross-platform runtime for rich internet applications. He is the right person to do so, since it was his remark that ”Our strategy with Silverlight has shifted” which seemed to confirm a strategy change that had already been implied by the strong focus in the keynote on HTML 5 as an application platform.

Muglia says Silverlight is in fact “very important and strategic to Microsoft”. He confirms that a new release is in development, notes that Silverlight is the development platform for Windows Phone 7, and affirms Silverlight both as a media client and as “the richest way to build web-delivered client apps.”

So what is the strategy change? It is this:

When we started Silverlight, the number of unique/different Internet-connected devices in the world was relatively small, and our goal was to provide the most consistent, richest experience across those devices.  But the world has changed.  As a result, getting a single runtime implementation installed on every potential device is practically impossible.  We think HTML will provide the broadest, cross-platform reach across all these devices.  At Microsoft, we’re committed to building the world’s best implementation of HTML 5 for devices running Windows, and at the PDC, we showed the great progress we’re making on this with IE 9.

The key problem here is Apple’s iOS, which Muglia mentioned specifically in his earlier interview:

HTML is the only true cross platform solution for everything, including (Apple’s) iOS platform.

Muglia’s words are somewhat reassuring to Silverlight developers; but not, I think, all that much. Silverlight will continue on Windows, Mac and on Windows Phone; but there are many more devices which developers want to target, and it sounds as if Microsoft does not intend to broaden Silverlight’s reach.

Faced with the same issues, Adobe has brought Flash to device platforms including Android, MeeGo, Blackberry and Google TV; and come up with a packager that compiles Flash applications to native iOS code. There is still no Flash or AIR (out of browser Flash) on Apple iOS; but Adobe has done all possible to make Flash a broad cross-platform runtime.

Microsoft by contrast has not really entered the fight. It has been left to Novell’s Mono team to show what can be done with cross-platform .NET, including MonoTouch for iOS and MonoDroid for Google’s Android platform.

Microsoft could have done more to bring Silverlight to further platforms, but has chosen instead to focus on HTML 5 – just as Muglia said in his earlier interview.

Whether Microsoft is right or wrong in this is a matter for debate. From what I have seen, the  comments on Microsoft’s de-emphasis of Silverlight at PDC have been worrying for .NET developers, but mostly cheered elsewhere.

The problem is that HTML 5 is not ready, nor is it capable of everything that can be done in Silverlight or Flash. There is a gap to be filled; and it looks as if Microsoft is leaving that task to Adobe.

It does seem to me inevitable that if Microsoft really gets behind HTML 5, by supporting it with tools and libraries to make it a strong and productive client for Microsoft’s server applications, then Silverlight will slip further behind.

Microsoft’s Silverlight dream is over

Remember “WPF Everywhere”? Microsoft’s strategy was to create a small cross-platform runtime that would run .NET applications on every popular platform, as well as forming a powerful multimedia player. Initially just a browser plug-in, Silverlight 3 and 4 took it to the next level, supporting out of browser applications that integrate with the desktop.

The pace of Silverlight development was unusually fast, from version 1.0 in 2007 to version 4.0 in April 2010, and Microsoft bragged about how many developer requests it satisfied with the latest version.

Silverlight has many strong features, performs well, and to me is the lightweight .NET client Microsoft should have done much earlier. That said, there have always been holes in the Silverlight story. One is Linux support, where Microsoft partnered with Novell’s open source Mono project but without conviction. More important, device support has been lacking. Silverlight never appeared for Windows Mobile; there is a Symbian port that nobody talks about; a version for Intel’s Moblin/Meego was promised but has gone quiet – though it may yet turn up – and there is no sign of a port for Android. Silverlight is no more welcome on Apple’s iOS (iPhone and iPad), of course, than Adobe’s Flash; but whereas Adobe has fought hard to get Flash content onto iOS one way or another, such as through its native code packager, Microsoft has shown no sign of even trying.

In the early days of Silverlight, simply supporting Windows and Mac accounted for most of what people wanted from a cross-platform client. That is no longer the case.

Further, despite a few isolated wins, Silverlight has done nothing to dent the position of Adobe Flash as a cross-platform multimedia and now application runtime. Silverlight has advantages, such as the ability to code in C# rather than ActionScript, but the Flash runtime has the reach and the partners. At the recent MAX conference RIM talked up Flash on the Blackberry tablet, the Playbook, and Google talked up Flash on Google TV. I have not heard similar partner announcements for Silverlight.

Why has not Microsoft done more to support Silverlight? It does look as if reports of internal factions were correct. Why continue the uphill struggle with Silverlight, when a fast HTML 5 browser, in the form of IE9, meets many of the same needs and will work across the Apple and Google platforms without needing a non-standard runtime?

Here at PDC Microsoft has been conspicuously quiet about Silverlight, other than in the context of Windows Phone 7 development. IE9 man Dean Hachamovitch remarked that “accelerating only pieces of the browser holds back the web”, and last night Microsoft watcher Mary-Jo Foley got Server and Tools president Bob Muglia to admit that “our strategy has shifted” away from Silverlight and towards HTML 5 as the cross-platform client runtime, noting that this was a route to running on Apple’s mobile devices.

The Silverlight cross-platform dream is over, it seems, but let me add that Silverlight, like Microsoft itself, is not dead yet. Microsoft is proud of its virtual PDC streaming application, which is built in Silverlight. The new portal for Windows Azure development and management is Silverlight. The forthcoming Visual Studio Lightswitch generates Silverlight apps. And to repeat, Silverlight is the development platform for Windows Phone 7, about which we have heard a lot at PDC.

Let’s not forget that IE9 is still a preview, and HTML 5 is not a realistic cross-platform application runtime yet, if you need broad reach.

Muglia’s remarks, along with others here at PDC, are still significant. They suggest that Microsoft’s investment in Silverlight is now slowing. Further, if Microsoft itself is downplaying Silverlight’s role, it will tend to push developers towards Adobe Flash. Alternatively, if developers do migrate towards HTML 5, they will not necessarily focus on IE9. Browsers like Google Chrome are available now, and will probably stay ahead of IE in respect of HTML 5 support.

I hope these latest reports will trigger further clarification of Microsoft’s plans for Silverlight. I’d also guess that if Windows Phone 7 is a big success, then Silverlight on the Web will also get a boost – though judging from the early days in the UK, the new phone is making a quiet start.

Finally, if Microsoft is really betting on HTML 5, expect news on tools and libraries to support this new enthusiasm – maybe at the Mix conference scheduled for April 2011.

Microsoft PDC big on Azure, quiet on Silverlight

I’m at Microsoft PDC in Seattle. The keynote, introduced by CEO Steve Ballmer, started with a recap of the company’s success with Windows 7 – 240 million sold, we were told, and adoption plans among 88% of businesses – and showing off Windows Phone 7 (all attendees will receive a device) and Internet Explorer 9.

IE9 guy Dean Hachamovitch demonstrated the new browser’s hardware acceleration, and made an intriguing comment. When highlighting IE9’s embrace of web standards, he noted that “accelerating only pieces of the browser holds back the web.” It sounded like a jab at plug-ins, but what about Microsoft’s own plug-in, Silverlight? A good question. You could put this together with Ballmer’s comment that “We’ve tried to make web the feel more like native applications” as evidence that Microsoft sees HTML 5 rather than Silverlight as its primary web application platform.

Then again you can argue that it just happens Microsoft had nothing to say about Silverlight, other than in the context of Windows Phone 7 development, and that its turn will come. The new Azure portal is actually built in Silverlight.

The messaging is tricky, and I found it intriguing, especially coming after the Adobe MAX conference where there were public sessions on Flash vs HTML and a focus in the day two keynote emphasising the importance of both. All of which shows that Adobe has a tricky messaging problem as well; but it is at least addressing it, whereas Microsoft so far is not.

The keynote moved on to Windows Azure, and this is where the real news was centered. Bob Muglia, president of the Server and Tools business, gave a host of announcements on the subject. Azure is getting a Virtual Machine role, which will allow you to upload server images to run on Microsoft’s cloud platform, and to create new virtual machines with full control over how they are configured. Server 2008 R2 is the only supported OS initially, but Server 2003 will follow.

Remote Desktop is also coming to Azure, which will mean instant familiarity for Windows admins and developers.

Another key announcement was Windows Azure Marketplace, where third parties will be able to sell “building block components training, services, and finished services and applications.” This includes DataMarket, the new name for the Dallas project, which is for delivering live data as a service using the odata protocol. An odata library has been added to the Windows Phone 7 SDK, making the two a natural fit.

Microsoft is also migrating Team Foundation Server (TFS) to Azure, interesting both as a case study in moving a complex application, and as a future option for development teams who would rather not wrestle with the complexities of deploying this product.

Next came Windows Azure AppFabric Access Control, which despite its boring name has huge potential. This is about federated identity – both with Active Directory and other identity services. In the example we saw, Facebook was used as an identity provider alongside Microsoft’s own Active Directory, and users got different access rights according to the login they used.

In another guide Azure AppFabric – among the most confusing Microsoft product names ever – is a platform for hosting composite workflow applications.

Java support is improving and Microsoft says that you will be able to run the Java environment of your choice from 2011.

Finally, there is a new “Extra small” option for Azure instances, aimed at developers, priced at $0.05 per compute hour. This is meant to make the platform more affordable for small developers, though if you calculate the cost over a year it still amounts to over $400; not too much perhaps, but still significant.

Attendees were left in no doubt about Microsoft’s commitment to Azure. As for Silverlight, watch this space.

Lessons from Evernote’s flight from .NET

Evernote has released version 4.0 of its excellent note-taking product. Software developers have taken particular interest in the blog post announcing its release, because of what it says about .NET, in this case the Windows Presentation Foundation, versus native code:

Evernote 4 is a major departure from Evernote 3.5 in every way. While 3.5 added tons of great new features, there were some problems we simply couldn’t fix: the blurry fonts, slow startup times, large memory footprint, and poor support for certain graphics cards were all issues that the technology behind 3.5 (Windows .net and WPF) was incapable of resolving. As a result, we ended up chasing down platform bugs rather than adding the great features our users wanted.

So we decided to start over from scratch, with fast, native C++ that we knew we could rely on. As you’ll see, the results are amazing. This new version will set a foundation for rapid improvement.

Evernote 4 is designed to give you a great experience on any computer that you use, whether you’re on a netbook, a five year old Windows XP machine or a super fast top-of-the-line Windows 7 computer.

On our test hardware, Evernote 4 starts five times faster, and uses half the memory of Evernote 3.5.

A bit of background. WPF was introduced in Windows Vista and was originally intended to be the main GUI API for Windows, until the notorious reset midway through the Vista development cycle which marked a retreat from managed code back to native code in the operating system. I’d guess that the issues faced by the Evernote team were not so different from those faced back then by the Windows team at Microsoft.

WPF is not only based on .NET. It also uses DirectX and hardware acceleration under the covers, enabling rich multimedia effects. The layout language of WPF is XAML, giving freedom from scaling issues which cause hassles in the native API.

So what are the lessons here? Is WPF no good?

It is not so simple. WPF is brilliant in many ways, offering the productivity of .NET coding and a powerful layout framework. However it was a technology which Microsoft itself hardly used in its key products, Windows and Office – a warning sign.

When Microsoft built Visual Studio 2010 and .NET 4.0, the development team used WPF for the Visual Studio shell. This move by an internal team to create such a complex product in WPF was good for the framework itself. The font issue was addressed, performance improved. Evernote might not have found all its issues fixed in version 4.0, but it would likely have been better.

After I tweeted about Evernote’s experience, a couple of Microsoft folk contacted me to make this point. The trouble is, even version 3.5 of WPF was not the first version, and it never sounds altogether convincing if, when a customer complains about your product, you tell them everything is fine in the latest and greatest build. Why did Microsoft not get this right before?

That said, I am sure the latest WPF is better than before, though it is still heavyweight relative to native code. Factors that might suggest a WPF solution include:

  • The application only needs to run on Windows
  • There is no need to support older machines
  • The application makes use of data visualisation or other multimedia effects
  • The development team lacks the resources to build equivalent functionality in native code

The last point is important. Maybe a hotshot team of C/C++ developers could make a better job, but if you don’t have such a team or the money to hire it, it is not so relevant.

There is another possible approach, without abandoning .NET. Silverlight has many of the features of WPF, is lightweight, and runs on the Mac as well as Windows.

Windows Phone 7 development hits the big screen

I spent yesterday in the dim light of a Manchester cinema, attending the Windows Phone 7 developer day.

The event was organised by DeveloperDeveloperDeveloper, which is a .NET community group run, as far as I can tell, by a group of Microsoft MVPs. The sponsors were Microsoft, Appa Mundi, and NxtGenUG. Towards the end of the day, Andy Wigley (from Appa Mundi) made a statement that this was a community event and not an official Microsoft event. It was true up to a point, though as far as I can tell Microsoft paid for most of it -“Microsoft UK very kindly provided the venue and logistic support.” says the event description. Microsoft was present showing real Windows Phone 7 devices, and the presenters included Andy Wigley (from Appa Mundi) and Rob Miles, who have also presented the official Jump Start training for Windows Phone 7, and regular TechEd speaker Maarten Struys who is a Windows embedded and Windows Phone evangelist working for Alten PTS in the Netherlands. Community, or Microsoft PR?

Regardless, they were excellent speakers and well informed on all things Windows Phone 7. The community aspect did come to the fore when it came to the catering – there was none – and the venue itself which felt as you would expect a cinema out of hours to feel. I’m guessing Microsoft the community was disappointed with the attendance, around 100 in a venue that seats 330.

image

There is one significant benefit to presenting in a cinema. The screen and projection was first-rate.

image

The sessions themselves were introductory but struck me as useful for anyone getting started with Windows Phone 7 development – which given the devices are not yet available, is probably most of us. Andrej Radinger’s session on creating apps that work offline was particularly interesting to me. I had previously seen the Jump Start course so some of the material was already familiar, though the refresher did no harm.

Much of the challenge of Windows Phone 7 development is coping with the fact that your app will frequently get killed and have to resume later as if nothing happened. We got a lot of input on this topic.

Another challenge is coping with Expression Blend. Designer Tricky Bassett gave a short but insightful view of the design process for a Windows Phone 7 app, with some intriguing asides along the way. He is a design professional, and said that his team had been excited about SketchFlow, the prototyping tool in Blend, but in practice found it little use because they only need sketches, rather then the working controls which SketchFlow gives you. He also commented on Blend, saying that Blend with Windows Phone 7 projects was more stable than it had been before, in his experience with other projects. In previous work with Blend, solutions that did not load have been a recurring problem – I take it that either they loaded in Visual Studio but not in Blend, or vice versa.

Bassett also said that Blend takes some effort to learn, and this was confirmed by the way some of the presenters struggled to do basic operations with the tool. The Blend UI is perplexing and at events like this one I’d suggest that a Blend Basics piece would go down well.

The Silverlight and XNA platforms strike me as pretty good, though I think that lack of native code development will be a problem among the best developers – there are interesting rumours about certain developers getting special privileges.

image

My overriding impression though is that the phone is good, the tools are good, but the demand is lacking. One developer told me that he has been trying to sell an idea for a custom Windows Mobile application to a small business client with 12 employees. They are keen but their employees want either Apple iPhone or Google Android phones. Windows Phone 7 may help by being a better and more attractive device, but getting past the perception that Windows phones are not much good is going to be a problem.

But what can Microsoft do? It is going to take devices that deliver on the promise, a stunning marketing campaign, and aggressive pricing, for this thing to flourish.

RunRev renames product to LiveCode, supports iPad and iPhone but not Windows Phone 7

Runtime Revolution has renamed its software development IDE and runtime to LiveCode, which it says is a “modern descendent of natural-language technologies such as Apple’s HyperCard.” The emphasis is on easy and rapid development using visual development supplemented with script.

It is now a cross-platform development platform that targets Windows, Mac and Linux. Android is promised soon, there is a pre-release for Windows Mobile, and a new pre-release targets Apple’s iOS for iPad and iPhone.

LiveCode primarily creates standalone applications, but there is also a plug-in for hosting applets in the browser, though this option will not be available for iOS.

Now that Apple has lifted its restrictions on cross-platform development for iOS, it is Microsoft’s Windows Phone 7 that looks more of a closed device. The problem here is that Microsoft does not permit native code on Windows Phone 7, a restriction which also prohibits alternative runtimes such as LiveCode. You have to code applications in Silverlight or XNA. However, Adobe is getting a special pass for Flash, though it will not be ready in time for the first release of Windows Phone 7.

If Windows Phone 7 is popular, I imagine other companies will be asking for special passes. The ubiquity of Flash is one factor holding back Silverlight adoption, so in some ways it is surprising that Microsoft gives it favoured treatment, though it makes a nice selling point versus Apple’s iPhone.

Microsoft’s Scott Guthrie: We have 200+ engineers working on Silverlight and WPF

Microsoft is countering rumours that WPF (Windows Presentation Foundation) or Silverlight, a cross-platform browser plug-in based on the same XAML markup language and .NET programming combination as WPF, are under any sort of threat from HTML 5.0.

We have 200+ engineers right now working on upcoming releases of SL and WPF – which is a heck of a lot.

says Corporate VP .NET Developer Platform Scott Guthrie in a Twitter post. Other comments include this one:

We are investing heavily in Silverlight and WPF

and this one:

We just shipped Silverlight for Windows Phone 7 last week, and WPF Ribbon about 30 days ago: http://bit.ly/aB6e6X

In addition, Microsoft has been showing off IIS Media Services 4.0 at the International Broadcasting Conference, which uses Silverlight as the multimedia client:

Key new features include sub-two-second low-latency streaming, transmuxing between H.264 file formats and integrated transcoding through Microsoft Expression Encoder 4. Microsoft will also show technology demonstrations of Silverlight Enhanced Movies, surround sound in Silverlight and live 3-D 1080p Internet broadcasting using IIS Smooth Streaming and Silverlight technologies.

No problem then? Well, Silverlight is great work from Microsoft, powerful, flexible, and surprisingly small and lightweight for what it can do. Combined with ASP.NET or Windows Azure it forms part of an excellent cloud-to-client .NET platform. Rumours of internal wrangling aside, the biggest issue is that Microsoft seems reluctant to grasp its cross-platform potential, leaving it as a Windows and desktop Mac solution just at the time when iPhone, iPad and Android devices are exploding in popularity. 

I will be interested to see if Microsoft announces Silverlight for Android this autumn, and if it does, how long it will take to deliver. The company could also give more visibility to its work on Silverlight for Symbian – maybe this will come more into the spotlight following the appointment of Stephen Elop, formerly of Microsoft, as Nokia CEO.

Apple is another matter. A neat solution I’ve seen proposed a few times is to create a Silverlight-to-JavaScript compiler along the lines of GWT (Google Web Toolkit) which converts Java to JavaScript. Of course it would also need to convert XAML layout to SVG. Incidentally, this could also be an interesting option for Adobe Flash applications.

As for WPF, I would be surprised if Microsoft is giving it anything like the attention being devoted to Silverlight, unless the Windows team has decided to embrace it within the OS itself. That said, WPF is already a mature framework. WPF will not go away, but I can readily believe that its future progress will be slow.

More on Microsoft’s difficult choices: WPF, Silverlight, HTML 5

Earlier today I posted a story speculating about the future direction of Microsoft’s development platform, which has proved controversial and to some extent has been misunderstood. Although it is speculative, the issues are important since developers want to target platforms with a strong future. Here’s another take on why Microsoft, whichever way it decides to go, faces some difficult choices.

First, let me be clear: I don’t see Microsoft abandoning Windows Presentation Foundation let alone Silverlight. Microsoft has an good track record when it comes to continuing support for its technologies, better than competing platforms. Visual Basic 6 applications mostly still run today on Windows 7, perhaps with a few issues caused by User Account Control for which there are workarounds. Whatever you target, there is an excellent chance Microsoft will continue to support it long into the future. The main exception I can think of is Windows Mobile, which is incompatible with the new Windows Phone 7 series, but given the challenges Microsoft faces in mobile you can understand the decision.

Nor is there any chance of Microsoft reviving old frameworks. There will not be a return to Windows Forms. WPF is a better GUI framework in every way, other than performance on older systems – though note that Windows Forms applications still run fine today, and I imagine will run fine on Windows 8 and probably 9 as well.

The real question is not about support, but future investment. Microsoft has finite resources. It is in overdrive right now on Internet Explorer, on Silverlight, on Windows Phone 7, and on Azure, for example. There will be other products and technologies that receive less attention, because someone has decided they are not strategic.

It also seems to me that Microsoft’s server and cloud story is less conflicted. From the developer’s perspective it is thoroughly .NET based, and you can be confident that technologies like C#, IIS, ASP.NET, SQL Server, Exchange and SharePoint will be around for the foreseeable future.

With that out of the way, a few further comments.

Windows Presentation Foundation

The history of WPF goes back to the early days of Windows Vista, then called Longhorn. WPF was one of the the “three pillars”, Avalon, where the others were Indigo (WCF) and WinFS. Avalon was the future of the Windows GUI API, based on .NET code and XAML layout.

If Longhorn has proceeded as planned, WPF would be the loose equivalent of Cocoa on Apple’s OS X, the standard way to code Windows GUI applications. Unfortunately, in 2004, Microsoft discovered that Longhorn was heading for disaster. The project was reset, delaying release and resulting in Vista being both late and rushed. The reset project included Avalon as a supported framework, but made it incidental to the workings of Windows itself. The Windows team, in other words, lost faith in Avalon and reverted to native code with a dash of DirectX.

Windows 7 is more of the same. WPF is there but it is not at the heart of the OS. Developers are encouraged to use it for their own apps, but the Windows team is focused on native code.

When Visual Studio 2010 was released, with a shell built in WPF, Microsoft made some noise about how it showed its commitment to the framework. It was also noted that the Visual Studio team had worked with the WPF team to fix some issues. However, there is little sign of WPF changing its role as a layer in Windows primarily to support custom applications, rather than being used for the shell of Windows itself.

The question now: how much should Microsoft invest in future WPF development? It is not essential for Windows itself. Nor it is compelling for developers wanting to take advantage of the cloud model and support diverse clients. Frankly it does not look strategic unless it becomes the Windows shell API; and you could understand Microsoft having a “once bitten twice shy” attitude to that possibility.

I find it plausible that Microsoft would throttle back on WPF development.

Silverlight

Silverlight by contrast is strategic. Silverlight is a framework that runs in the browser, out of browser, and on Windows Phone 7. It is lightweight and cloud-oriented, and it runs .NET code, ticking lots of boxes for developers moving on from Windows desktop applications. It is also designer-friendly, with rich graphics and multimedia support. There are still a few gaps – printing is crude, for example – but it makes more sense for Microsoft to invest in Silverlight than WPF. It is significant that the new LightSwitch tool for rapid development of database apps targets Silverlight, not WPF, and not ASP.NET (except on the server). Silverlight is also the application platform for Windows Phone 7.

Then again, Silverlight is WPF. It was originally WPF/Everywhere, and uses the same XAML language for layout.

I will be surprised if Microsoft back-pedals on Silverlight. Nevertheless, I can also understand this being a matter of debate. Despite Microsoft’s efforts to distinguish them, there is considerable overlap between what Silverlight does, and what HTML 5 in IE9 does, especially when in the browser. There is also the Apple problem: HTML applications will run on iPhone and iPad, but Silverlight will not. What if Microsoft focused on the new IE engine instead of Silverlight, supporting it properly in Visual Studio, and providing ways for developers to create out-of-browser apps that run with full trust and have access to local system APIs? This would be along the same lines as the Palm WebOS and Google’s Chrome OS.

Put another way, does it make sense for Microsoft to invest equally in HTML 5 and Silverlight, when possibly IE 9 could be the basis of a unifying technology, a subset of which would work on any modern browser on any client?

It seems to me that Microsoft will have to invest in tooling for HTML 5 clients in some forthcoming edition of Visual Studio, and that this will be a selling point for its cloud platform, while possibly undermining the role of Silverlight.

There is also a continuing case for Silverlight, both because of the inherent advantages of a plug-in – consistency of client platform as well as features that HTML 5 lacks – and because it supports .NET. The .NET languages (Mono aside) tie developers to Visual Studio and to Microsoft’s platform. Visual Studio combined with .NET is a formidable tool for both client and server and a key advantage for the platform.

Watch this space.

Microsoft wrestles with HTML5 vs Silverlight futures

Former Microsoft Silverlight Product Manager Scott Barnes has posted a series of tweets following a visit to Microsoft:

So.. after a week in Microsoft HQ etc.. i have a lot of inside info that just basically puts into question the future of #Silverlight #wpf

he remarks, and then:

Right now there’s a faction war inside Microsoft over HTML5 vs Silverlight. oh and WPF is dead.. i mean..it kind of was..but now.. funeral.

Barnes positions it as a fight between Windows/IE9 backing HTML5, and the developer division backing Silverlight. He also suggests that Microsoft is contemplating a classic “Embrace and extend” strategy for HTML:

HTML5 is the replacement for WPF.. IE team want to fork the HTML5 spec by bolting on custom windows APi’s via JS/HTML5

He says further that Microsoft has “shut down the designer story” – I am not sure what that implies, though I can imagine that a lot of money has been sunk into the Expression tools without drawing significant market share from Adobe’s Creative Suite.

Barnes is a straight-talking guy but clearly this is all speculation. Nevertheless it is obvious that, on the eve of launching IE9 beta with its fast JavaScript engine, hardware accelerated graphics, and pixel-precise bitmap drawing, Microsoft has a tricky job positioning HTML5 vs Silverlight. For that matter, even positioning Silverlight vs desktop Windows Presentation Foundation is not easy.

Since we are also on the eve of launch for Windows Phone 7, which Microsoft has flagged as a strategic product and which uses Silverlight as its app platform, it seems unlikely that the technology will be sidelined; but rumours of internal divisions on the subject do not surprise me.

Decompiling Silverlight

A Silverlight application is a .NET application. Most developers will be aware of this; but it is worth noting that whereas ASP.NET code executes on the server and is not normally available for download, Silverlight code is downloaded to the client and can easily be decompiled. It is almost as easy to view as JavaScript code in the browser.

If you want to investigate this, the first thing to do is to find the .xap file which contains the Silverlight application. You will likely find this in your browser cache, or you can download it directly from the web site hosting the application. If you have out-of-browser Silverlight apps, they are usually located at:

C:\Users\[username]\AppData\LocalLow\Microsoft\Silverlight\OutOfBrowser

Copy the .xap file somewhere convenient, and rename it to have a .zip extension. Then extract the files. The result looks something like this:

image

Next, you need a .NET decompiler such as Redgate .NET Reflector. Run Reflector and open a .dll file containing application code. Select a method, and Reflector does its best to show you the code. It does a good job too:

image

The purpose of this post is not to encourage decompiling other people’s code, but rather to make the point that even though Silverlight code is “compiled”, it is trivial to read it – just in case anyone thought it was a bright idea to store passwords or other authentication secrets there.

The solution is to never to put anything security-critical in client-side code. Second, you can use an obsfuscator such as dotfuscator to make the decompiled code harder to read.