LANGUAGES: Visual Basic .NET
TECHNOLOGIES: Wireless Devices | Mobile Internet Toolkit | Mobile Information Server 2002 | Visual Studio .NET | .NET Framework
Develop mobile Internet apps with the Microsoft Mobile Internet Toolkit.
By Steve Milroy
Wireless and mobile solutions are becoming an important focus for many companies. The Gartner Group, an independent provider of IT-related research reports, predicts that by 2004, 65 percent of the top 2,000 companies worldwide will have wireless e-mail and other enterprise-mobility solutions. As the mobile Internet industry expands during the coming years, this market segment represents a solid opportunity for developers, professional services companies, and independent software vendors. My team and I have developed and deployed a number of successful Microsoft Mobile Internet Toolkit (MMIT) applications that have provided great advantages when compared to other mobile technology solutions.
This article covers a number of trends in the mobile Internet industry, as well as considerations for developing and deploying mobile Internet applications. I'll explore the main features of Microsoft's MMIT and the solution it provides. I'll delve into Wireless Application Protocol (WAP) as it relates to mobile Internet solutions and the MMIT. Then, I'll take a closer look at mobile controls, MMIT development, run-time environments, and sample applications. Finally, I'll look at some advanced topics and the integration of the MMIT applications with Microsoft's Mobile Information Server (MMIS) 2002 and other Microsoft .NET servers.
You can use many technologies to create mobile Internet applications, including Wireless Markup Language (WML), Handheld Device Markup Language (HDML), EXtensible HTML (XHTML), Compact HTML (cHTML), and VoiceXML, as well as various embedded and more proprietary solutions where appropriate. Browser-based, mobile Internet applications are similar to existing Web applications in development techniques with hosting on standard Web servers. The technologies involve industry standards such as HTTP and Secure Sockets Layer (SSL).
Developers and organizations face many considerations and challenges when developing and deploying mobile Internet applications. These considerations apply especially to the U.S. wireless-device industry. Considerations include supporting multiple device types, the protocol soup that exists in the industry today, and the many carriers that provide wireless data connectivity. As part of Microsoft's .NET strategy, you can use the MMIT to develop mobile Internet applications that support multiple wireless devices dynamically, as well as different protocols and browser types.
The MMIT is a platform for developing and running mobile Internet applications that specifically target connecting device types, including devices enabled with WML, HDML (through gateway transcoding), XHTML (in the future with a device adaptor), cHTML, Pocket Internet Explorer (HTML), Microsoft Mobile Explorer (MME), and desktop Internet Explorer microbrowsers. The MMIT integrates with Visual Studio .NET and leverages the .NET platform to deliver mobile solutions.
Consider the Challenges
One of the main challenges with mobile solutions is the number of devices, options, and models from which to choose. There are smart phones, WAP-enabled cell phones, pagers, personal digital assistants (PDAs), and many other types of cell phones that support messaging as their only capability for wireless data connectivity. For many enterprise applications and consumer mobile Internet applications, supporting all these device types presents an overwhelming challenge. How can you do it? If you can't, which ones do you want to support? At this stage, it's usually difficult to settle on any device type except for specific line-of-business applications. To support most devices, you'll need to look for standard technologies such as WAP, as well as transformation techniques that can deliver customized content.
The U.S. market has many wireless carriers, and almost all use different network protocols and technologies to deliver wireless solutions. Protocols for wireless data transmission include Global System for Mobile Communications (GSM), Time Division Multiple Access (TDMA), Cellular Digital Packet Data (CDPD), Code Division Multiple Access (CDMA), and Integrated Digital Enhanced Network (IDEN), as well as the Mobitex and DataTAC paging networks. Various second- and third-generation technologies such as General Packet Radio Service (GPRS), Single Carrier Radio Transmission Technology (1xRTT), and Universal Mobile Telecommunications System (UMTS) also have begun appearing with U.S. carriers and will continue to crop up during the next couple years.
Here are the main U.S. wireless carriers (and the technologies they use):
- VoiceStream (GSM and GPRS Class B)
- Cingular (GSM and TDMA, and GSM and GPRS in the near future)
- AT&T Wireless (TDMA and CDPD, moving to GSM and GPRS)
- Verizon (CDMA, moving to 1xRTT)
- Nextel (IDEN)
- Sprint PCS (CDMA and moving to 1xRTT)
As you can see, many carriers offer varying and changing wireless network technologies. So how do you support devices on these different carriers? The key is to look toward a standardized technology, such as WAP, that is carrier- and network-protocol-independent. This will allow you to deploy mobile Internet solutions that work transparently with different device and carrier types now and in the future.
The only way to create mobile Internet solutions that will work with the many types of devices, carriers, and protocols around is to use standardized technologies and transformation techniques that will customize content. The MMIT supports WAP and provides content-transformation techniques, so it is a strong technology for delivering wireless solutions.
Explore the MMIT
Microsoft's MMIT provides an environment for delivering mobile Internet applications rapidly to multiple device microbrowser types - including WML, HDML, cHTML, HTML, and XHTML - through a single application model.
The MMIT and its components are built on top of the .NET Framework and ASP.NET, and they attempt to address the challenges and considerations I've described. The MMIT development and run-time environments combine to provide a complete solution. The development environment contains mobile Web Forms and mobile controls to allow you to develop mobile Internet applications with ease. The Mobile Internet Designer, which is included in the MMIT and Visual Studio .NET, provides a visual IDE for implementing wireless applications rapidly. The run-time environment provides device-identification (through HTTP header detection) and content-rendering capabilities to deliver wireless applications to multiple devices. Here are the MMIT's key features:
- Server-side technology
- Enhanced services that meet mobile needs
- Single application model
- Rich device identification
- Integration with MMIS 2002
- Extends Visual Studio .NET to mobile devices
- Mobile Controls and Visual Studio .NET Designer
- Device emulator support
What is WAP?
Consider why WAP is important to wireless applications. It is a key enabling technology in the MMIT and provides a common, standardized technology for the delivery of wireless applications. As with regular Web development, there are significant differences between Internet Explorer and Netscape Navigator browsers. The same compatibility problem exists with WAP microbrowsers. But, as I am sure you can appreciate, it's more complex with the dozens of devices and browser types in the wireless-device world. Depending on device features and characteristics, MMIT works with these different devices and provides customized WAP content.
WAP is a standard developed by the WAP Forum (http://www.wapforum.org). The standard contains a protocol stack that closely resembles Internet protocols, such as HTTP and SSL, covering OSI layers 3 through 7. WAP protocols are optimized for wireless networks and devices. WML is used for application markup and can be generated dynamically with ASP, XML, and XSLT technologies or, in this case, the MMIT. Standard Web servers host WAP applications. The only real difference is the markup language and MIME type. In July 2001, the WAP Forum released the WAP 2.0 specification publicly. WAP 2.0 supports XHTML as well as other Internet protocols such as Transport Layer Security. As these advances in technology and markup languages are slated for release in commercial devices in late 2002, the MMIT will provide support as part of the .NET Framework through new device adaptors such as MMIT Device Packs. These new devices and technologies will be supported seamlessly, so there's no need to rework or redevelop applications. Finally, a lot of rumors and hype surround WAP and its success or failure in the wireless industry. Most of this is pure speculation. From my perspective, WAP has clear advantages for wireless Internet applications. WAP optimizes the operations of wireless Internet applications significantly over wireless connections; from a user's perspective, the application runs faster and is more responsive. Again, I have deployed effective WAP and MMIT enterprise solutions.
Figure 1 illustrates the components of the WAP architecture. The WAP gateway provides protocol translation and content optimization for the low-bandwidth and high-latency characteristics of wireless networks. The origin server in Figure 1 would be a Windows-class (2000 or XP) server that has the .NET Framework and MMIT installed for run-time execution of the mobile Internet application.
Figure 1. Note that the client in the WAP architecture is any WAP-enabled device, such as a cell phone, smart phone, pager, or PDA. The gateway is the WAP gateway, which typically is implemented and controlled by the carrier (especially in the United States).
Mobile Web Forms comprise the foundation for developing a mobile Internet application with the MMIT. Mobile Web Forms provide support for mobile devices through the .NET Framework, extend Microsoft's current tools and application model to mobile devices, and enable third-party extensibility. Mobile Web Forms work in much the same way as regular Web Forms do within ASP.NET. From Visual Studio .NET, you drag and drop mobile controls onto mobile Web Forms, which represents functionality in the run-time application I'll explain next.
Learn the MICR
The production environment for running mobile Web Forms is called the Mobile Internet Controls Runtime (MICR). The MICR has many features that optimize the delivery of wireless applications to multiple device types. It allows your application to render content based on device capabilities, output multiple markup languages, and take advantage of ASP.NET and .NET Framework services.
The mobile controls in the current run time are: AdRotator, Calendar, Call, Command, CompareValidator, CustomValidator, Form, Image, Label, Link, List, MobilePage, ObjectList, Panel, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, SelectionList, StyleSheet, TextBox, TextView, and ValidationSummary. (A description of the in-depth functionality of these mobile controls is beyond the scope of this article.)
If you're familiar with WML, many of these run-time controls map directly to WML functionality. For example, the Call control allows Wireless Telephony Application Interface (WTAI) functionality, wherein you can dial a call directly from a wireless application where devices support this functionality. The Form control relates to a WML card, and the entire file of controls in the aspx file is analogous to a WML deck. You can combine these simplified mobile controls within your application, reducing the need to learn in-depth details of WML and other wireless markup languages.
The code in Figure 2 shows the components of Mobile Web Form Controls. The code shows a simple, one-page application example as the start of an enterprise mobile intranet application. This file is named default.aspx and would run from the appropriate directory on the .NET Framework Web server. As you can see, there is a Welcome form, which has a logo and link to the Login form. Within the Login form are several controls, such as Label, Textbox, and Command. This login form is a typical one in which the user enters a username and password and selects the Login button. This calls the Login_OnClick subroutine to perform necessary login business logic. You should use the Codebehind property of the page directive and keep all programming logic in another VB file, separating the presentation and business logic. Then, the user is presented with the main menu, which allows him or her to select Outlook Email, Client List, Timesheets, Expenses, etc. The key to any mobile application is to give users access to specific, specialized, corporate information. This example shows typical mobile-enterprise application functionality. As you will see later, this single code example is rendered to different markup languages depending on the device capabilities.
<%@ Page Language="vb" AutoEventWireup="false"
<%@ Register TagPrefix="mobile"
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" %>
Welcome to the Immedient Mobile Intranet
Figure 2. default.aspx runs from the appropriate directory on the .NET Framework Web server. You should use the Codebehind property of the page directive and keep all programming logic in another VB file, thus separating the presentation and business logic.
Mobile controls allow you to develop mobile applications easily. The controls are placed in the ASP.NET page and relate to features in the run-time environment. For example, the Label control allows you to put a heading at the top of the screen to describe the feature of the application. Then you can see this Label control at run time in the MME (cell phones) and Pocket IE (Pocket PCs). The control is customized depending on the device capability.
To the Drawing Board
You can develop mobile controls with various IDEs, including text editors and other Web-development environments. Microsoft includes a visual IDE, the Mobile Internet Designer, for developing mobile Internet applications in the MMIT. The designer is part of Visual Studio .NET and is installed when you install the MMIT (see Figure 3). Because the designer is part of Visual Studio .NET, you have the full debugging capabilities you would have for standard ASP.NET Web applications. You can manage code as part of the mobile solution in the same mechanism as with any Visual Studio .NET application, and you can use any of the programming languages available in Visual Studio .NET to create a wireless application. I am most familiar with VB, but if you prefer C++, C#, or JScript, you can leverage these languages for developing wireless applications.
Figure 3. The Mobile Internet Designer in Visual Studio .NET has full drag-and-drop and debugging support. It lets you use any language from VS .NET to create wireless apps.
Debugging can be challenging in typical mobile Internet applications. This is primarily because most devices are not capable of displaying rich error messages, such as "An error has occurred." Moreover, debugging most existing mobile Internet and Web technologies can be especially tricky. The MMIT features some great debugging features in the Visual Studio .NET Mobile Internet Designer. You can get rich error messages and even insert breakpoints, allowing you to step through your code line by line. It has reduced development cycles significantly because you can solve errors quickly.
Figure 2 demonstrates a simple mobile intranet application you could implement for access to enterprise data sources. Consider how that application renders in the run-time environment. For the example shown in Figure 4, it is important to note that the MMIT Mobile Controls code is identical for producing the application running in the WAP phone and Pocket PC. For the WAP phone, MMIT returns WML; for the Pocket PC, MMIT returns simple HTML.
Figure 4. Here is the Main Menu in the WAP phone and Pocket PC. For the WAP phone, MMIT returns WML; for the Pocket PC, MMIT returns simple HTML.
Pagination is a term that describes automatic data grouping depending on device capabilities. You can use the built-in paging properties in the MMIT, or you can define custom pagination. For example, if a WAP phone supports only 10 lines of data display, you can make the application limit data lists automatically to 10 lines. If there are more than 10 lines of data, it creates "next" and "back" options automatically so the user can move through the data set customized for the connecting device.
Style sheets are used automatically within a mobile Internet application to render content appropriately. In addition to the automatic styles that exist within the MMIT, you also can use external style elements to customize application content to specific devices. You can use one style sheet per mobile Web Form and allow the customized properties of all mobile controls.
You can create device-specific content within the MMIT, too. This involves using the DeviceSpecific control within your application and applying different filters depending on the connecting device. For example, if an HTML-enabled browser is used for connecting, images can be returned in gif or jpg format. These image types are not supported in WAP applications, however, so a Wireless Bitmap (wbmp) image would be returned to WAP-enabled devices.
As with any ASP.NET application, you also can create custom controls to use within your application. These can be user controls, which look like any mobile Web Form element, or custom controls that allow you to define and customize content in some way.
Microsoft has included many features for developing and extending your mobile Internet applications. As this environment matures following the release of Visual Studio .NET, you'll start to see many vendors offering custom mobile controls and programming components, making it even easier to deliver cutting-edge, mobile Internet applications.
Integrate the MMIT
Because an MMIT application is in most ways like any other ASP.NET application, you can integrate MMIT solutions easily with various data sources and other .NET servers. In addition, you can integrate the MMIT with MMIS 2002.
MMIS 2002 is a platform for delivering mobile applications. Currently, MMIS is a standalone product allowing mobile and wireless access to Microsoft Exchange and other enterprise mobility solutions. MMIS provides an integrated environment that includes enhanced security mechanisms and direct, back-end integration with the Active Directory. You can use MMIS Enterprise for deploying MMIT applications securely. Within the next year, MMIS features will be integrated directly into other .NET servers, such as Exchange 2000 and ISA 2000. All the features and capabilities available today will be available directly with relevant .NET servers.
feature included in the MMIS platform is Intranet Browse (which will be part of
ISA in the future). It allows wireless Internet access to intranet-hosted WAP
and, hence, MMIT applications. Otherwise, to access your MMIT applications from
typical wireless, Internet-enabled devices, you would need to host applications
on public Web servers. Most companies do not want to expose intranet content
directly to the Internet, so access with MMIS Intranet Browse is most
appropriate. After you've developed, tested, and deployed your mobile controls
application with the MMIT, you could access these applications using MMIS. The
application would be hosted on an intranet Web server that is configured with
the .NET Framework and the MMIT. Then, using MMIS, you would access the
application from an Internet-enabled device with this URL format: http://
The MMIT environment supports many device types automatically using the built-in device filters. You can find a list of supported and tested devices at http://msdn.microsoft.com/vstudio/device/mitdevices.asp. Additionally, Microsoft plans to release device updates regularly that extend the list of supported devices. You would download and install device updates in the MMIT environment. You can find more information about the device updates at http://msdn.microsoft.com/vstudio/device/mitdrivers.asp.
Start Your Engines
Here's what you need to do to start developing and deploying MMIT applications. First, get Visual Studio .NET and install the MMIT on a development machine. Then you need to install the MMIT separately. Now you can use the Mobile Internet Designer in Visual Studio .NET and develop and execute mobile Web Forms locally on your machine.
Next, because most mobile Internet devices are capable only of creating an Internet connection and not a Remote Access Service (RAS) or Virtual Private Network (VPN) connection, you need a publicly accessible Web server for testing and deploying your mobile Internet application. You must have the .NET Framework installed on a production Web server, as well as the server components from the Visual Studio .NET environment. As I described previously, you also can access the application using the MMIS Intranet Browse functionality.
The first step in creating any mobile Internet application is to design the components of the application visually. Create the necessary forms and navigation for operating the application using various wireless devices. Once you define the application flow, start programming the necessary business logic with your choice of programming languages, which is normally developed using the code-behind functionality in .NET.
Now choose the programming language you are most familiar with (VB is probably the easiest for someone getting started). Programming the mobile Internet application is similar to creating a standard ASP.NET Web application.
As part of your development cycle, test the functionality in target devices regularly to ensure you are on track. For simplicity's sake, you also can use a device emulator, such as the MME emulator, which provides a way to test features and functionality using a desktop simulator of target devices.
In the near future, mobile applications will be an important part of most enterprise solutions. The MMIT is a solid platform for delivering mobile Internet solutions. When Visual Studio .NET and the MMIT are released, the MMIT will allow integrated development of mobile Internet applications. The combination of the MMIT and MMIS 2002 provides a solid solution for developing and delivering enterprise mobile Internet applications. As these products mature, I doubt many other solutions will approach Microsoft's mobility strategy. Install Visual Studio .NET and the MMIT to start developing your mobile Internet applications today.
Steve Milroy is a mobile, wireless, and voice technologist. He works for Immedient, a nationwide e-solutions company, and works on a number of WAP, VoiceXML, and wireless middleware projects. Steve has presented at developer conferences and to user groups and business associations on various wireless development and infrastructure topics. Originally from Sydney, Australia, Steve now resides in the United States. His experience in the Australasian and U.S. markets gives him a broad and unique view of wireless trends around the world. E-mail Steve at mailto:[email protected].
In addition to the MMIT, Microsoft is developing Other Integrated Mobility Solutions as part of the company's .NET strategy that will provide complete mobility solutions. These solutions include the Windows smart phones, MMIS, Pocket PC 2002, and other components of the .NET Framework such as the Compact Framework (.NETcf). These technologies will provide a Common Language Runtime (CLR) for the use of applications across multiple Windows platforms. The .NETcf platform is under development (beta 1 is available now). .NETcf is a platform for developing rich applications (typically for Pocket PC) that run locally on the device and could exchange information with enterprise systems in a store-and-forward mechanism. .NETcf technology typically would be aimed at specific line-of-business functionality such as mobile delivery automation, where the device can be standardized on the Pocket PC or Windows CE platform. For more information on .NETcf, see http://msdn.microsoft.com/vstudio/device/sdebeta.asp.
Overall, these integrated technologies will provide a solid framework for delivering end-to-end mobility solutions. Many vendors have strategies similar to Microsoft's for mobility solutions, but some of them likely will disappear during the next couple years. I recommend you choose a vendor with experience in solution technology and a potential for future enhancements.
As developers and technology professionals, you should evaluate the potential of any new technology before investing time and effort in learning, gaining experience, and developing solutions.
One of the best case studies for the potential of wireless Internet applications is NTT DoCoMo - Japan's largest wireless-device carrier. In February 1999, NTT DoCoMo released a wireless Internet service called i-mode. Since then, i-mode has grown to more than 30 million subscribers, and it continues to gain 50,000 users a day. When mobile and wireless services are developed, targeted, and marketed properly, they can be extremely popular with users. By combining technology, solution, and strategy effectively, killer wireless applications can be a reality.
Finally, it's a common belief that the U.S. wireless market is far behind those of Europe and Asia, but the U.S. market does have some innovative wireless solutions that are leading the global market. Overall, enterprise-mobility solutions are much stronger in the United States, whereas Asia and Europe are consumer-oriented. As a result, the potential for developers in the U.S. market is quite significant in any enterprise that needs mobility solutions.
Tell us what you think! Please send any comments about this article to [email protected]. Please include the article title and author.