Introducing Mobile Web Applications XML

Mobile Web applications, as the name suggests, are applications that you can access from a mobile device, such as a mobile phone or a Pocket PC. In today's dynamic business scenario, it is essential that users not be limited to accessing their data or the Internet only from their personal computers at home or at the office. Instead, it has become a necessity to be able to access their personal or business data and Internet from anywhere at any time. Users should have the capability to access their data or an Internet site from their mobile devices. This can be achieved through the use of mobile Web applications.

Until recently, mobile Web applications were not widely used, mainly because of certain limitations of mobile Web applications, as discussed in the following list:

  • Due to the small size of a mobile device's screen, it's difficult for users to access and navigate a Web page from their mobile devices.
  • Accessing a mobile Web application from a mobile device requires higher bandwidth than is available. For example, mobile phones offer a bandwidth of 9.6 kbps, which is not sufficient to transfer large data. This increases the overall cost of running the application from a mobile device.
  • You cannot access a mobile Web application from a mobile device for an extended time because of the mobile device's short battery life and limited memory capacity. Therefore, mobile devices cannot be a primary mode of accessing applications; however, you can use mobile devices to access applications whenever required.

To enable users to benefit from a mobile Web application, the .NET Framework allows you to create mobile Web applications that you can access from a mobile device without much problem. In addition, you can optimize these mobile applications for the capabilities of the targeted device.

You can create mobile Web applications that you can access in the same way that you access a Web page from a browser window. In addition, a mobile Web application that you create by using the .NET technologies allows you to access a Web application from a mobile device. This caters to a user's requirement of accessing an application or a Web site from a mobile device. We will discuss the technologies that have made this possible in the later section "The Transfer Protocols for Accessing Mobile Web Applications."

However, Visual Studio .NET does not allow you to create mobile Web applications by default. To be able to create a mobile Web application in Visual Studio .NET, you first need to install the Microsoft Mobile Internet Toolkit. The following section discusses the Microsoft Mobile Internet Toolkit in detail.

The Microsoft Mobile Internet Toolkit

The Microsoft Mobile Internet Toolkit is an easy-to-use toolki based on the .NET Framework that you install on your machine to create mobile Web applications. You learned to create ASP.NET Web applications by using Visual Studio .NET. The Mobile Internet Toolkit makes creating mobile Web applications as simple as creating ASP.NET applications in Visual Studio .NET. This is because the Mobile Internet Toolkit provides you with the tools that you can use to create, test, and deploy a mobile Web application. Using the tools provided by the Mobile Internet Toolkit, such as controls and components, you can create the mobile Web forms that are the building blocks of a mobile Web application.

Following are the features of the Mobile Internet Toolkit that make it easy to create mobile Web applications in Visual Studio .NET:

  • To create the mobile Web forms, the Mobile Internet Toolkit provides a toolbox that contains several controls. To add these controls to the form, you can drag the controls onto the form. You will learn about various mobile Web controls in the section "Mobile Web Form Controls." Figure shows the toolbox provided by Visual Studio .NET to add controls in a mobile Web form.
  • The Toolbox Containing Mobile Web Controls

    The Toolbox Containing Mobile Web Controls

  • The Mobile Internet Toolkit contains a visual tool for creating mobile Web applications called the mobile Internet designer. You can integrate this tool easily with the Visual Studio .NET IDE. Figure shows the mobile Internet designer.
  • The Mobile Internet Designer

    The Mobile Internet Designer

  • The Mobile Internet Toolkit converts the code written for a mobile Web application in any of the .NET languages, such as Visual Basic .NET or Visual C#, to the managed code that is used to debug and deploy applications that are created in Visual Studio .NET.
  • The major advantage of using the Mobile Internet Toolkit is that it allows you to create a common code for mobile Web applications that you can access from various mobile devices. This implies that if you create a mobile Web application for a mobile phone, you can access the same application from any other mobile device, such as a PDA or a pager.

After you write a code for a mobile Web application, the code adapts to the features of the mobile device from which the application is accessed. These features of the mobile device include the bandwidth, screen size, memory, and processor capacity.

Although the code of a mobile Web application that you access from various mobile devices is the same, the Internet protocols used to transfer mobile Web applications are different for different devices. For example, the transfer protocol for a mobile phone is WAP and for a PDA it's TCP/IP.

  • As discussed earlier, the Mobile Internet Toolkit allows you to create mobile Web applications that can display Web pages on a mobile device. You create these mobile Web pages in the form of mobile Web forms that contain mobile Web controls. After you create a mobile Web form, the controls in the Web form are broken down into smaller units called screens. You can then display the content of the Web site in these screens. The mobile device from which you access the application determines the size of the screens that are created. Figure shows a mobile Web form with a control added.
  • The Mobile Web Form with a Control Added

    The Mobile Web Form with a Control Added

  • You can access easily the Mobile Internet Toolkit by using an emulator that can test a mobile Web application. You can test the mobile Web applications that you create in the Internet Explorer window and an emulator.

