This Web Application Toolkit is designed to demonstrate how to extend an existing ASP.NET MVC Web application to provide access from mobile devices. To enable mobile access, the Web application should have views targeting each of the mobile devices to be supported. The MVC pattern helps you create applications that separate the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements. The pattern specifies where each kind of logic should be located in the application. The UI logic belongs in the view. Input logic belongs in the controller. Business logic belongs in the model. This separation helps you manage complexity when you build an application, because it enables you to focus on one aspect of the implementation at a time. For example, you can focus on the view without depending on the business logic. In this Web Application Toolkit we use the MVC pattern to create several views targeting different kind of browsers reusing the same business logic. For this implementation, we use the ASP.NET MVC framework which provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based Web applications. The ASP.NET MVC framework is a lightweight, highly testable presentation framework that is integrated with existing ASP.NET features, such as master pages and membership-based authentication. For extending the Web application to use mobile specific views, this sample provides a reusable component called MobileCapableViewEngine that enables the Web application to show the appropriate view depending on the device's browser that is performing the request.
|