ASP.NET MVC 4 Mobile Features

Posted on

The Apple iOS (iPhone and iPad) uses Objective C, Google Android uses Java and Windows Phone uses Silverlight, yet each one of these options has a distinct API and a distinct market. Choosing to focus on one particular technology stack could leave 50 percent of the market—or more—unable to use your application. If you choose to try to support all of these platforms, you have at least three distinct codebases to maintain, significantly increasing your development and maintenance costs.

The Hybrid Application Concept

The basic concept of a hybrid application is to wrap a mobile-optimized Web application in a device-specific native application shell. The native application shell hosts a Web browser control that’s configured to launch the specific mobile application URL when the shell application launches. Other UI elements can be provided in the native application shell as needed, but only the Web browser control is required. The native Web browser control then listens to the URLs being requested as the user navigates the site. When the user requests a specific URL that requires native functionality, the Web browser control interrupts the navigation event and instead invokes the native functionality. As the user completes the native process, the application navigates the Web browser control back into the Web site flow in the appropriate location.

ASP.NET MVC uses the Model-View-Controller architecture pattern, which consists of three components – the model, the view and the controller.

The model is the core component that actually implements the logic of a particular data aspect of the application. The model’s logic is implemented in the controller component, which facilitates changes to the model. The controller passes the new information to the view, where it is displayed in the user interface. This pattern simplifies the process of application creation and use because it keeps the different logic layers of the application (input logic, business logic and UI logic) separated. Application building is complex, but the MVC pattern facilitates focus on just one aspect at a time. This greatly reduces potential complications and also allows for increased interoperability between developers.

The Benefits of MVC vs Traditional ASP.NET

The traditional ASP.NET framework uses WebForms to build Web application user interfaces. They help mete out the HTML interface from the application logic and bind server-side .NET controls to reduce the amount of code required. However, MVC improves on the capabilities of ASP.NET and accelerates the deployment and usage of the framework in enterprise Web applications. The benefits include:

  • Simpler and more efficient page lifecycle
  • Availability for multiple forms on a page
  • Improved Ajax functionality and efficient jQuery page loads
  • Ability to conduct multiple tasks on the different forms of a page
  • Total control over HTML and better interaction with JavaScript
  • Easier visibility into system bugs and more streamlined process of identification and correction
  • Future-proof as new developments such as HTML5 become more commonplace

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s