Tag Archives: silverlight

Microsoft sets Visual Studio LightSwitch to off

Microsoft has officially announced the end of development of LightSwitch, a rapid application builder for desktop and mobile applications.

LightSwitch was introduced in July 2011 as a tool to build multi-tier applications using a data-first approach. You can design you database using an excellent visual designer, design screens for viewing and editing the data using a non-visual designer, and generate applications with the server-side code hosted either on your own server or on Microsoft Azure. The client application in the original LightSwitch was based on Silverlight, but this was later extended with an option for HTML. You can get a feel for the general approach from my early hands-on here.

As I noted at the time, LightSwitch abstracts a number of difficult tasks. This is a good thing, though as with any application generated you had to take time to learn its quirks. That said, it is more usable than most model-driven development tools, in my experience.

LightSwitch had some bad luck. It was conceived at a time when Silverlight looked like the future of Microsoft’s client development platform, but by the time it launched Silverlight was heading for obsolescence. It also fell victim to ideologies within Microsoft (which persist today) that chase the dream of code-free application development that anyone can do. The documentation for LightSwitch on launch was dreadful, a series of how-tos that neglected to explain how the tool worked. You had to get the software development kit, aimed at those building LightSwitch components, to have any hope of understanding the tool.

image

The abandonment of LightSwitch is not a surprise. Microsoft had stopped talking about it and adoption was poor. There will be no tooling for it in the next Visual Studio, though you can keep using it for a while if you want.

I think it is a shame since it is a promising tool and I cannot help thinking that with more intelligent positioning and a few tweaks to the product and its documentation it could have been a success. Those who did get to grips with it found it very good.

What is unfortunate is that Microsoft has lost the faith of many developers thanks to the many shifts in its development strategy. I know component vendors have also been caught out by the Silverlight and then LightSwitch debacle. Here is one of the comments on the announcement:

Microsoft keeps doing this over and over, we invest months even years to master a technology, just to find out it’s being phased out prematurely. Perfectly good, one-of-a-kind niche tools too. So much investment on both sides (both MS and customers) down the drain. What’s worse, it is done is a non-transparent, dishonest manner, letting things dry up over a couple years so that when the announcement comes, no-one really cares any more, no more noise – just look at this blog.

This makes it hard for the company to convince developers that its new strategies de jour have a longer life ahead of them. I am thinking of the UWP (Universal Windows Platform), which has already changed substantially since its first conception, and of PowerApps, the supposed replacement for LightSwitch, and yet another attempt to promote code-free development.

Developers do not want code-free development. They like tools that do stuff for them, if they are intuitive and transparent, but they also like an easy route to adding and modifying code in order to have the application work the way they want.

Miguel de Icaza: don’t blame Google for Microsoft’s contempt for developers

Xamarin’s Miguel de Icaza (founder of the Mono project) has complained on Twitter about Microsoft’s Windows Division’s “contempt for developers” when it created the Windows Runtime and a “4th incompatible Xaml stack”, in a conversation prompted by the company’s spat with Google over the YouTube app for Windows Phone. Google wants this removed because it does not show YouTube ads, to which Microsoft counters that the API for showing these ads is not available.

image 

I am more interested in his general reflections on the wisdom (or lack of it) shown by Microsoft in creating a new platform for touch-friendly apps in Windows 8, that lacks compatibility with previous Windows frameworks. “No developer wants to build apps twice for Windows: one for desktop, one for winstore” he also remarked.

The four XAML stacks are Windows Presentation Foundation, Silverlight (for which de Icaza created a version for Linux called Moonlight), Windows Phone (which runs a slightly different version of Silverlight), and now the Windows Runtime.

Could Microsoft have done this differently, without compromising the goal of creating a new tablet personality for Windows rather than continue with doomed attempts to make the desktop touch-friendly?

The obvious answer is that it could have used more of Silverlight, which had already been adapted to a touch environment for Windows Phone. On the other hand, the Windows division was keen to support native code and HTML/JavaScript as equally capable options for Windows Runtime development. In practice, I have heard developers remark that HTML/JavaScript is better than C#/XAML for the new platform.

It is worth noting that the Windows Runtime stack is by no means entirely incompatible with what has gone before. It still uses the Windows API, although parts are not available for security reasons, and for non-visual code much of the .NET Framework works as before.

