Metro vs Desktop: the opposing Windows 8 paradigms

December 20, 2011

[Note: this post was published in December 2011 and is commentary on the Windows 8 Developer Preview. It is assumed Windows 8 will change drastically as Microsoft continues development of it. I can only hope that the information below turns out to be wholly inaccurate once Windows 8 is released.]

In my previous post I discussed some major reservations I have with Windows 8 and specifically how the new Metro paradigm clashes with the traditional Windows desktop.

IE10 Metro will not support plugins on Windows 8

One thing I learned last week at the Dallas State of .NET: The Road To Windows 8 event is that Internet Explorer 10 in “Metro mode” does not support plugins (So no Flash. No Silverlight even!). Of course, plugins work just as expected in “Desktop mode”.

That a user even needs to comprehend the fact that Windows 8 really has two versions of IE and other programs is enough to spur intense discussion. But that’s not my concern here. It’s something else.

The Metro side of Windows 8 works similar to iOS and Android. It’s an OS assumed to be on hardware with limited resources, and so unlike desktop operating systems, only one application can be open at a time - all others are “suspended”. You can see that in Windows 8’s cool new task manager:

Windows 8 task manager

Of course, this only applies to Metro apps. Regular Desktop apps run the same way they always have. That is, they hog resources until you close them, even when you’re doing something else. Both paradigms are great on their own, but this is where Window 8’s schizophrenia can cause some serious conflicts and confusion, as I’ll demonstrate…

Let me lead you on a little picture story

Rather than rehash specs and facts, it thought it would be more effective to tell this one as a story.

It’s late 2012, and we’re chillin with our sweet new Intel Touch Ultrabook running Windows 8. What a perfect device to play FarmVille with!

Let’s boot the device up to the beautiful new Start menu app. We’ll click on that “e” icon to launch IE10.

Windows 8 start screen

The new Metro mode IE loads up, we log in to Facebook, ready start playing FarmVille. OH NOES! No Flash? (You can attempt to install Flash here, and it’ll let you try. But it won’t work. Thank me later.)

Windows 8 IE Metro does not allow Flash

Geez, lets go back and open up IE in Desktop mode. Now, to get to Desktop IE we need to stop by the Start screen – again – and click the IE icon – no, no – click on the Desktop icon.

Windows 8 Start screen

Ahh, the Windows desktop. So yesterday, eh? Let’s launch Desktop mode IE.

Windows 8 desktop

FarmVille at last!

Windows 8 IE 10 in desktop mode supports Flash

While we’re waiting for some crops to grow, lets go practice some scales! Back to the start screen.

Huh. That’s funny. The FarmVille music is still playing in the background. Let’s launch the piano app. do-do-dah-de-do--do!

Windows 8 Start screen

Umm. The FarmVille music is still playing. This could be distracting. We could mute the sound in FarmVille, but, ah well. That’s cool. We can play along!

Windows 8 Piano app

Hmm. Why is thing so sluggish? The sound is clipping and sometimes it doesn’t play the note right when we hit a key. It’s like we don’t have enough resources to use this app.

Wonder what the task manager says. Holy Crap! FarmVille! Our Resources!!

Windows 8 Task Manager

(Yes, the numbers above were ‘shopped, but it could happen.)

You can see above the Piano app nicely suspended itself, but FarmVille has been on the whole time. It’s certainly clumsy to be bouncing between apps that are managed completely differently.

The point of the story

In its current form, Windows 8 it attempting to glue together two completely different OS paradigms, and it shows. Metro apps act one way, Desktop apps act another, both with quirks that can negatively affect your experience on both sides.

I’m still sympathetic to the idea of bringing the full blown windows OS to a tablet or ultra-portable notebook device, but I do not like the way Microsoft has done it so far. Both opposing personalities of this OS are screaming for attention and it is awkward to have to manage each of their shortcomings.

I’d honestly rather have a system with 2 entirely distinct partitions, where I can boot into Metro mode when I’m on the go and boot into Desktop mode when I’m at my desk. Having them both running at the same time causes too many problems and doesn’t even solve any to begin with.

