Kotan Code 枯淡コード

In search of simple, elegant code

Menu Close

Tag: winrt

Details Released on Surface for Windows 8 Pro

According to Microsoft, here are some of the details that we’ve been waiting to find out regarding the Windows Surface Pro (Surface running Windows 8 Pro):

  • It looks, from a hardware and form factor point of view, just like a regular surface
  • It comes with a pen (stylus)
  • It will be running Windows 8 Pro, which means Windows RT is not a limiting factor sandbox anymore.
  • BitLocker for drive/data security (does anybody actually use this on their current Windows machine?)
  • Mini DisplayPort HD connection for extra displays
  • Full size USB 3.0 port
  • Up to 128GB of storage
  • Intel Core i5 Processor
  • Price point starting at $899
  • Due out in early 2013

So that’s what I know about the “Surface Pro” and its impending release early next year. They won’t be making the holiday season for 2012, but the “regular” (aka hamstrung, limited, WinRT version) Surface is all over the commercials and seems to have basically sponsored all of the NFL up through the Super Bowl, so no doubt many, many people will be getting a Surface for Christmas.

You can’t actually play with a Surface hands-on in any regular big box electronics store like Best Buy. Instead, you have to go to an actual Microsoft store. This is unfortunate, because I feel that the more people who actually get to touch, feel, and experience the Surface the more people are going to be impressed by it. The commercials don’t really do the device justice.

Time will tell if the Surface Pro lives up to expectations. Unfortunately, I’m still not going to buy one until I get a chance to play with it. $899 might not seem like much, but it’s a big chunk of change for a tablet-sized computer and I want to make sure I’m getting my money’s worth.

Windows 8 Still Feels Like a Frankenproduct

After having used Windows 8 now for a while, I still find myself having mixed emotions about the product. This is, of course, the root of the problem because Windows 8 doesn’t feel like one product, it feels like a Frankenproduct, an unsophisticated mash-up of two entirely different products.

I used Windows 8 to play around with WinRT (what you see on all of the Windows 8 commercials) and overall I am very pleased with that experience. I love having live tiles on my desktop, I really like the new login and multi-user experience, and much more. There’s very little about WinRT that I dislike… on the surface (pun intended).

This morning, I clicked on the WinRT version of Internet Explorer (the fact that it feels like there’s two versions of IE really pisses me off as well) and tried to get connected to work via VPN. Turns out Java’s not installed and it won’t work. Also turns out that the page doesn’t even have permission to ask me if I want to enable the ActiveX control alternative to Java for the VPN. In short, nothing worked. Using the WinRT version of IE10, you cannot access the security settings responsible for ActiveX or Java.

I had to launch an app that I knew wasn’t a WinRT app (command prompt) because I can’t for the life of me remember the magic keystroke responsible for opening the desktop while I’m in the WinRT start screen. Once there, I launched the real version of IE and, after 20 more minutes of swearing and keyboard mashing, I was able to get my VPN to work.

You might say, “Well, that’s just Java for you.” This is true, Java is generally a pain in the ass in browsers. However, this isn’t just Java. This is just a sample of a much more systemic problem to Windows 8. I am constantly hunting around trying to figure out when I need to escape the WinRT façade to get something done or when I can get it done from within the WinRT façade. Those using a Surface (not Surface Pro) and some of the other WinRT devices coming out don’t have the ability to escape the façade – WinRT is all there is on those boxes.

Overall it just feels like a poor experience. There’s no clear reason why I can do one task in Win8 and cannot in WinRT versus being able to do the same task in both places. I hate the jarring experience of being immersed in the really nice WinRT experience and then being slammed into the desktop experience. The perfectly square windows with no gradient or decoration certainly comply with the new minimalist WinRT stylings, but even those feel out of place in the Win8 desktop view because in this view, people expect it to look like Windows, not WinRT.

I am not sure what the solution to the problem is. But right now, without a touch screen on my laptop, I feel hamstrung and crippled using Windows 8. I feel like I have two operating systems installed side-by-side and they keep switching to each other without warning like some kind of bad virtualization experience.

Folks who just have WinRT to deal with probably won’t feel this kind of frustration for a number of reasons. Firstly, they won’t be trying to do power user stuff like VPN from IE10 to their office, because for the most part they’ll be treating their WinRT devices like tablets, and won’t expect to be able to do that kind of thing. Using Chrome or Firefox doesn’t make it any better because those aren’t WinRT apps, they slam you into desktop mode anyway. That said, I wonder what the frustration level is going to be like on the crazy hybrid devices that flip, fold, collapse, and transform into 20 shapes and run Win8 … so those devices will see the jarring transition from WinRT to Win8 desktop… will the nature of the device make that transition any easier to take? I don’t know.

