Wednesday, October 10, 2012

ASP.NET MVC 4 & jQuery Mobile

Whilst doing my usual round of research I have discovered that within the Developer Preview release of ASP.NET MVC 4 they have included two interesting features. Firstly Adaptive Rendering by Browser and the Mobile Application project type.

The first of these allows the developer to provide different Views depending on the relevant (mobile) browser. The Mobile project type is specifically geared toward creating mobile web apps. Further to this the mobile functionality is provided out-of-the-box by inclusion of the jQuery Mobile 1.0.1 framework.

What does this mean?:

As Microsoft are backing both jQuery and jQuery mobile by including them in its development platform by default and indeed contributing significant enhancements to the jQuery project (See Data Validators and jQuery Validation plugin). I believe that we should follow suit and any efforts toward learning/providing mobile web app functionality should be focused primarily on the jQuery Mobile framework. A list of graded browser support for the platform can be found at the following location:

What does this mean for Native iOS and Andriod Apps?

Actually not  a lot, native apps will still need to be created in either XCode 4 (iOS) or eclipse (Andriod) or indeed using PhoneGap on a mac – there may be other options going forward – VSNomad or indeed the C# compiler for Mac (Which made such an impression Ive forgotten its name) but PhoneGap seems to be the most mature environment for Cross-Platform native apps for the time being.

Interestingly if the “App” doesn’t require any native functionality (Turning on the camera flash for instance) then it would be feasible to create a “shell” native app n phone gap that simply includes the browser control as a full screen view and points at the URI for the Web App. This essentially would create a “hard coded” browser pointing to the URI of choice. In turn this means that the Web App part could be build within visual studio (or any other IDE for that matter) and a native app could be created very quickly to point at the online resource.

Post a Comment