Windows 8: The Bipolar Schizophrenic OS

December 17, 2011

[Note: this post was published in December 2011 and is commentary on the Windows 8 Developer Preview. It is assumed things will change as Microsoft releases newer versions of Windows 8 over time.]

I’ve been spending a lot of time with Windows 8 recently and the more I learn about it the less confidence I have. I get the idea. Apple had OS X on the desktop and iOS on the phone, and they decided to “scale up” iOS to the tablet. Microsoft is attempting the opposite. They’re trying to scale down Windows to the tablet. I don’t know which approach will prove to be better, but either direction seems reasonable.

Apple and Microsoft's approach to the tablet OS

I also think I’m in sync with what seems to be Microsoft’s vision of the future. The primary computing form factor for many of us has gone from a full tower desktop, to a laptop, and there’s no reason to believe in a couple years our primary computer won’t be the size of an iPad, or even a phone. Put it in your pocket when you are on the go, dock it to something while you’re at your desk. It’s logical that the device both support mobile touch-screen support and a full keyboard and the full Windows OS, depending on your mode of operation. If this is the future, I’m excited!

Intel and other manufacturers are banking on Ultrabooks being the next hot thing. Think a MacBook Air with a touch screen, or something like the ASUS Transformer running Windows 8. Touch-centric mobile OS when you’re on the go. Full-blown Windows when you’re at your desk. Totally make sense. I want one.

Imagine Windows 8 running on this ASUS Transformer

But I don’t want Windows 8.

I’d rather have a laptop running Windows 7+ and an iPad or Android tablet over some bipolar hybrid slate computer that’s no good at either. That’s what most of us at Headspring concluded, for now.

Metro has no place on the desktop

I don’t understand why Microsoft nerfed the Start Menu and turned it into a full-screen “app”. Imagine working in your desktop with several windows open, and you just want to get to the start menu to launch a new program. This is ridiculous:

Working along in the desktop.

image

Clicked the Start menu.

image

Dropped back to the desktop (if opening a desktop app).

image

This is a schizophrenic way to launch an app when your sitting at your desk with a mouse and keyboard. There’s no benefit in having the Metro Start menu in this scenario. None.

It’s also mind-boggling that Microsoft is introducing the clean Metro design style to Windows, and at the same time has doubled down on cluttered desktop UIs, by doing things like putting a freakin ribbon bar on explorer!

image

Make up your mind, Microsoft.

image

But that’s just the start of it. I’ll be writing some follow-up articles outlining some other scenarios that make me completely question the viability of Windows 8 as a hybrid tablet/desktop OS.

The desktop has no place on a mobile device

I’m not proclaiming this as an opinion, but pointing out that it’s possible this will be a fact of life. Microsoft is keeping quiet, but there are tons of questions about Windows 8 on ARM-based devices. It’s not even clear that some devices will be able to run legacy Windows applications, and in these scenarios you lose the whole presumed benefit of Windows 8. Why not just use an iPad or Android device if the only applications you are able to run are Metro apps anyway?

Will the Metro side of Windows 8 be so great, that a device running only Metro will be as good or better than an iPad? It has to be if Windows 8 as a tablet platform will succeed.

image

Just start with a tablet OS, how about that?

That’s my recommendation to Microsoft. The giant installed user-base of Windows users have desktops and laptop computers that don’t support touch. There’s no benefit of a business upgrading thousands of computers to Windows 8. Businesses will balk at Windows 8 more than they did with Vista!

There’s also little benefit in getting full access to Microsoft Windows in a tablet computer, at least for now. The idea sounds nice in theory, but in practice the experience is jarring and confusing. And I’ll follow up on some other huge problems here.

For now, just give me a killer tablet OS. I’d totally buy a $500 “Windows Metro” tablet if it had a more open ecosystem than Apple’s. Microsoft has some great potential here, but I’m afraid it will be broken to pieces as they try to smash together a mobile OS with a desktop OS.

Tags: Windows 8, Metro, tablet
Categories: Mobile, Windows 8

Exploring ASP.NET MVC 4 mobile features

October 9, 2011

