{"id":1975,"date":"2009-11-23T11:17:53","date_gmt":"2009-11-23T10:17:53","guid":{"rendered":"http:\/\/www.itwriting.com\/blog\/1975-com-automation-in-silverlight-4-is-not-an-edge-case.html"},"modified":"2009-11-23T11:17:53","modified_gmt":"2009-11-23T10:17:53","slug":"com-automation-in-silverlight-4-is-not-an-edge-case","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/1975-com-automation-in-silverlight-4-is-not-an-edge-case.html","title":{"rendered":"COM automation in Silverlight 4 is not an \u201cedge case\u201d"},"content":{"rendered":"<p>I wrote a <a href=\"http:\/\/www.theregister.co.uk\/2009\/11\/20\/silverlight_4_windows_bias\/\" target=\"_blank\">piece for The Register<\/a> about the arrival of Windows-specific features in Silverlight, which attracted some comments both on the Reg and also on <a href=\"http:\/\/tech.slashdot.org\/story\/09\/11\/20\/2314220\/New-Microsoft-Silverlight-Features-Have-Windows-Bias\" target=\"_blank\">Slashdot<\/a>. Plenty of people said it was just what they expected from Microsoft, some of them misunderstanding the point that this only applies to out-of-browser applications that are trusted: the user has to pass a dialog box granting the application permission to access the local system. A few defended Microsoft\u2019s decision; and <a href=\"http:\/\/tech.slashdot.org\/comments.pl?sid=1452248&amp;cid=30180342\" target=\"_blank\">this Slashdot comment<\/a> on COM automation in Silverlight 4 strikes me as a good encapsulation of the official line:<\/p>\n<blockquote>\n<p>This is a fairly obscure feature, and I&#8217;m fairly surprised that it was included at all, but doubt it&#8217;ll be of use to the vast majority of current and future Silverlight developers out there. Like the html control, it&#8217;s a crutch, to allow developers that want to use Silverlight a way to leverage existing investments. The mantra I&#8217;ve heard out of the Silverlight team is to focus on unblocking customer scenarios (scenarios they cannot unblock themselves) without compromising the overall feature goals (like keeping the runtime download small) &#8230; it&#8217;s an edge case feature that doesn&#8217;t affect Silverlight&#8217;s over all &quot;Cross-Platforminess&quot;.<\/p>\n<\/blockquote>\n<p>The idea that COM automation is merely an \u201cedge case\u201d surprises me, even though I also recall it being described like that at PDC. Access to COM automation gives a Silverlight desktop application on Windows substantial extra capability. At PDC program manager Joe Stegman <a href=\"http:\/\/blogs.msdn.com\/jstegman\/archive\/2009\/11\/19\/trustedapp-sample-from-pdc-2009.aspx\" target=\"_blank\">showed<\/a> how Silverlight 4 can integrate with Office, sending data into an Excel spreadsheet: an example with obvious value for real applications. I also heard developers at PDC discussing how they might wrap up a Silverlight application with a COM DLL, creating an application which in effect has full access to the local operating system. Although Silverlight cannot access the Windows API directly, there are no such restrictions on the COM DLL, so the combination means that pretty much anything is possible.<\/p>\n<p>Let\u2019s also bear in mind that Microsoft\u2019s Brad Becker is on record saying that one day WPF and Silverlight might simply become different .NET profiles. He <a href=\"http:\/\/www.itwriting.com\/blog\/1297-mix09-day-one-silverlight-30-is-launched.html\" target=\"_blank\">told me this<\/a> at Mix earlier this year; and said a similar thing to <a href=\"http:\/\/blogs.zdnet.com\/microsoft\/?p=4627\" target=\"_blank\">Mary Jo Foley at PDC<\/a>:<\/p>\n<blockquote>\n<p>Some day \u2014 Microsoft won\u2019t say exactly when \u2014 Silverlight and WPF are going to merge into one Web programming and app delivery model that, most likely, will be known as Silverlight, Brad Becker, Director of Product Management for Microsoft\u2019s Rich Client Platforms, told me this week<\/p>\n<\/blockquote>\n<p>If Microsoft is contemplating such a thing, then clearly full access to the native features of Windows will have to be possible.<\/p>\n<p>I am not entirely negative about this prospect. Even if you are only targeting Windows, Silverlight has a lot to commend it: a small runtime, easy setup, and options for browser-hosted or desktop deployment. If you have ever <a href=\"http:\/\/www.itwriting.com\/msiwrestle.php\" target=\"_blank\">wrestled with the Windows installer<\/a> or tackled a failed .NET runtime installation you will like the simplicity of running a Silverlight application.<\/p>\n<p>Nevertheless, with version 4.0 Microsoft is changing its Silverlight story. It is no longer a pure cross-platform play; rather, it is a runtime where some features are cross-platform, and others Windows only. Microsoft calls this developer choice; I see it as evolving into the inverse of Sun\u2019s aim with Java. Sun tried strenuously to guide developers towards cross-platform, but provided a way out &#8211; via Java Native Interface \u2013 if absolutely necessary. Microsoft will provide cross-platform where we really need it, but make it easy to slip into Windows-only development in order to get some nice feature like a location API, or Office integration.<\/p>\n<p>I see this as an advantage for Flash, because developers know that Adobe has no incentive to prefer one operating system over another \u2013 except to the extent that minority platforms (like desktop Linux) tend to receive less investment.<\/p>\n<p>Personally I think Microsoft should at least provide a way for Mac users to get similar benefits \u2013 perhaps by implementing something like the native process API in <a href=\"http:\/\/labs.adobe.com\/technologies\/air2\/\" target=\"_blank\">Adobe AIR 2<\/a>.<\/p>\n<p>I also think Microsoft will have to get real about Linux support. It is wrong that Microsoft will cheerfully state:<\/p>\n<blockquote>\n<p>Silverlight 4 runs across all platforms and major browsers<\/p>\n<\/blockquote>\n<p>as it does in the \u201cFact sheet\u201d handed out at PDC; while leaving Linux implementation to a third-party process uncertain in both features and timing. Here is the reality of cross-platform Silverlight, in a screenshot taken seconds ago from Linux:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.itwriting.com\/images\/silverlight-linux.gif\" \/><\/p>\n<p>Right now it is a two-platform play \u2013 admittedly, the two platforms that matter most, especially in a Western world business context, but never forget that Google <a href=\"http:\/\/googleblog.blogspot.com\/2009\/07\/introducing-google-chrome-os.html\" target=\"_blank\">Chrome OS<\/a> is coming.<\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:33b24638-b6f2-4f4b-9431-6a27276f5f92\" class=\"wlWriterEditableSmartContent\">Technorati Tags: <a href=\"http:\/\/technorati.com\/tags\/silverlight\" rel=\"tag\">silverlight<\/a>,<a href=\"http:\/\/technorati.com\/tags\/microsoft\" rel=\"tag\">microsoft<\/a>,<a href=\"http:\/\/technorati.com\/tags\/adobe\" rel=\"tag\">adobe<\/a>,<a href=\"http:\/\/technorati.com\/tags\/adobe+air\" rel=\"tag\">adobe air<\/a>,<a href=\"http:\/\/technorati.com\/tags\/cross-platform\" rel=\"tag\">cross-platform<\/a>,<a href=\"http:\/\/technorati.com\/tags\/.net\" rel=\"tag\">.net<\/a>,<a href=\"http:\/\/technorati.com\/tags\/java\" rel=\"tag\">java<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I wrote a piece for The Register about the arrival of Windows-specific features in Silverlight, which attracted some comments both on the Reg and also on Slashdot. Plenty of people said it was just what they expected from Microsoft, some of them misunderstanding the point that this only applies to out-of-browser applications that are trusted: &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/1975-com-automation-in-silverlight-4-is-not-an-edge-case.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">COM automation in Silverlight 4 is not an \u201cedge case\u201d<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,36,49,55,80,85,96],"tags":[],"class_list":["post-1975","post","type-post","status-publish","format-standard","hentry","category-net","category-google","category-java","category-microsoft","category-software-development","category-sun","category-web-authoring"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/1975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=1975"}],"version-history":[{"count":0,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/1975\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=1975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=1975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=1975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}