Windows 8 is quite honestly the first Windows operating system that I have felt disoriented by and frustrated with. I have a ridiculously high tolerance for tech level frustration, but I find that trying to do my normal daily stuff in Windows 8 just plain increases my stress level.

Microsoft Surface Available for Pre-Order

Today, the Microsoft Surface tablets became available for pre-order. Or at least, the WinRT ones did. The pricing for the accessories is a little confusing but it looks like you can get a 32GB model without a black touch cover for $499.00, a 32GB with touch cover for $599 and a 64GB with a touch cover for $699. You can also drop another hundred or so and get a type cover which looks more like the hard plastic bluetooth keyboard accessories you can get in iPad cases like the ones you find at Brookstone and other shops like that.

So, do you want one? Should you buy one? I can’t answer that, but I can give you a little bit of a warning that people familiar with Windows might not be used to seeing – this tablet will only run a very small subset of applications. Remember that WinRT is actually different than Windows 8.

The WinRT tablet mentioned above is only capable of running applications available through the Microsoft application store and only capable of running those that were written using the WinRT SDK. This means that you’re not going to get backwards compatibility with desktop windows applications. Microsoft is giving you a free copy of Office “RT” because, well, without that free copy you wouldn’t be able to read or write word documents, powerpoints, or anything else because WinRT won’t run the traditional version of Office. In fact, WinRT won’t run the traditional version of anything.

You should be thinking of WinRT’s view of the world the same way iOS sees the world. If it wasn’t written for WinRT, it won’t run it. The same way that the iPad and iPhone don’t run Mac applications, no matter how much it looks like they should.

If you like the WinRT (formerly called “Metro”) design look and you want a tablet for Internet browsing, for e-mail, and for office docs, and you aren’t picky about which games you want to play on your tablet, then you’ll probably be fine with a WinRT tablet. However, if you want something more substantial and you need the ability to run Windows “desktop” applications, then you’re going to want to go with alternatives like those you can get from Asus or you’re going to want to wait for the Surface Pro models, which are Surface laptops that are running full versions of Windows 8, which can run traditional desktop applications.

The real question for developers like me is: will the Surface Pro be better than competing models from Asus?

Windows 8 – Jekyll and Hyde?

Windows 8 is right around the corner. In fact, most developers are already running the “RTM” (Released to Market) version of Windows 8, which is essentially the same build as the one that will be released to customers, minus a few pieces of sugar coating that typically goes into the final, shrink-wrapped product.

When you see ads for Windows 8 on TV, you see the new Windows 8 design (formerly referred to as Metro but now, for some absolutely stupid reason, Microsoft doesn’t want to use that branding). You see the smooth animation, the flowing interface, the square buttons and the simple, get-out-of-your-way-so-you-can-do-stuff user experience that is the hallmark of Windows Phone 7.x.

This is all well and good, but it’s giving many developers fits. The source of these fits is that that Windows 8 development experience is fragmented, cut nearly in half by a choice most developers don’t want to have to make. Windows 8 has two different types of application modes: desktop and WinRT.

WinRT is where most of the new innovation can be found. WinRT is a complete rebuild of the Windows API. The underlying API is C and C++ and then there are different language hooks on top that are generated by code generators, allowing for a native C++ WinRT development experience as well as HTML5/JavaScript and C# development experiences. These libraries are all exposed in a way that feels natural and familiar to developers in those environments and, quite honestly, WinRT is a fantastic piece of architecture and design and I am very impressed with it.

So what’s the problem then? Where’s the Hyde to the good Jekyll? This is where I get frustrated. Desktop mode is like traditional Windows development, where you have access to a  .NET SDK that is designed in much the same way as it always has. In desktop mode, you have access to all the devices, peripherals, and everything that windows developers have always had access to.

But you don’t have access to WinRT.

This is the fundamental issue I have with Windows 8. If I want to access a serial port, I am forbidden from using anything in the WinRT libraries. If I want to build a multi-window application, I am forbidden from using anything in the WinRT libraries. The reverse is true, also. If I use any of the WinRT GUI or take part in that isolated silo, then none of my WinRT code can access low-level peripherals, serial ports, create multiple windows, or use a number of other desktop-only features.