Microsoft Silverlight: shattered into a million broken urls

There has been some Twitter chatter about the closure of silverlight.net, Microsoft’s official site for its lightweight .NET client platform. multimedia player and browser plug-in.

image

I am not sure when it happened, but it is true. Silverlight.net now redirects to a page on MSDN. Some but not all of the content has been migrated to MSDN, but Microsoft has not bothered to redirect the URLs, so most of the links out there to resources and discussions on Silverlight will dump you to the aforementioned generic page.

One of the things this demonstrates is how short-sighted it is to create these mini-sites with their own top-level domain. It illustrates how fractured Microsoft is, with individual teams doing their own thing regardless. Microsoft has dozens of these sites, such as windowsazure.com, windowsphone.com, asp.net, and so on; there is little consistency of style, and when someone decides to fold one of these back to the main site, all the links die.

What about Silverlight though? It was always going to be a struggle against Flash, but Silverlight was a great technical achievement and I see it as client-side .NET done right, lightweight, secure, and powerful. It is easy to find flaws. Microsoft should have retained the cross-platform vision it started with; it should have worked wholeheartedly with the Mono team for Linux-based platforms; it should have retained parity between Windows and Mac; it should never have compromised Silverlight with the COM support that arrived in Silverlight 4.

The reasons for the absence of Silverlight in the Windows Runtime on Windows 8, and in both Metro and desktop environments in Windows RT, are likely political. The ability to run Silverlight apps on Surface RT would enhance the platform, and if COM support were removed, without compromising security.

XAML and .NET in the Windows Runtime is akin to Silverlight, but with enough differences to make porting difficult. There is an argument that supporting Silverlight there would confuse matters, though since Silverlight is still the development platform for Windows Phone 8 it is already confusing. Silverlight is a mature platform and if Microsoft had supported it in the Windows Runtime, we would have had a better set of apps at launch as well as more developer engagement.

I posted that Microsoft’s Silverlight dream is over in October 2010, during Microsoft’s final Professional Developers Conference, which is when the end of Silverlight became obvious. It lives on in Windows Phone, but I would guess that Windows Phone 8.5 or 9.0 will deprecate Silverlight in favour of the Windows Runtime. A shame, though of course it will be supported on the x86 Windows desktop and in x86 Internet Explorer for years to come.

Infragistics building cross-platform development strategy on XAML says CEO

I spoke to Dean Guida, CEO at Infragistics, maker of components for Windows, web and mobile development platforms. Windows developers with long memories will remember Sheridan software, who created products including Data Widgets and VBAssist. Infragistics was formed in 2000 when Sheridan merged with another company, ProtoView.

In other words, this is a company with roots in the Microsoft developer platform, though for a few years now it has been madly diversifying in order to survive in the new world of mobile. Guida particularly wanted to talk about IgniteUI, a set of JQuery controls which developers use either for web applications or for mobile web applications wrapped as native with PhoneGap/Cordova.

“The majority of the market is looking at doing hybrid apps because it is so expensive to do native,” Guida told me.

Infragistics has also moved into the business iOS market, with SharePlus for SharePoint access on an iPad, and ReportPlus for reporting from SQL Server or SharePoint to iPad clients. Infragistics is building on what appears to be a growing trend: businesses which run Microsoft on the server, but are buying in iPads as mobile clients.

image

Other products include Nuclios, a set of native iOS components for developers, and IguanaUI for Android.

I asked Guida how the new mobile markets compared to the traditional Windows platform, for Infragistics as a component vendor.

“The whole market’s in transition,” he says. “People are looking at mobility strategy and how to support BYOD [Bring Your Own Device], all these different platforms, and a lot of our conversations are around IgniteUI. We need to reach the iPad, and more than the iPad as well.”

“There’s still a huge market doing ASP.NET, Windows Forms, WPF. It’s still a bigger market, but the next phase is around mobility.”

What about Windows 8, does he think Microsoft has got it right? Guida’s first reaction to my question is to state that the traditional Windows platform is by no means dead. “[Microsoft] may have shifted the focus away from Silverlight and WPF, but the enterprise hasn’t, in terms of WPF. The enterprise has not shifted aware from WPF. We’ve brought some of our enterprise customers to Microsoft to show them that, some of the largest banks in the world, the insurance industry, the retail industry. These companies are making a multi-year investment decision on WPF, where the life of the application if 5 years plus.

