Friday, October 21, 2011

ASP.NET MVC 4 Developer Preview with Mobile Support Released (My Experiences)

I am not at the Microsoft Build Conference and missing all the exciting developments . It’s going to take me a while to digest all the developments although it looks like I was mostly right about Windows 8 and the HTML5/CSS3/Javascript programming model even though .NET is not dead (yet).

I have been talking about work with the new project with ASP.NET MVC and then looking at things like Sencha Touch, PhoneGap, and jQuery/jQueryUI, as well as jQTouch. In fact, I was able to use straight HTML5/CSS3/Javascript with jQTouch to create a pretty comprehensive iPhone application.

But what got me really excited today was the release at Build of ASP.NET MVC 4 Developer Preview. I thought, “what if we could have one code base – ASP.NET MVC for the web app and also for the mobile clients?” That’s because a cool thing about MVC 4 is that there is a Mobile project template as well as lots of features for mobile development. So I downloaded it today at work and ran through the mobile tutorial. I’m impressed so far! I was able to use Safari for Windows and it’s developer mode to emulate a iOS/iPhone 4 application with the tutorial as well as playing around. MVC 4 is built on top or uses the wonderful jQuery Mobile. It’s a pretty good model using jQueryMobile’s markup like

    .

    The problem is that our “customer” will not be switching to iPhone 4’s and staying with the Blackberry Torch 9810 and 9900 devices. jQTouch definitely supports it. It doesn’t seem like ASP.NET MVC 4 does not (it doesn’t seem like there is any Blackberry support) but my good friend Brad Wilson on the ASP.NET team texted me in answer to that “It's built on BrowserCaps, and you can also extend it to include your own sub-types and rules fairly easily. For example, all mobile devices are .mobile right now, but you could add an iPhone rule and use .iphone” I don’t know what that means yet but I am hopeful to learn from my readers and the team. What do you think?

No comments:

Post a Comment