Even more frustrating is that if I want my code to be guaranteed to run on all of the Windows 8 tablets, I must write my code using WinRT, because WinRT will run on ARM tablets. The new fleet of lightweight, battery-efficient, Windows 8 tablets are WinRT-only! They  aren’t laptops and are not capable of executing any desktop-mode “classic windows” applications.

So what this really boils down to is this: developers forced to write “classic” desktop mode applications are constantly taunted  by the UI over on the WinRT side, teased and bullied by the live tiles, the smooth integration of hubs, and everything else appealing. You’d think maybe the GUI libraries would be usable in classic desktop mode but even that’s not consistent. WinRT is its own GUI library and classic desktop mode must use WPF. While both utilize XAML, the set of controls and how they behave is actually quite different.

When you look at iOS and Android and Windows… what has Windows always had as an advantage? Power. Flexibility. Access to devices, hardware, peripherals, and every other part of the system. Now Microsoft is saying that if you want to build apps for the same form factor as the iPad, you’re going to have to suck it up and build inside the WinRT isolated sandbox. While there are achitectural and logistical concerns that make this a requirement, it still sucks. The converse is also true – if you are building a more powerful, more in-depth application in classic mode, then you’re going to have to suck it up and cope with the fact that you don’t get access to any of the awesome GUI controls available in WinRT and cope with the fact that your desktop application will never run on a Win8 ARM tablet.

I can see why this was all done, but the marketing coming out of Microsoft and their technical evangelists has been praising WinRT at the expense of other technologies like WPF. MS is treating WPF like a redheaded stepchild, despite the fact that it is the only viable way for people to build applications that reach outside the sandbox. In short, MS is treating what used to be its biggest class of proponents (desktop app developers) like they don’t matter anymore and that WinRT is the only way to go.

None of this matters to end users, but developers trying to decide what tech they’re going to use for their next awesome app, it’s a frustrating and maddening choice.

WinRT Distilled

Since Microsoft showed off the features in Windows 8 at their Build conference, the internet and many office water coolers have been riddled with discussions about WinRT.. what it is, how it works, why should you use it versus something else, etc. Hopefully in this post I can provide some clarity.

First, a little history lesson: Microsoft originally wrote this thing they called the Win32 API. The Win32 API was written in C++ and littered with data types like the “lpzstr” and where developers had to do black magic tasks like “cracking messages” (it’s more benign than it sounds, honestly). We couldn’t pass big, bloated, complicated data structures around on the call stack so the use of the Win32 API was typified by the act of bundling up all your parameters to an API method into some obtuse, bit-packed “thing”, making the call, and then getting a response, which could be just as obtuse and bundled. Heaven help you if you wanted to hook into the bowels of the API so you could receive notifications and messages in your own code.

Then along came COM (yes, I’m skipping OLE and DDE for you history buffs… it’s too traumatic for me to write about). COM, which stands for Component Object Model, was an API. More than an API, it was a binary standard for allowing components written in (virtually) any language to communicate with each other. Those of us who had to write our own COM components or consume them are familiar with “DLL hell”. This is when the act of trying to make versioned components make sense on your system goes straight to hell in a handbasket. An important thing to note is that while COM provided an object-oriented, component-style layer to expose and consume functionality, the Windows UI was still very much the Win32 API.

Now we finally get to the .NET Framework, a managed runtime environment that claims to solve the problems of DLL at the same time as making UI development easier, more developer-friendly, and much more intuitive. We start with Windows Forms and eventually get technologies like XAML, WP, and Silverlight to build our user interfaces. Despite support for 64-bit and being a boatloat more powerful and complex, we’re still all sitting on top of something that strongly resembles the original Win32 API … we’re just insulated from it, and by insulated, I mean we’re sitting in a warm cozy ski lodge while the underlying API is freezing its ass off on the top of the mountain. This brings us all the way up to .NET 4.5. That’s right, .NET 4.5 is still going through a similar stack of abstractions to get to the underlying system that we go through today. This point is important.

Now we get WinRT. Contrary to popular belief, WinRT is not just a re-branding of the Windows API. It isn’t a codename for .NET 4.5. WinRT is actually a UI (among other things, including file system & device access) library written in C++. The reason I took so long getting to this point with the history lesson is this:

WinRT is the biggest single change to the Windows desktop development story since the arrival of the Win32 API.

