Chapter 10. Mobile Web Development

The mobile web offers a powerful medium to deliver your content to a greater number of users. With the increasing number of smartphones in use and the subsequent explosion in the market penetration of mobile web users, it has become increasingly important to incorporate mobile devices into your projects’ initial planning and requirements phases.

The most painful part of developing for the mobile web is that not all mobile devices are created equal. Different devices have different hardware capabilities, resolutions, browsers, feature support, touch capabilities—and the list goes on. Adapting your website to deliver a consistent experience across all mobile devices is a nontrivial task.

This chapter will show you how to use the features in the ASP.NET MVC Framework—particularly the new features added in ASP.NET MVC 4—to deliver a rich and consistent experience across as many devices as possible, and to gracefully handle the scenarios where you can’t.

ASP.NET MVC 4 Mobile Features

From version 3, the ASP.NET MVC Framework provides a set of features that help make mobile web development a bit more straightforward. These features were enhanced in version 4.

The following list gives a brief description of each of the mobile development features new to version 4 of ASP.NET MVC. The rest of this chapter will show you how to put these new features to use in your application.

The ASP.NET MVC 4 Mobile template

If you want to create a purely mobile web application ...

Get Programming ASP.NET MVC 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.