{"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=\"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 decoding=\"async\" src=\"https:\/\/i0.wp.com\/i.msdn.microsoft.com\/Bb985011.gci2fig06(en-us,MSDN.10).gif?w=640\" alt=\"Screen shot of Garbage Collector Perfmon metrics\" data-recalc-dims=\"1\" \/><\/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=\"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_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4],"tags":[157,292,154,156,155],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKYv-er","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1233,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1233\/","url_meta":{"origin":895,"position":0},"title":"ReverseBytes()","date":"20 Sep 2012","format":false,"excerpt":"In some comments on StackOverflow, Jeroen asked me to post my code for reversing bytes. Rather than posting code into that question\/answer that wasn't directly relevant to the question\/answer, I decided to quickly throw the code up on here. The intent with ReverseBytes() is - as the name says -\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":529,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/529\/","url_meta":{"origin":895,"position":1},"title":"New Delphi Upgrade Policy &#8211; Get in QUICK!","date":"16 Sep 2009","format":false,"excerpt":"If you are using any version of Delphi that is more than 3 versions older than the current version (i.e. Delphi 2005 or older, as of today), the days of upgrading to the latest version will soon be over. I am seriously disheartened by this change in policy. Whether you\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1414,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1414\/","url_meta":{"origin":895,"position":2},"title":"It&#8217;s a Good Time for NZ Delphi Users to Cross-Grade","date":"02 May 2013","format":false,"excerpt":"Having lost our Delphi reseller in NZ last year, and with the Kiwi dollar riding high against the US dollar, now is a good time to make purchases from online stores operating in US currency. RemObjects has such a store and they also have a cross-grade offer for Delphi customers\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":653,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/653\/","url_meta":{"origin":895,"position":3},"title":"RAD Studio &#8220;XE&#8221;","date":"11 Aug 2010","format":false,"excerpt":"News is starting to come out about the upcoming release of Delphi, RAD Studio XE. So what can we expect? Well, based on what has been revealed so far, anyone thinking that the time that has passed since we were supposed to have received 64-bit support has been well spent\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":349,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/349\/","url_meta":{"origin":895,"position":4},"title":"Delphi 2009 &#8211; String Performance","date":"18 Sep 2008","format":false,"excerpt":"NOTE: Downloads are now fixed! Andreas Hausladen generously took the time to make some detailed comments on my previous post, one of which prompted me to throw together some further performance test cases for String types specifically.\u00a0 The results were something of a mixed bag and contained some surprises. The\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/delphi2009-stringperformance-resultscapture.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1430,"url":"https:\/\/www.deltics.co.nz\/blog\/posts\/1430\/","url_meta":{"origin":895,"position":5},"title":"Delphi for iOS Kick Start &#8211; Sorry, It Isn&#8217;t Here","date":"19 Jun 2013","format":false,"excerpt":"I am preparing a post inspired by my recent travels to Ukraine and the United Kingdom, but in the meantime I couldn't help but smile (ok, \"smirk\") when following a link to an Embarcadero page entitled \"Delphi for iOS Kick Start\", that appeared in the DelphiFeeds, um, feed. I have\u2026","rel":"","context":"In &quot;Delphi&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.deltics.co.nz\/blog\/wp-content\/uploads\/It-isnt-here.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.deltics.co.nz\/blog\/wp-json\/wp\/v2\/posts\/895"}],"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}]}}