.NET Compact Framework Overview

In previous Mobile & Wireless Perspectives columns, I've talked briefly about the Microsoft .NET Compact Framework. The Compact Framework is officially part of Microsoft Visual Studio .NET 2003, which is due for release in the near future. Considering this pending release, I think now is a good time to provide an overview of the Compact Framework. In the next couple of Mobile & Wireless UPDATEs, I'll explore the Compact Framework's features, uses, and best practices.

As its name implies, the Compact Framework is a trimmed-down version of the Microsoft .NET Framework that targets small computing platforms such as Pocket PC and the Windows Powered Smartphone. The Compact Framework significantly enhances the development capabilities of the current Microsoft Embedded Visual Tools technology, which involves using either eMbedded Visual C++ (eVC) or eMbedded Visual Basic (eVB) for development. One of Microsoft's goals for the Compact Framework was to create a development/application environment as powerful as eVC and as easy to use as eVB so that you get the best of both worlds.

The Compact Framework is one of two ways you can perform mobile development in .NET. To understand when and why you should use the Compact Framework for enterprise solutions, you should have a grasp for the alternative .NET development environment: Microsoft ASP.NET Mobile Controls (formerly known as the Microsoft Mobile Internet Toolkit--MMIT). ASP.NET Mobile Controls is a server-based adaptive-rendering technology, which permits many device types to connect to an application in a real-time or microbrowser-based scenario. ASP.NET Mobile Controls is a terrific technology for implementing solutions quickly, but it has significant limitations, such as the requirement of a constant wireless connection to access the application and the lack of support for peripherals (e.g., barcode scanners). The Compact Framework, in contrast, is a rich application environment in which the application and database run locally on the device. The Compact Framework also lets you use barcode scanners, magnetic stripe readers, mobile printers, and advanced features such as signature capture. Therefore, for most enterprise mobile solutions (e.g., field force automation, sales force automation), the Compact Framework is your best choice.

The Compact Framework consists of two primary components: the development environment and the runtime environment. The development environment, known as Smart Device Extensions, is a new Visual Studio .NET 2003 project type that lets you rapidly create Compact Framework applications by simply dragging appropriate controls into your application. You can then take the code that this visual design environment creates and further modify and compile it for debugging and application deployment. The application runs in the second component, the Compact Framework Common Language Runtime (CLR), as managed code. This Compact Framework CLR is already available on many new Pocket PC devices; alternatively, you can install it separately on earlier devices. The size of the CLR and relevant class libraries is smaller than 2MB, so it's well suited to mobile devices. Microsoft is also working on a CLR for Windows Smartphones.

My team and I have used the Compact Framework to deploy several delivery-automation applications on the Pocket PC. However, we've struggled with the following hurdles: -- The Compact Framework is still a beta product. As I mentioned, Microsoft will officially release the product as part of Visual Studio .NET 2003. -- The Compact Framework supports only Pocket PC. The product doesn't support devices from Palm, Research In Motion (RIM), or other vendors. -- The Compact Framework is missing some useful Framework functionality. For example, the product doesn't natively support XPath or .NET Remoting. To get the CLR and class libraries under 2MB, Microsoft needed to remove several features of the full Framework.

In my next Mobile & Wireless Perspectives, I'll continue to delve into the features and functionality of the Compact Framework. If you've already deployed some Compact Framework applications, I'd love to hear about them. See you next time.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.