{"id":895,"date":"2012-06-21T09:30:47","date_gmt":"2012-06-20T21:30:47","guid":{"rendered":"https:\/\/www.deltics.co.nz\/blog\/?p=895"},"modified":"2012-06-21T09:40:56","modified_gmt":"2012-06-20T21:40:56","slug":"using-history-to-make-sense-of-the-present","status":"publish","type":"post","link":"https:\/\/www.deltics.co.nz\/blog\/posts\/895\/","title":{"rendered":"Using History to Make Sense of the Present"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span><p><a href=\"http:\/\/wiert.me\/2012\/06\/20\/strong-name-for-interop-scripting-net-framework\/\" target=\"_blank\">In a recent post on interop in .NET framework, Jeroen Pluimers wrote<\/a> &#8220;I don\u2019t see COM as the first class citizen it was in the VB6 era.&#8221;<\/p>\n<p>I always find it funny when the .NET camp start poo-pooing COM and dismissing it as yesterdays technology that some people just can&#8217;t seem to let go of (apologies to Jeroen if this was not his intention in this case).<br \/>\n<!--more--><br \/>\nI find it funny because .NET is essentially COM+.<\/p>\n<p>Not the COM+ that was released\/delivered as such, but what COM+ was <em>supposed<\/em> to be, according to a white-paper about COM+ that mysteriously disappeared before COM+ arrived in the form that it eventually did.<\/p>\n<p>That white-paper talked about a lot of things that never made it into the COM+ delivery.  Common type system, common language runtime etc.  Some of the components in .NET were even delivered initially with the COM+ origins writ large in their identity, as shown in a screenshot of the Garbage Collector metrics available in PerfMon in <a href=\"http:\/\/msdn.microsoft.com\/en-us\/magazine\/bb985011.aspx\" target=\"_blank\">this article from the early times of .NET framework<\/a>:<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/i.msdn.microsoft.com\/Bb985011.gci2fig06%28en-us%2CMSDN.10%29.gif?w=640\" alt=\"Screen shot of Garbage Collector Perfmon metrics\" \/><\/p>\n<p>Garbage Collection is a strictly &#8220;.NET era&#8221; technology.  COM+ as released didn&#8217;t have a GC.  Yet in early .NET days the GC was listed as a &#8220;COM+ Memory&#8221; metric.<\/p>\n<p>The exact same metric nowadays is listed under &#8220;.NET CLR Memory&#8221; .<\/p>\n<p>Perhaps this will clear up the confusion and help explain why COM never went away, and indeed never could have.<\/p>\n<h3>Not Only, But Also<\/h3>\n<p>But how does this help us understand the Brave New World we find ourselves facing in Windows 8 ?<\/p>\n<p>Well, I would suggest that talking about COM being a &#8220;first class citizen&#8221; in .NET is using a C calling convention when Pascal is required.  That is, the arguments are in the wrong order.  Indeed, one of the arguments isn&#8217;t even of the write type (that&#8217;s what you get for using a weakly typed language!) \ud83d\ude42<\/p>\n<p>The real question is whether the .NET runtime environment (and\/or COM) is a &#8220;first class citizen&#8221; in the <em>operating system<\/em>.<\/p>\n<p>COM is primarily nothing more than a specification, not a runtime, and Win32 implements that specification.  Although lots of services are provided using COM (and expected of a COM component if it is to interoperate with other COM services nicely) and additional services implemented in compliance with the COM specification to build &#8220;macro services&#8221; that provide additional facilities that apps may take advantage of, a COM compliant application doesn&#8217;t need anything to exist in and of itself other than the core OS and to implement COM according to the spec.<\/p>\n<p>Unlike .NET which is not just a specification but also a runtime environment, requiring a huge amount of scaffolding just to be able to initiate and launch even the simplest of apps.<\/p>\n<p>Windows &#8211; even in Windows 8, <a href=\"http:\/\/www.bitcrazed.com\/post\/2012\/01\/27\/An-Accurate-Windows-8-Platform-Architecture-Diagram.aspx\" target=\"_blank\">despite the myths that the marketecture diagrams try to create<\/a> &#8211; is still &#8211; at it&#8217;s core &#8211; an unmanaged, COM compliant OS.<\/p>\n<p>It just happens to be provided with, and host, a .NET runtime which sits atop Win32 in exactly the same way that the Flash and Java runtimes are hosted environments on that same core OS.<\/p>\n<p>It even hosts another new runtime called <a href=\"http:\/\/stackoverflow.com\/questions\/7416826\/how-does-the-new-windows-8-runtime-winrt-compare-to-silverlight-and-wpf\" target=\"_blank\">WinRT, which itself is an entirely new thing that takes a lot of ideas from .NET but which fundamentally builds on &#8230; yep, <strong><em>COM<\/em><\/strong><\/a>.<\/p>\n<h3>The Brave New World<\/h3>\n<p>So where does this leave us with the question of citizenship ?<\/p>\n<p>Well, I would say that COM isn&#8217;t a &#8220;first class citizen&#8221;.  It is far more than that (and yet also far less).<\/p>\n<p>But I wouldn&#8217;t even say it is The President.<\/p>\n<p>It is the Bill of Rights, where Win32 is the Constitution.<\/p>\n<p>WinRT is a rewrite of the Constitution, but it is also a New Republic.  A self-declared independent city state &#8211; <strong>Metro<\/strong>.  Beyond the city limits, in <strong>The United States of Desktop<\/strong> the old Constitution continues to apply.<\/p>\n<p>The City Republic of Metro and The Desktop States may have different constitutions (the one for Metro is much simpler &#8211; city states are much easier to govern than vast and diverse nations), but they share the same Bill of Rights.  COM.<\/p>\n<p>\ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">[Estimated Reading Time: <\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">minutes]<\/span><\/span>In a recent post on interop in .NET framework, Jeroen Pluimers wrote &#8220;I don\u2019t see COM as the first class citizen it was in the VB6 era.&#8221; I always find it funny when the .NET camp start poo-pooing COM and dismissing it as yesterdays technology that some people just can&#8217;t seem to let go of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4],"tags":[157,292,154,156,155],"class_list":["post-895","post","type-post","status-publish","format-standard","hentry","category-delphi","tag-com","tag-delphi","tag-metro","tag-windows-8","tag-winrt"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-er","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=895"}],"version-history":[{"count":3,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/895\/revisions"}],"predecessor-version":[{"id":898,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/895\/revisions\/898"}],"wp:attachment":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}