WinRT takes many of the classes and features that we’re used to having available to us in .NET and re-writes them in native C++. Much of the .NET BCL (Base Class Library) that we take for granted has now been cleaned up and made available within WinRT – again, in native code. Rather than making us suffer through yet another poor interop layer, WinRT is also built with its own self-describing metadata. This allows Microsoft to generate C#, JavaScript, and C++ class libraries. These class libraries aren’t just cheap shunts, but rather they surface the concepts available within WinRT in ways that seem familiar and, more importantly, idiomatic, to the developers who have been working in those environments for years. When your “appx” (Silverlight devs, think “.xap” here) bundle is loaded, WinRT figures out what kind of host process is needed (an HTML engine, a CLR process, or a C++ process) and then fires up your app within the WinRT sandbox.

So, regardless of how it is implemented in the underlying WinRT C++, a collection exposed to JavaScript will look like a vector whereas it will look like a .NET collection complete with Add() and Remove() methods to a C# developer and it will look as it should in C++ as well.

So – how do you decide if you’re going to use WinRT or if you’re going to continue with the standard desktop application story? Well, in general, if you want access to the “Metro” style, then you’re going to need to use WinRT. If your application just doesn’t fit with Metro (or has a complicated UI that makes no sense to expose to touchable surfaces) then you’ll continue using standard .NET 4.5 technology.

WinRT applications have the potentially to finally give Microsoft a good mobile and slate environment. Windows CE, PocketPC, and Windows Mobile were all terrible attempts at shoehorning a desktop operating system into a mobile form factor. Windows 8, with WinRT apps and the Metro style, has the potential to give both big-monitor desktops and slates/tablets a compelling and engaging experience.

For us developers, this means 400+ million potential happy customers.

Windows 8 – As groundbreaking as Win3.1 was?

Last week in Anaheim, Microsoft debuted its new operating system, Windows 8, and much of the developer experience that goes along with it. This conference is for developers of software as well as for OEMs who work for hardware companies and even IT professionals looking to get the inside scoop on the new operating system.

I’ve been around the Microsoft developer scene since the days of DOS 4.11 (yeah that’s right, I had it on 5.25″ floppies…) and I’ve been developing for other platforms, including Unix/Linux, OS/2, and Mac, off and on for nearly as long. I am accustomed to the “OMFWTFNEW!!” feeling that developers get when they see a shiny new technology, operating system, or device. So, with that in mind, I generally take a cynical or even jaded approach when I sit through keynotes for fancy new shinies. So when I say the following, hopefully it has the right amount of impact:

I was absolutely shocked.

After watching a few keynotes and then watching a few of the deep-dive technical sessions outlining how Microsoft built some of the technology they showed in the keynote, I remember saying to a friend and colleague:

Windows 8 is to Windows 7 as Windows 3.1 was to DOS. It is that much of a paradigm shift.

Let’s look at Microsoft’s past attempts at bringing a desktop operating system to mobile devices. Windows CE and the 30 other OEM variants of CE and XP embedded, Pocket PC, and then of course Windows Mobile. All of those were attempts at shoehorning the desktop operating system into a mobile device. Windows Phone 7 was a complete re-imagining of how Microsoft wanted their users to interact with applications… Note that I said interact with applications and not interact with the OS. The Metro style is very much about getting out of your way and letting you do what you want and how you want it, with as little wasted time as possible.

Now Microsoft is using what they call a touch-first approach. A Metro-style app supports and embraces touch first, but can use the mouse as a fallback option. Swipes, gestures, and a decided lack of OS chrome, are hallmarks of this new style. Microsoft is investing heavily in touch devices of all shapes and sizes and, from the video linked below, you can see that a Windows8-based tablet is a truly compelling device (as opposed to a Windows7-based tablet, which is an overpriced electronic paperweight). In addition to the new look and feel, Microsoft is giving developers access to all Windows 8 consumers via a new App Store. If you thought the Mac OS X App Store could reach a large number of users, compare that to the number of Windows users there are…

Gizmodo’s “How Windows 8 and iOS5 stack up Side by Side” , comparing a Windows8 tablet (the developer tablet given out to Build attendees) and an iPad 2 running iOS 5.

I have plans for several more blog posts about Windows 8, including a developer discussion of what exactly WinRT is and what it means for them.

For the first time since possibly Windows 95, I am truly excited about a new Microsoft operating system, not just as a consumer but, as a developer.  That said, I’m still not giving up my Macs 🙂