Justin James highlights the major changes in Windows 8 that developers need to know, and explains why he thinks Microsoft strategy might backfire.
Microsoft unveiled a developer preview of Windows 8 at its BUILD event last week. A lot of writers are slicing and dicing Windows 8 in terms of the UI, handling, features, and so on; I'll add to the conversation that the legacy and Metro-style apps on the same system feel like the Win 3.1 days when you were constantly bouncing between the GUI and 80x24 mode to get things done, and I really hope Microsoft improves the experiences before launch. I'm focusing on looking at Windows 8 from the developer's perspective. (I used VirtualBox for the preview; if you want to do the same, follow these directions.) Here are my initial thoughts and findings about Windows 8.
Metro-style apps and WinRT
WinRT seems to be a new provider of system or OS services to applications. .NET was not a clean break from the past, as it merely wrapped existing system calls up into a comprehensive package. While the details are not known, it looks to me like WinRT may be a full-fledged replacement of the Win32 API. That said, WinRT is accessible from other languages, and it seems that non-Metro-style apps (.NET and C apps) can use WinRT as well.
WinRT supports a host of interesting features, including:
- Single Sign On
- Windows Push Notification Service (WP7 already has this feature.)
- Can act as a contact source to the OS (i.e., it can provide details to the address book)
Reading through the WinRT documentation is illuminating. For example, it is clear that WinRT will not be allowing you to access data outside a "shared" location or an application-specific area. There is also a very heavy emphasis on asynchronous operations, just like in WP7. While Metro-style apps can still access some parts of the Win32 API, COM, and .NET Framework, the access is limited. You cannot work around the WinRT file access limitations by using the classes in System.IO (like the File object) -- they are totally gone. It is clear that the access to the .NET Framework, Win32 API, and COM is to "fill in the blanks" of what WinRT does not provide, or to have alternative methods, not to allow you deep access.
Visual Studio 11, .NET 4.5
Visual Studio 11 (VS11) looks almost identical to Visual Studio 2010, but there are a ton of UI enhancements and new features. None of the features are quite as "blow me away" neat as, say, IntelliTrace in VS2010, but they all add up to a nice upgrade. The developer preview ships with a stripped down, Express edition, but you can get the full version from Microsoft (it also runs on earlier versions of Windows). It is not a Metro-style app, and I can understand why. F# is still on equal footing with C# and VB.NET. The changes to VB.NET and C# are underwhelming, aside from the support for Async. ASP.NET 4.5 supports HTML5's WebSockets and asynchronously flushing request and response streams, as well as some less interesting features. IISExpress is the new development Web server, and LocalDB gets a lot of support.
A new version of Team Foundation Server is coming as well, but details are sparse at the time of this writing. F# 3.0 is included, with a number of new features; notably, it seems to have gotten more beneficial upgrades than C# or VB.NET in terms of quantity (although Async/Await is pretty nice), but that's in large part because F# is still quite new and has a ways to go.
There will be a Windows app store, which will function like a smartphone app store. The app store will also support in-app purchases, which is another bonus. There is integration directly in VS11 to hook into the app store, including a very cool feature that lets you reserve an application name. Also, Microsoft will be providing its application review tools, so you should know before submission if your app will pass or not.
Another interesting cloud-based idea is that Metro-style apps can sync information easily to Windows Live for use on other devices. The Windows 8 + WP7/WP8 combo could be absolutely killer for on-the-go professionals and for enterprise apps. Even if the WP7/WP8 OS remains separate from Windows 8 and apps need to be rewritten for each platform (although my guess is they won't need to be), being able to immediately see work or settings from an app on one PC happen on all devices is awesome. WP7 already can do this with Word, Excel, PowerPoint, SharePoint, and OneNote, although the configuration is rather annoying.Read my take on Windows 8.