“Silverlight, nobody was really happy about that, but Microsoft made that decision. We’re going to continue to support Silverlight, because it makes sense for us. We have a codebase of XAML that covers both WPF and Silverlight.”

Guida adds that Windows 8 and Windows Phone 8 are “great innovation”, mentioning features like Live Tiles and people hub social media aggregation, which has application in business as well. “They’re against a lot of headwind of momentum and popularity, but because Microsoft is such an enterprise company, they are going to be successful.”

How well does the XAML in Infragistics components, built for WPF and Silverlight, translate to XAML on the Windows Runtime, for Windows 8 store apps?

“It translates well now, it did not translate well in the beginning,” Guida says, referring to the early previews. “We’re moving hundreds of our HTML and XAML components to WinJS and WinRT XAML. We’re able to reuse our code. We have to do more work with touch, and we want to maintain performance. We’re in beta now with a handful of components, but we’ll get up to 100s of components available.”

It turns out that XAML is critical to the Infragistics development strategy for iOS as well as Windows. “We wrote a translator that translates XAML code to iOS and XAML code to HTML and JavaScript. We can code in XAML, add new features, fix bugs, and then it moves over to these other platforms. It’s helped us move as quickly as we’ve moved.”

What about Windows on ARM, as in Surface RT? “We fully support it,” says Guida, though “with a straight port, you lose performance. That’s what we’re working on.”

Microsoft’s Scott Guthrie on what has happened to Silverlight

I spoke to Microsoft’s Scott Guthrie last week, during his trip to the UK for a couple of Windows Azure events in Cambridge and London.

Guthrie is now Corporate VP Windows Azure Application Platform, a job he took up in May 2011. Before that he worked on .NET technologies including Silverlight, and I asked if he had any reflections on the subject. He was scrupulously tactful.

“In terms of looking at our XAML stack right now, if you look at some of the announcements we’ve made in terms of Windows 8, Metro, Surface, tablets and desktops, and Windows Phone, XAML is alive and well and being used for more things than ever.

“Silverlight 5 shipped after I moved on to Azure. We did an update to Silverlight 5 about a month ago. For XAML developers, and developers using Silverlight or WPF XAML technologies, there is a long roadmap ahead.”

He seemed to me to be saying that even if Silverlight is dead (nobody expects a Silverlight 6), XAML lives on.

I observed that in the new (and much improved) Windows Azure admin portal, the Silverlight UI has gone, replaced by an HTML 5 user interface.

“It’s actually HTML, it’s not HTML 5. It works with non HTML 5 browsers as well.“ he said. “That was less of a technology statement, it was more that, historically Azure had 5 or 6 admin tools that were fairly disjoint. One of the decisions we made as part of the new Azure that we’re building was, let’s have a single admin tool framework that connected everything. We decided to do it with HTML, partly because we did want to get reach on tablets like iPads and Android devices.

“It was less a technology statement, it was more that we wanted a single admin tool, and we decided to go with an HTML-based approach. We still use Silverlight for some of our admin experiences like database management tools, and for streaming and other capabilities.”

It is true that Silverlight remains in the Azure database design tool, if you use the portal. It is also used extensively in System Center 2012 – yes, I have actually installed it – and in Windows InTune.

It is as if, back in 2009 and early 2010, the memo went out: use Silverlight for everything. Then, later in 2010, the memo went out: use HTML for everything; but too late for the current generation of server admin products.

Microsoft has announced that Visual Studio LightSwitch, which generates Silverlight applications, is being revised to offer HTML applications as well. I expect this process of Silverlight removal and de-emphasis to continue over the next couple of years. Note that Microsoft’s own Windows RT does not support Silverlight (as far as I am aware), nor does Windows 8 on the Metro side.

Why Microsoft is scrapping the MIX conference

Microsoft is scrapping its MIX conference, according to General Manager Tim O’Brien:

we have decided to merge MIX, our spring web conference for developers and designers, into our next major developer conference, which we will host sometime in the coming year. I know a number of folks were wondering about MIX, given the time of year, so we wanted to make sure there’s no ambiguity, and be very clear… there will be no MIX 2012.

