Just how different, or similar, is Silverlight 5 and WinRT, on a type/method basis? The WinRT Genome Project...
Join the DZone community and get the full member experience.Join For Free
"What is the hardest part about learning a new programming language? I’ve often argued that learning a new language is easy, it’s learning a new framework is can be time consuming.
In case you’ve been living under a rock lately, you probably already know that Windows 8 Metro style apps can be built with Xaml & C#. This means that .NET & Silverlight developers can leverage their existing skillset to easily build Win8 Metro Xaml style apps. But just how similar is Silverlight to WinRT?
In an effort to get some real numbers, I created a program to iterate over all the default assemblies included WinRT and compare with those found in Silverlight 5. Here’s what I found:
Comparison details for those interested:
- I included all Silverlight 5 assemblies installed as part of the SDK. Other assemblies such as RIA services and the Silverlight Toolkit were not included.
- The public Silverlight 5 RC was used. IMO it is highly unlikely any numbers will change once the final version is released.
- Differences in namespaces, type accessibility, and base classes were still counted as a match. For example, I ignored differences such as a type being sealed or implementing ISerializable.
- Similar liberties were taken with members.
- Property get & set methods and event add & remove methods were not counted as unique members.
My key takeaways:
- WinRT includes a ton of new types. Some of these are certainly for new features such as the marketplace, accelerometer support, …etc. Time to start learning!
- Approximately 1/4 of the types in Silverlight are not present in WinRT. Some of these are no longer relevant like the types associated with the DOM bridge or Out of Browser support.
- When comparing just the shared types, SL5 starts to look very close to an actual subset of WinRT. This is good news for Silverlight developers because it means most of your existing code should easily port.
"In my earlier post I created a high level breakdown of the APIs shared by both Silverlight and WinRT…
Here I’m providing a complete reference of all 6,585 public types and 15,248 members included in Silverlight 5 and/or WinRT and where they overlap.
My hope is that this will serve as a reference to Silverlight developers trying to get up to speed with WinRT.
While we're still early in the WinRT cycle, I still thought this an interesting comparison.
Published at DZone with permission of Greg Duncan, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.