ASP.NET MVC 4 Developer Preview is out and has some nifty new mobile features that will allow you to target mobile devices. Phil Haack’s build talk and this tutorial are two of the best resources to get started with. This post will briefly discuss the new mobile support in the MVC 4 framework.

Mobile views

The new “Display Modes” feature lets an application render a specific view based on the device making the request. A desktop browser accessing a page might cause Index.cshtml to be rendered, but if the request comes from an iPad or an Andriod phone, Index.mobile.cshtml may be rendered. This convention-based approach lets you tailor your views without requiring any code changes.

The suffix “mobile” works out of the box, but you can also register your own display modes that target specific devices any particular way you wish. In the global.asax you could register something like the following:

DisplayModes.Modes.Insert(0, new DefaultDisplayMode("iPhone")
{
   ContextCondition = (context => context.Request.UserAgent.IndexOf
       ("iPhone", StringComparison.OrdinalIgnoreCase) >= 0)
});

This will register a mode specifically for iPhones, and allow you to create view pages with “iPhone” as a suffix, such as MyView.iPhone.cshtml.

See the release notes for additional details.

Programmatically detecting a mobile device

You may begin to add some mobile views to your application, only to realize that you actually need to customize more than just the way your views are rendered. Maybe you need to add or remove some of the data your page is querying or do something different altogether. I recently created a mobile version of this blog and couldn’t just use home controller action as-is. I wanted my mobile view to list a summary of all of my blog posts, rather than the full content of just the first 3 posts, which is what you see in a desktop browser.

HttpBrowserCapabilitiesBase browser = HttpContext.GetOverriddenBrowser();

//Some of the many properties, with values as seen from a Windows 7 Phone (emulator):

browser.Type; //IEMobile9
browser.Id; //iemobile
browser.MajorVersion; //9
browser.IsMobileDevice; //true
browser.InputType; //virtualKeyboard
browser.Crawler; //false

Simply call HttpContext.GetOverridenBrowser() to get access to the browser capabilities and you can determine whether it’s mobile, and act accordingly.  This method is an extension method in the System.Web.WebPages assembly, so don’t forget to add a using statement for this namespace!

Overriding the browser type

Detecting a mobile device like this isn’t new, of course. The first version of ASP.NET MVC allowed you to inspect the attributes of the requesting user-agent and chose the proper view to render. The downside of this is that there was no out-of-the-box way for a user to override this. Ever visit a site with your mobile phone and be presented with a stripped down view when you desperately wanted to see the full desktop-browser version, but couldn’t?

MVC 4 has this capability out-of-the-box with the SetOverriddenBrowser() extension method. You can call this and specify a browser type override. This is what the view switcher does in the jQuery.Mobile.MVC sample NuGet package, letting a user select whether they wish to be handled as a desktop or mobile device:

public RedirectResult SwitchView(bool mobile, string returnUrl) {
    if (Request.Browser.IsMobileDevice == mobile)
        HttpContext.ClearOverriddenBrowser();
    else
        HttpContext.SetOverriddenBrowser(mobile ? BrowserOverride.Mobile : BrowserOverride.Desktop);
 
    return Redirect(returnUrl);
}

The cool stuff comes from HTML5 and jQuery

ASP.NET MVC 4’s mobile features aren’t all that exciting to tell you the truth. The only new features so far are just some helpers and tooling around a technique that’s been around forever. That said, it’s a great addition to the framework.

What's really exciting is the things jQuery Mobile and HTML5 bring to the table, allowing you easily build slick UIs that will look great on a phone or tablet and rival a native application. For more on that, definitely check out the tutorial over on the ASP.NET website that will use these new MVC 4 features and jQuery Mobile.

Tags: jQuery Mobile, MVC4, HTML5
Categories: ASP.NET MVC, Mobile, HTML

About me

I'm a consultant with Headspring in Austin, TX. My passion is creating web-based applications that are well crafted and solve real problems for real people. Want to know more? Check out my about page.

WTF is all this code? I came here for food!

My wife made a new year's resolution to try out at least one new recipe each week. Want to know what she's been feeding me? resolutionfood.blogspot.com