O’Brien says that MIX started in the aftermath of the 2005 PDC because:

there was a lot of discussion around our engagement with the web community, and how we needed a more focused effort around our upcoming plans for Internet Explorer, the roadmap for our web platform, the work we were starting on web standards (we were shipping IE6 at the time), and so on.

That is not quite how I recall it. PDC 2005 was the pre-Vista PDC, no, not the “three pillars of Longhorn” in PDC 2003, but the diluted version of Longhorn that was actually delivered as Windows Vista. One thing Microsoft really did get around this time was that design mattered. Apple had cool design, Adobe had cool design (and a strong grip on the designer community), but Microsoft did not.

Windows Presentation Foundation (WPF) was intended to win designers to the Windows platform, with its graphically-rich and multimedia-friendly API. In order to do this, the company needed to win designers over to the idea of using Expression Blend rather than Adobe Flash and Photoshop.

This was doubly true when Microsoft decided to bring WPF to the browser in the form of Silverlight, a decision that was announced at PDC 2005 and expanded on at the first MIX in 2006.

One of the things I recall at the first and second MIX events were groups of bemused Flash designers who had been bussed in by Microsoft to enjoy the lights of Vegas and learn about Blend.

General web authoring was a factor as well, as Microsoft sought to bring Internet Explorer back on track and to persuade web designers of the virtues of Microsoft’s web platform.

I enjoyed the MIX events. They were small enough that you could easily get to speak both to attendees and to the Microsoft folk there, and once you allow for the fact that Vegas is Vegas, the atmosphere was good.

As an attempt to appeal to designers though, MIX was a failure. It was all too forced; many of the people attending were developers anyway; and Microsoft itself included more and more developer content in ensuing MIX events.

The 2010 MIX was hijacked by Windows Phone 7, an interesting topic but drifting far from the original intentions.

It comes as no surprise to hear than MIX is no more. It is associated with WPF and Silverlight, neither of which are now strategic for Microsoft in these days of Windows 8 and the Windows Runtime (WinRT).

That said, Microsoft still has difficulty appealing to designers.

What next then? O’Brien says:

we look ahead to 2012 and beyond, the goal is to ensure that global Microsoft developer events are of the caliber that many of you experienced at BUILD last September, in addition to the thousands of online and local developer events we host around the world to support communities and connect directly with developers. We will share more details of our next developer event later this year.

image

Silverlight 5 is done. Is Silverlight also done?

Microsoft has has announced the release of Silverlight 5.0.

image

Silverlight is a cross-platform, cross-browser plug-in for Windows and Mac. It is relatively small size – less than 7MB according to Microsoft, though the Mac version seems to be bigger, with a 14MB compressed setup .dmg and apparently over 100MB once installed:

image

Never mind, it is a fine piece of work and has considerable capabilities, including the .NET Framework, the ability to render a GUI defined in XAML, multimedia playback, and support for applications running inside the browser or on the desktop. New in version 5 is better H.264 performance, 3D graphics, and Platform Invoke support on Windows enabling trusted applications to call the native API. Another change is that in-browser applications can also run with full trust, again only on Windows. The cross-platform idea has become increasingly diluted.

If Microsoft had come up with Silverlight early in the .NET story it might have become a major application platform. As it is, while still useful in some contexts, the technology has been side-lined by new things including HTML 5 and the Windows Runtime in the forthcoming Windows 8.

While I have huge respect for the team which created Silverlight and rapidly improved it, it now looks a sad story of reactive technology that failed to capture sufficient developer support. Microsoft invented Silverlight when Adobe Flash looked like it might take over as a universal runtime for web applications. The outcome was that Adobe evolved Flash with renewed vigour, keeping Silverlight at bay. Then Apple invented a new platform called iOS that supported neither Flash nor Silverlight, and the whole plug-in strategy began to look less compelling. Adobe has now reduced its focus on Flash, while Microsoft has been signalling a reduced role for Silverlight since its Professional Developers Conference in October 2010.

The question now is whether there will ever be a Silverlight 6.

