Even a chimp can write code

Sunday, June 08, 2008

How to tell a Silverlight assembly from a .NET Framework one?

Silverlight 2 application code is compiled to Common IL and packaged into assemblies (.dll) which are in turn deflated into a Zip file (container with .xap extension). The IL is a CPU- and platform- independent instruction set. The Silverlight runtime has in it the Core CLR which executes this IL. Given that .NET Framework involves much of the same things save for the .xap packaging, how does one tell between a DLL built for Silverlight versus one for .NET Framework?

Well, the answer is in one of the security assumptions that Silverlight's Core CLR makes to distinguish a core platform assembly from a transparent code app assembly. The mscorlib.dll in Silverlight is signed with a different key than it's namesake in .NET Framework. This is apparent in it's full name, or specifically it's public key token.

The public key token for mscorlib in Silverlight is:

7cec85d7bea7798e

while the public key token for mscorlib in .NET Framework is:

b77a5c561934e089

So the trick to sniffing out an arbitrary managed code assembly for its allegiance - Silverlight or .NET Framework - is to look through it's list of referenced assemblies, locate mscorlib and then check the public key token. Here is a sample application that does that.

Labels: ,

Email this | Bookmark this

Thursday, February 01, 2007

Great apps powered by ClickOnce

I've posted previously about XBAPs, but here are a couple links to standalone Windows Presentation Foundation (WPF) applications that use the ClickOnce deployment model.

ITN has a cool new news -video application called ITN Hub Player, accompanied by a Windows Vista sidebar gadget. See http://www.itn.co.uk/vista/

OTTO, the 2nd largest online retailer in the world, just went live with a very impressive ClickOnce-deployed WPF application which completely changes the online store as you know it. See http://www.otto.de/vista

This app also uses Windows CardSpace and Windows Communication Foundation (WCF), both .NET Framework 3.0 components and part of Windows Vista.

I love seeing ClickOnce being used in mainstream consumer oriented applications, and will be posting about these more often. And that's not just 'cause my team owns WPF Deployment and works closely with the ClickOnce team. Having had my share of munging around with MSIs, I think ClickOnce is by far the most superior application deployment technology out there for rich client apps on Windows. It provides a sophistocated update mechanism for your apps, taking the pain out of that process. If you haven't heard of it before, or aren't using it in your .NET apps, I think the apps above will make you reconsider.

Labels: , , , , , ,

Email this | Bookmark this

Thursday, January 25, 2007

Xceed WPF DataGrid - For Free

For real. WPF didn't ship with a DataGrid control in .NET Framework 3.0. The fine folk at Xceed Software recognized that and have now released an enterprise strength WPF DataGrid control to the community. They have a beautiful demo XBAP called Xceed DataGrid for WPF LiveExplorer that lets you see the control in action and use it for yourself.

Get the Xceed DataGrid control. [Requires .NET Framework 3.0 or Windows Vista]

Thanks to Mike for the tip.

Tags: , , , , ,

Labels: , , ,

Email this | Bookmark this

Dominoken

KF sent us a link to this beautiful XAML Browser Application (XBAP) created by Bascule for the Windows Vista launch in Japan:

DOMINOKEN

Requires .NET Framework 3.0 or Windows Vista. I've seen it several times, changing the camera angle and zoom settings. Never gets old!

Tags: , , , , ,

Labels: , , , , ,

Email this | Bookmark this

Monday, January 08, 2007

The new Yahoo! Messenger for Windows Vista

It has been tough to keep this one under wraps but I can finally talk now. Yahoo! is shifting the communication and instant messaging landscape. The new Yahoo! Messenger for Windows Vista is one of those seminal applications that demonstrate what good user experience really is. See the video and decide for yourself. This application is built on Windows Presentation Foundation (a .NET Framework 3.0 component and part of Windows Vista).

This isn’t just a re-skinned version of the existing messenger app... this was built by Eric and his ace team from the ground up. A tip o’ the hat to Karsten for tirelessly making sure all of Yahoo!’s questions and concerns were responded to promptly; whether he was hunting us down via discussion lists or on the phone or even setting up face to face meetings, Karsten was a bull-dog you couldn't get away from. Props to the good folk from frog for the kickass design.

This app is a powerful showcase for WPF and Windows Vista features and a testament to how designers and developers can work together on building great applications.

Tags: , , , ,

Labels: , , , ,

Email this | Bookmark this