Designing an ASP.NET Web Application

When designing your ASP.NET Web application, it is beneficial to separate the definition of the user interface (UI) from the business logic and the data store. Mobile Web pages, like ASP.NET Web pages, enable you to easily separate rendering from logic. For example, you can place the UI definition in an .aspx file, with the associated event handlers and other UI code in either the same file or in a code-behind class file. You can then place business logic code in separate classes, written in the .NET Framework language of your choice.

A key advantage to separating rendering and logic is that you can reuse code for ASP.NET Web pages and ASP.NET mobile Web pages within an ASP.NET Web application. If you have written an ASP.NET Web application that supports desktop Web browsers, you can use the business logic code also with pages that support mobile devices. You must write one set of Web pages for the desktop, and one set of mobile Web pages for mobile devices, but they can share the same business logic code. To help facilitate this, mobile Web pages are capable of containing multiple forms, so that you can factor your application into similar units for both desktop and mobile UI.

By reusing business logic, you can provide a more integrated experience for your mobile users in these ways:

  • Reducing the cost of development by using common code.

  • Providing fast time-to-market development.

  • Leveraging existing ASP.NET skills.

For example, if you allow a user to customize your Web application, you can share the user profile across your Web application. This allows you to enable scenarios in which the user can configure settings by using a desktop browser, and use those same settings using a mobile device.

Community Additions