Microsoft itself uses Silverlight across a number of products, such as administrative consoles for various server applications. Silverlight will be around for a while yet. Of course it is also the runtime for Windows Phone 7. Visual Studio LightSwitch generates Silverlight applications, and this one I am rather sad about, because it is an interesting tool that now seems to target the wrong platform. Perhaps the team will create an HTML 5 version one day.

Reflections on Microsoft BUILD 2011

I’m just back from Microsoft’s BUILD conference at Anaheim in California, which lived up to the hype as a key moment of transition for the company. Some said it was the most significant PDC – yes, it was really the Professional Developers Conference renamed – since 2000, when .NET was introduced; some said the most significant ever.

image

“Significant” does not necessarily mean successful, and history will judge whether BUILD 2011 was a new dawn or the beginning of the end for Windows. Nevertheless, I have not heard so much cheering and whooping at a Microsoft conference for a while, and although I am no fan of cheering and whooping I recognise that there was genuine enthusiasm there for the new direction that was unveiled.

So what happened? First, let me mention the Windows Server 8 preview, which looks a solid upgrade to Server 2008 with a hugely improved Hyper-V virtualisation and lots of changes in storage, in IIS, networking, in data de-duplication, in modularisation (enabling seamless transition between Server Core and full Server) and in management, with the ascent of PowerShell scripting and recognition that logging onto a GUI on the server itself is poor practice.

The server team are not suffering the same angst as the client team in terms of direction, though the company has some tricky positioning to do with respect to Azure (platform) and Server 8 (infrastructure) cloud computing, and how much Microsoft hosts in its own datacentres and how much it leaves to partners.

What about Windows client? This is the interesting one, and you can almost hear the discussions among Microsoft execs that led them to create the Windows Runtime and Metro-style apps. There is the Apple iPad; there is cloud; there are smartphones; and Windows looks increasingly like a big, ponderous, legacy operating system with its dependence on keyboard and mouse (or stylus), security issues, and role as a fat client when the industry is moving slowly towards a cloud-plus-device model.

At the same time Windows and Office form a legacy that Microsoft cannot abandon, deeply embedded in the business world and the source of most of the company’s profits. The stage is set for slow decline, though if nothing else BUILD demonstrates that Microsoft is aware of this and making its move to escape that fate.

Its answer is a new platform based on the touch-friendly Metro UI derived from Windows Phone 7, and a new high-performance native code runtime, called Windows Runtime or WinRT. Forget Silverlight or WPF (Windows Presentation Foundation); this is a new platform in which .NET is optional, and which is friendly to all of C#, C/C++, and HTML5/JavaScript. That said, WinRT is a locked-down platform which puts safety and lock-in to Microsoft’s forthcoming Windows Store ahead of developer freedom, especially (and I am speculating a little) in the ARM configuration of which we heard little at BUILD.

BUILD attendees were given a high-end Samsung tablet with Windows 8 pre-installed, and in general the Metro-style UI was a delight, responsive and easy to use, and with some fun example apps, though many of the apps that will come as standard were missing and there was evidence of pre-beta roughness and instability in places.

The client strategy seems to me to look like this:

Windows desktop will trundle on, with a few improvements in areas like boot time, client Hyper-V, and the impressive Windows To Go that runs Windows from a bootable and bitlocker-encrypted USB stick leaving no footprint on the PC itself. Many Windows 8 users will spend all their time in the desktop, and I suspect Microsoft will be under pressure to allow users to stick with the old Start menu if they have no desire or need to see the new Metro-style side of Windows..

A new breed of Intel tablets and touch-screen notebooks will make great devices towards the high end of mobile computing. This is something I look forward to taking with me when I need to work on the road: Metro-style apps for when you are squashed in an aeroplane seat, browsing the web or checking a map, but full Windows only a tap away. These will be useful but slightly odd hybrids, and will tend to be expensive, especially as you will want a keyboard and stylus or trackpad for working in desktop Windows. They will not compete effectively with the iPad or Android tablets, being heavier, with shorter battery life, more expensive and less secure. They may compete well with Mac notebooks, depending on how much value Metro adds for business users mainly focused on desktop applications.

