9

There are many "flavors" of the .NET Framework:

  • Full ("normal")
  • Client profile subset
  • Silverlight in web browsers
  • "Silverlight" on Windows Phone
  • Compact framework
  • WinRT

When C# code is needed on a new platform, it would seem that Microsot prefer to take the full CLR and strip it down to a small subset, creating new assemblies and moving types around, instead of just using existing assemblies such as those in the BCL. Silverlight for example has different classes/methods to WPF (even down to some methods having slightly different signatures or very different implementations), instead of simply referencing the same implementation of List<T> as WPF.

Is this the ideal architecture, or a sign of legacy? Shouldn't the BCL run on all platforms, with just different presentation/IO libraries on each? Or are the BCL and other libraries too bloated, and splitting them out would create too many backward compatibility problems, to be acceptable?

If we started from a blank canvas and weren't worried about backwards compatibility, would the current situation really be the best way to handle multiple platforms?

Paul Stovell
  • 1,719

3 Answers3

5

What Microsoft is doing, splitting the routines into multiple packages, is common. There is a version of .NET that runs on single board computers (.Net Micro Framework) with limited memory. It would not make any sense to include in that version everything required to run a full graphical user interface for example.

If you look at Apple, the iPhone does not contain all the routines that one would find on a Mac.

JonnyBoats
  • 1,793
1

I don't think .NET is the problem. While there are various runtimes, they are still compatible, which is why technologies like the Portable Class Libraries works (for the majority of the runtimes you listed).

For example, shouldn't each flavor reference a single, shared assembly called "System.Collections.dll", instead of each runtime having its own copy of System.dll/mscorlib.dll with various copies of the collections?

Why is this needed? As long as they are all compatible (again, see the Portable Class Libraries), this shouldn't matter, as the BCL is part of the runtime itself, and distributed in tandem.

Reed Copsey
  • 1,001
1

.NET is essentially replacing and expanding com objects in a windows environment. It's also used to identify a lot of vastly different technologies, imagine if Adobe renamed all their products to have a common word in their name, that's sort of whats happening with .NET

Ryathal
  • 13,486
  • 1
  • 36
  • 48