Application Development Overview (Devices)

Developing smart device applications does not differ significantly from developing desktop applications. This topic provides an overview of the major steps in developing a smart device application and points out some of the differences between developing desktop applications and smart device applications.

  • Design Considerations

  • Working with devices and emulators

  • Build the Application

  • Security Considerations

  • Package and Deploy the Application

  • Device vs. Desktop

Design Considerations

Smart Device Solutions and Windows CE

To better understand the relationship between Windows CE, Pocket PC, Smartphone, and Windows Mobile software, see Learn Windows Mobile in the Windows Mobile Developer Center. For more information, see Design Considerations for Smart Device Development.

Version Compatibility

To identify which versions of tools and technologies work together in developing device applications, see Introduction to Development Tools for Windows Mobile-based Pocket PCs and Smartphones. Managed projects must target version 2.0 or 3.5 of the .NET Compact Framework.

Design Guidelines

How you design your device application determines how easily, quickly, and efficiently a user can complete tasks. By optimizing your application to take advantage of the capabilities of different devices, you can provide the best user experience by creating a more usable, consistent, responsive, and easy-to-use application. For detailed design guidelines about specific interface features, see the software development kit (SDK) for your device and our own smart device section

Working With Smart Devices and Emulators

Device Emulator

The Device Emulator is designed specifically for Visual Studio device projects. It runs applications compiled for the ARM instruction set and runs as a user-mode process. Visual Studio provides a Direct Memory Access (DMA) transport to communicate with the emulator. Surpassing the traditional TCP/IP transport, the DMA transport is faster, does not rely on network connectivity or other external factors, and provides deterministic connection and disconnection.

Visual Studio includes emulator images for Windows Mobile 5.0 and Windows Mobile 2003. Additional emulators are installed when you install additional SDKs such as Windows Mobile 6.

To open the emulator, on the Tools menu, click Connect to Device, select the emulator you want to open, and then click Connect.

Connecting to Devices

Visual Studio uses the core connectivity framework to establish a secure and reliable connection between the development computer and the target device. Visual Studio uses this connection to deploy files and debug applications on a device or emulator. For more information, see Connecting Smart Devices to Development Computers.

Building, Debugging, and Testing Device Applications

Managed Applications

You can use Visual Studio to write applications that target version 2.0 or version 3.5 of the .NET Compact Framework by using either the Visual C# or Visual Basic programming languages. Smart device applications reference assemblies in the .NET Compact Framework and are executed on the device by the.NET Compact Framework's common language runtime.

To aid development, Visual Studio offers the following features:

Native C++ Applications

You can use Visual Studio to write smart device applications that run natively on a device by using the Visual C++ programming language. For more information, see Programming for Devices Using Visual C++.

Security

Windows Mobile Application Security

Smart device developers must consider how different security configurations affect the execution of their applications. Your application may not be able to run if it is unsigned or signed with a certificate that is not present on the user's device. For more information, see Security in Device Projects.

Other Security Considerations

The remote connection aspect of device applications introduces additional security issues. For more information, see Security in the .NET Compact Framework and Security in Native and .NET Framework Code.

Packaging Your Application for Deployment

Visual Studio provides tools to package your smart device application into a CAB file or into a desktop MSI installer. For more information, see Packaging Device Solutions for Deployment.

Device versus Desktop

You use the same Visual Studio integrated development environment (IDE) that you use when you develop applications for the desktop, but you will notice some differences when you target devices.

  • The Visual Studio IDE provides additional tools for connecting to and debugging on a device.

  • Besides selecting a project type and template when you create a project, you must select a device on which to run and debug the application. The device can be a physical device connected to the development computer, a networked device, or a device emulator running on the development computer.

  • The number and members of classes differ from what is available for developing desktop applications. In managed projects that use the .NET Compact Framework, fewer classes are available for devices, and the complement of classes typically differs among platforms. The same is true for native projects, where only a subset of Windows APIs, MFC classes, or ATL components is available. You can determine which classes are available by viewing the documentation, by using IntelliSense, or by using the Visual Studio Object Browser when your project is active.

  • As with desktop applications, you can access native code by using platform invoke. The .NET Compact Framework provides limited support for COM interop. It does not support creating COM objects in managed code or interoperating with ActiveX Controls.

  • Some language items can differ; for example, some Visual Basic keywords that are used for desktop development are not supported.

  • Some code snippets and examples provided in Visual Studio documentation for desktop projects may generate build errors in device projects.

  • There are design considerations, such as the form factor of the device, power usage, memory constraints, and other details, that are not factors for desktop development.

Additional Resources

For more information, visit the Mobile Developer Center.

See Also

Other Resources

Getting Started with Smart Device Projects