Windows on ARM, which will be mainly for Metro-style apps and priced to compete with other media tablets. This is where Microsoft is being vague, but we definitely heard at BUILD that only Metro-style apps will be available from the Windows Store for ARM, and even hints that there may be no way to install desktop apps. I suspect that Microsoft would like to get rid of desktop Windows on ARM, but that it will be too difficult to achieve that in the first iteration. One unknown factor is Office. It is obvious that Microsoft cannot rework full Office for Metro by this time next year; yet offering desktop Office will be uncomfortable and (knowing Microsoft) expensive on a lightweight, Metro-centric ARM device. Equally, not offering Office might be perceived as throwing away a key advantage of Windows.

Either way, Windows on ARM looks like Microsoft’s iPad competitor, safe, cloud-oriented, inexpensive, long battery life, and lots of fun and delightful apps, if developers rush to the platform in the way Microsoft hopes.

There are several risks for Microsoft here. OEM partners may cheapen the user experience with design flaws and low-quality add-ons. Developers may prove reluctant to invest in an unproven new platform. It may be hard to get the price down low enough, bearing in mind Apple’s advantage with enormous volume purchasing of components for iPad.

Still, one clever aspect of Microsoft’s strategy is that everyone with Windows 8 will have Metro, which means there will be a large installed base even if many of those users only really want desktop Windows.

I also wonder if this is an opportunity for Nokia, to use its hardware expertise to deliver excellent devices for Windows on ARM.

Finally, let me mention a few other BUILD highlights. Anders Hejlsberg spoke on C# and VB futures (though I note that there were few VB developers at BUILD) and I was impressed both by the new asynchronous programming support and the forthcoming compiler API which will enable some amazing new capabilities.

I also enjoyed Don Syme’s session on F#, where he focused on programming information rather than mere algorithms, and showed how the language can query internet data sources with IntelliSense and code hints in the IDE, inferred from schemas retrieved dynamically. You really need to watch his session to understand what this means.

In the end this was a great conference, with an abundance of innovation and though-provoking technology. In saying that, I do not mean to understate the challenges this huge company still faces.

A few facts about Microsoft’s new Windows Runtime

I’ve just come out of Martyn Lovell’s talk on WinRT internals here at BUILD in Anaheim, California.

Make no mistake: Microsoft has re-invented the Windows API in WinRT. Just to recap, WinRT is the API for Metro-style applications, the touch-centric, app-centric API for tablets and, one presumes, eventually for Windows Phone (though Microsoft has yet to admit it).

WinRT is only useable from Metro applications. You cannot call WinRT from a Win32 application, nor vice versa*. I think it is reasonable to assume that a future version of Windows which runs only WinRT is a possibility; and that Windows 8 on ARM will look a bit like that even though Win32 will still be there, but mainly out of sight; but I am speculating.

Does that mean Win32 is now legacy? In a way, but such a huge legacy that for the moment we should think of Windows 8 as two platforms side by side.

There is no inter-app communication in WinRT other than by the pre-defined contracts built into the system (though Lovell noted that you could always use the file system and polling for a crude inter-process communication).

There is no way to install a shared dynamic library. Apps can only use the system libraries together with what you install with the app. Each app lives in its own context and is isolated. In other words, WinRT is not extensible, other than within your app’s code*.

If you figure out a way to bypass limitations of WinRT by calling other Windows APIs, your app might work but the submission process for the Windows Store will prohibit it.

Versioning is built into WinRT. This means that when Windows 9 comes along, you will be able to code just against the Windows 8 versions of the classes, for compatibility, and your IDE can support this by only exposing the Windows 8 version of the API.

The CLR exists in the Metro environment, for use by .NET applications, complete with JIT (Just in time) compilation. However only a subset of the .NET Framework libraries are included. Microsoft aimed to include only what was necessary for Metro. I am not sure yet what is included and what is not, beyond the obvious (no Windows Forms, for example) but will be investigating what is documented. The native WinRT APIs look similar to a COM callable wrapper from the .NET side. That said, you do not normally need to care about WinRT interfaces, even though these are there in WinRT. Normally you interact with WinRT classes, making it more natural for .NET than working with COM.

WinRT is full of asynchronous calls. Lovell told us that Microsoft had seen in the past that if both synchronous and asynchronous APIs are available for the same function, then developers often use the synchronous version even when they should not, making applications less responsive. The new await keyword in C# makes this easy to code.

WinRT makes use of the ILDasm metadata format which is also used by .NET. This means you get rich metadata for IntelliSense and debugging, but note that the actual runtime is not .NET; they just borrowed the same metadata format.

WinRT objects are reference counted like COM for memory management, with weak references to avoid circularity. You should not have to worry about this; you can code according to the conventions of your language.

There are three ways to write WinRT applications. One is C++, in which case you write directly to the “projection” of WinRT into your language. The second is .NET, in which case your code goes via the CLR. The third is HTML and JavaScript, in which case your code goes via the “Chakra” JavaScript engine also used by Internet Explorer 9 and higher. Lovell assured me that there is little difference in performance in most cases, though there could be advantages for C++ in certain niche scenarios. Of course we heard that story for .NET as well, but from what I have seen it is more plausible in WinRT.

There is no message loop in WinRT. There is no GDI in WinRT. All graphics are via DirectX. XNA, the .NET games framework, is not supported. It seems that you will need to use C++ for fancy DirectX coding, though this is not confirmed. Of course your XAML or Canvas code will be rendered by DirectX under the covers.

It is fascinating to see how Microsoft has borrowed XAML and ILDasm from .NET, but that WinRT is native and not .NET at its core. My take on this is that Microsoft intended to preserve the productivity of .NET, but without any performance compromise.

Despite the inclusion of .NET though, the fact that only a subset of the Framework is available, and that interop to the Windows API will not work*, means that most existing apps will need considerable work to be ported to Metro.

*Updates

A few clarifications.

It has been shown that you can call WinRT from Win32 (the favoured word for Win32 seems to be “desktop applications”) though I’m not sure how useful it is.

Concerning P/Invoke (Platform Invocation) to Win32 APIs, apparently this does work for a certain specified, small subset of the Windows API. It also works for your own native code DLL, with the proviso that if your native code DLL calls a disallowed Win32 API it will raise an error.

WinRT is partially extensible. A Framework Extension is a library which you can reference as a dependency in your app’s manifest. When the app is deployed it will download this dependency from the Windows Store. An example is the C Runtime Library. An extension library installs into its own directory, and can be used by multiple WinRT apps provided each one also references it in their manifests. However, the caveat is that only Microsoft can create these extensions: there is no way to create your own shared extension for general distribution, though an enterprise can deploy a shared extension internally.

Here comes Windows 8 – but what about the apps?

I’ve spent what feels like most of the night trying out the first developer preview of Windows 8, using an Intel tablet PC loaned by Microsoft for that purpose. The early preview is frustrating, in that many of what will be standard apps like Mail and Contacts are missing, but it is already obvious that Microsoft has done a great job with what I am calling the “Metro” platform within Windows 8. Here is Control Panel in the new user interface:

image

This is the touch-optimized personality of tthe new operating system, featuring a Start menu with live tiles like an evolved Windows Phone 7, apps that run full-screen to create an "immersive user interface", and swipe control to show application menus, switch apps, or access standard features.

It is a delight to use; but this is Metro, with its own Windows Runtime (WinRT), a native code API which is wrapped for access by either HTML and JavaScript apps (which also use the IE 10 runtime), or by C/C++, VB or C# apps driving XAML-defined user interfaces – yes, kind of like Silverlight but not Silverlight.
What about all our Windows apps? For that we need the desktop personality in Windows 8. Tap the Desktop tile, or launch a "Desktop" app, and it suddenly appears, looking much like Windows 7.

The problem: while Windows 8 "Metro" looks great, there are currently zero apps for it, or at least only those supplied with the preview, because it is brand new.
In truth then, Microsoft has not quite done what would have been ideal, which is to make Windows touch-friendly. That would have been impossible. Instead, it has integrated Windows with a new touch-friendly platform.

The key question: will this new platform attract the support it needs from developers in order to become successful in its own right, so that we can do most of our work there and retreat to the desktop only for legacy apps, or apps which really need mouse and keyboard?

It is a big ask, and we have seen HP with WebOS, and probably RIM with PlayBook, fail at this task.

Of course it is still Windows; but I do have a concern that a proportion of users will try Windows 8, find the transitions between Desktop and Metro unsettling, and stick with version 7.0.

Let me add these are very much first impressions; and that Metro really does look good. Perhaps it will win; but a lot of momentum has to build behind it for that to be possible.