An emulator is a device that simulates the mobile Web application environment on your personal computer. To do this, you first need to install an emulator and emulator software on your machine. Figure shows an emulator for a mobile phone.

A Mobile Web Form Emulator

A Mobile Web Form Emulator

You've probably noticed the ease that the Mobile Internet Toolkit provides you for creating mobile Web applications. However, as discussed earlier, Visual Studio .NET does not allow you to create mobile Web applications by default. This is because the Mobile Internet Toolkit does not come as part of Visual Studio .NET. You need to install the Mobile Internet Toolkit. You can install the Mobile Internet Toolkit on any machine that runs Windows NT or higher and has the .NET Framework or Visual Studio .NET installed on it.

After you install the Mobile Internet Toolkit, several project types are added to the New Project dialog box. These project types include Pocket PC Application, Pocket PC Class Library, Pocket PC Control Library, Mobile Web Application, and Mobile Phone Application. Figure shows the New Project dialog box with new project types added.

The New Project Dialog Box with New Project Types Added

The New Project Dialog Box with New Project Types Added

The Transfer Protocols for Accessing Mobile Web Applications

As discussed earlier, different protocols are used to transfer mobile Web applications on different mobile devices. These protocols include TCP/IP, WAP, HTTP, and so on. This section discusses some of these protocols.

TCP/IP

As the name suggests, TCP/IP is a set of protocols that transfers data over the network. This implies that TCP/IP defines the set of rules to follow while you're transferring data across computers over the network. In addition to transferring data over a network, TCP/IP allows you to share resources and enable communication across computers over the same network or different networks. Therefore, TCP/IP is a platform-independent protocol that can transfer data over networks in the form of data packets. For example, you can use TCP/IP to transfer data from a computer that is running Windows to another computer that is running DOS, Unix, or NetWare.

When you need to transfer data across a network, TCP/IP breaks the data into smaller data packets that you can transfer over the network easily. Then, at the receiver end, the data packets are reassembled to produce the original data. The IP address of the destination location defines the address of the location to which the data packets need to be transferred. As discussed earlier, TCP/IP is the transfer protocol that accesses a mobile Web application from a PDA or other device that supports TCP/IP-based network communication.

WAP

WAP is the transfer protocol that accesses a mobile Web application from a wireless device, such as a mobile phone. In addition, WAP allows you to access an Internet site from a wireless device. However, to be able to access a mobile Web application or an Internet site from a wireless device, you need to have a WAP-enabled mobile device.

In earlier sections, we discussed the problems that the users face while accessing traditional mobile Web applications from a mobile device. These problems include higher bandwidth requirements, higher processor and memory capacities, and smaller screen sizes. As a solution to these problems, the WAP Forum developed an industry standard that defines the set of rules for communication between wireless devices and the application developed to be accessed from a wireless device. A WAP-enabled device has features that are appropriate for accessing mobile applications. These features include limited memory, a battery, and the ability to utilize maximum processor capacity. As a result, it has become significantly easier to access an application or an Internet site from a WAP-enabled device.

Having introduced you to the WAP technology, we will now discuss the WAP architecture that makes it possible to transfer a mobile Web application to a wireless device.

The WAP Architecture

The WAP architecture is a three-layered structure that includes a client, a server, and an intermediate layer. This intermediate layer includes a WAP gateway, which is an interface between the client and the server. A WAP gateway is software that comprises encoders and decoders used to transmit data in the format that the receiving device understands. This is made possible because of the support that the WAP gateway extends to technologies such as WML (Wireless Markup Language) and XML (Extensible Markup Language). These markup languages define the format for displaying data and describe the data to be displayed in a text format.

When a client—a wireless device in our case—sends a request to the server, a connection is made to the WAP gateway. The encoders that are present in the WAP gateway then encode the request as per the transfer protocols. The request is then transferred to the server, and the server sends a response to the client in the form of a site that the client requested. However, the server can process only the request made for a WAP-enabled Web site. See Figure so that you can more easily understand this architecture.

The WAP Architecture

The WAP Architecture

A discussion of the Web architecture will enhance your understanding about the WAP architecture, so we will discuss it next. Learning about the Web architecture will also help you appreciate its similarities to the WAP architecture.

The Web Architecture

The WAP architecture is similar to the Web architecture. However, the Web architecture does not include the intermediate layer, which is the WAP gateway software in the WAP architecture.

In the Web architecture, the client sends a request to the Web server in the form of the Internet address of the requested Web site. The server processes the request and sends the response in the HTML format to the client. Figure shows the Web architecture in detail.

The Web Architecture

The Web Architecture


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML Topics