New Advances in .NET Mobile Technologies
How do Whidbey, ASP.NET 2.0, .NET Compact Framework 2.0, and MapPoint change the mobile development landscape?
by Michael Juntao Yuan
TechEd, May 26, 2004
.NET developers all over the world have been eagerly awaiting the release of Visual Studio 2005 (code-named Whidbey). For .NET mobile developers, the new release is especially exciting because many of the new features are perfectly suited for device development. TechEd's Mobile PC and Devices track spotlights Visual Studio 2005 along with the new mobile technologies .NET Compact Framework 2.0 and MapPoint Location Server.
If you're a Wireless Application Protocol/Wireless Markup Language (WAP/WML) developer in the ASP.NET 1.x world, you probably use the ASP.NET Mobile Internet Toolkit, which supports more than 230 devices out of the box. However, the special mobile controls in the Mobile Internet Toolkit require you to write separate view pages for devices and hence reduce the chances for code reuse. This is no longer the case!
ASP.NET Controls
ASP.NET 2.0, included in Visual Studio 2005, features a new "Unified Control Architecture." It supports pluggable adaptors to render any controls—not just the mobile controls. Mobile developers can now use any ASP.NET controls on all their pages and let the runtime engine decide which rendering adaptor to use based on the access device type. In fact, the <mobile> controls are being depreciated. This enhancement improves productivity for Web front-end developers because a single set of pages can now take care of a wide range of devices from PC to WAP phones.
.NET Compact Framework 2.0 Features
If ASP.NET enables pervasive clients down to the smallest phones, the .NET Compact Framework enables smart clients on Windows Mobile devices. The big trend in mobile application development is the move from Web-based thin clients (such as WML browsers) to smart clients that can operate in occasionally connected wireless network environments. Smart clients support rich user interfaces and allow developers to choose from a variety of integration schemes that would maximize network efficiency. Since its announcement in 2003, the .NET Compact Framework is replacing eMbedded Visual C++ (eVC) and eMbedded Visual Basic to become the most important platform to develop applications that run on Pocket PC and Microsoft Smartphone devices.
The .NET Compact Framework 2.0 sees significant performance improvements over version 1.0. It adds several user interface controls to the Windows Forms library that prove beneficial in mobile applications. Examples include the embedded Web browser and calendar date picker. New generations of Windows Mobile devices feature a variety of screen resolutions and orientations. The new Windows Forms library allows the application to capture screen change events, adjusts the visual control sizes, and adds scrollbars automatically.
A key advantage of the .NET Compact Framework over other mobile smart-client platforms is its rich support for XML Web services. The .NET Compact Framework 2.0 adds support for IPv6, SOAP 1.2, WS-Security, XPath, and mapping schema to C# classes, as well as an improved model for asynchronous Web service invocation. The .NET Compact Framework 2.0 also provides better support for local on-device data stored in the SQL Server CE databases. It supports typed direct access to the new version of SQL Server CE (version 3.0, code-named Laguna) through the SqlCeResultSet API.
VS 2005 Dev Tools
The mobile development tools in Visual Studio 2005 are also greatly improved. Most noticeably, Visual Studio 2005 now supports mixed development and debugging of both managed .NET Compact Framework code and native eVC code in the same project. This allows developers to seamlessly take advantage of low-level device features not yet exposed in the managed API in .NET Compact Framework applications.
The new visual designer for mobile devices is much better than that in Visual Studio 2003. You can see the entire device, access all the hardware buttons, and see how the control layout changes when you change the device orientation at run time (see Figure 1).
The device emulator support in Visual Studio 2005 is also improved. For example, you can now have shared folders between the emulator and the host computer; four COM ports are now available on each emulator instance. Among the generic Integrated Development Environment (IDE) feature improvements, the new IntelliSense can accurately report the unsupported .NET APIs in the Compact Framework; the new MSBuild supports a finely grained build process for multiple device targets.
Mobile Smart Clients
Smart clients are not traditional rich clients. Smart clients are often Web services-driven, and they delegate computationally intensive tasks to servers. For mobile smart clients, it's important to leverage network services provided by the network operator to make the mobile experience unique. One such key mobile network service provides the location information. Wireless network operators can locate any device in their network through base stations.
However, it is a major challenge for device users to retrieve and share such location information. The new Microsoft MapPoint Location Server (MLS) makes it easy to interoperate with multiple network operators to locate any device in real time. MLS provides a rich set of administration and privacy management tools for managing location information inside a large enterprise. MLS also integrates with the MapPoint Web Service to provide both the location and Geographic Information System (GIS) services through a single set of Web service APIs. It's possible to locate devices and render maps through MLS in a Pocket PC-based .NET Compact Framework smart client (see Figure 2).
About the Author
Michael Yuan is a leading industry expert and academic researcher in end-to-end mobile applications. He is the author of Enterprise J2ME (Prentice Hall, 2003). Visit Michael's blog at http://www.enterprisej2me.com/blog/ms/.
Back to top
|