Thursday, July 23, 2009

Silverlight: What is CoreCLR?

Do you know what is CoreCLR? If not then keep reading this article, if yes then do contribute to help others understand it better.

CoreCLR is a scaled version of the original CLR that has been encapsulated within Silverlight2, Don't you think its amazing? Well i find it very interesting, with access to BCL (Base Class Libraries) you can write classic applications using Silverlight2 and now Sliverlight3 coming in with lot more new features.

Silverlight2/CoreCLR includes:

- BCL (though not complete but enough to help you write medium to complex level applications, I'll go in to its details in some other post)
- JIT ( just in time compiler)
- GC ( Garbage collector)


What are the benefits of CoreCLR?

- You have the access to the limited BCL, you can write code in C# or any other .NET language and it will run it User web browser.
- CoreCLR works for non-windows platforms also e.g MAC OS, see below figure. It uses PAL (Platform Adaptation Layer), an API written for different platforms.


Figure taken from MSDN article

- With Silverligt CoreCLR, you can manipulate DOM within C# codebehind of Silevrlight XAML page, or vise versa i.e. using C# objects in JavaScript.
- The good thing about CoreCLR is that its compatible with the original CLR because the designer of CoreCLR have kept the execution engine and virtual machine same.
- You can easily customize the existing code written for original CLR to fit for the CoreCLR but with few changes.
- CoreCLR run side by side with the desktop CLR, that too is a big advantage.
- One of the other great things with CoreCLR is that the Silverlight team has been able to keep the size of the setup in a reasonable range, so that the user don't have to wait that long.

With CoreCLR coming in to picture, its more easy for the .NET developers to write applications in Silverlight instead of using Flash and taking advantage of Action Script in Flash. They need not to learn anything new, they can take advantage of their existing C# or VB.NET skills for writing Silverlight applications business logic.

CoreCLR Web Resources:

- A must read article from MSDN on CoreCLR: http://msdn.microsoft.com/en-us/magazine/cc721609.aspx
- An interesting Video from Microsoft TechNet 09 about Silverlight2/ CLR, a must see:


Get Microsoft Silverlight

No comments: