Professional ASP.NET MVC 4
by Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen, Scott Hanselman
Mobile Support
Using mobile devices for viewing websites is becoming increasingly common. Some estimates show mobile devices account for 20 percent of web traffic, and it's on the rise. It's important to think about your site's appearance and usability on mobile devices.
There are a variety of approaches for enhancing the mobile experience of your web application. In some cases, you just want to make some minor style changes on smaller form factors. In others you may want to completely change the visual appearance or content of some views. And in the most extreme case (before moving from mobile web application to native mobile application), you may want to create a web application that is specifically targeted at mobile users. MVC 4 provides a range of options to target each of these scenarios:
- Adaptive rendering: The default Internet and Intranet application templates use CSS media queries to gracefully scale down to smaller mobile form factors.
- Display Modes: MVC 4 uses a convention-based approach to allow selecting different views based on the browser making the request. Unlike adaptive rendering, this allows you to change the markup that's sent to mobile browsers.
- Mobile project template: This new project template helps you to create web applications that are intended for mobile-only use.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access