Windows Mobile application development

by jnxyz
Windows Mobile application development
Mobile and compact devices become more and more popular in our society. Each of us faces with them every day. Certainly each of us has mobile phone, hand-held computers or other hi-tech devices.
All of these devices have different mobile platforms. There are such known platforms as Windows MobileM, iPhone, BlackBerry, Symbian OS, Android, Maemo, OpenMoko etc. All of them have different history and advantages and failings.
Introduction
Such platforms as Windows Mobile, BlackBerry, iPhone are «closed» enough and limited by either their own devices (BlackBerry, iPhone) or development complexity. Among other problems of above mentioned platforms there is limited API. Even Java platform for mobile devices has some failings such as great number of limitations; very different APIs; device dependent code. Symbian and Windows Mobile platforms are better from this point as far as they support wider range of devices and their APIs give more options.
Common problem here is also that there are a lot of platforms. Talking about OpenSource and Cross-Platform solutions we should say that they are still developing at the moment and are not widespread yet.
In this article we’ll pay our attention to the Windows Mobile platform.
Microsoft Company released its first platform for inbuilt devices at the end of the 90th. In 2002 Windows CE.NET platform appeared. And at that time Pocket PC based on Windows CE 3.0 platform and higher were released. Further development of wireless communication technologies managed to combine telephone and personal computer. Thus Pocket PC 2002 Phone Edition appeared which supported the standards of GSM, GPRS, Bluetooth and wireless HS network access. In the same time another device concept was developing that was much similar to the above mentioned but was closer to the telephone then to personal computer. This device was named SmartPhone 2002. Fundamental difference between Smartphone and Pocket PC is that Pocket PC has touch screen while Smartphone has only control buttons. They also had different application scopes and supported different standards and technologies.
Windows Mobile platform more belongs to smartphones, communicators and small personal devices. Windows CE and Windows Embedded platforms are commonly used in different industrial equipment.
Now we have Windows Mobile 5 and Windows Mobile 6 generations and Windows Mobile 7 will be released soon. Modern devices based on Windows Mobile Pocket PC; have 500-600 MHz processors and 64-128 MB RAM that is not little for such devices.
1. Development Tools
There are a few models of development of applications for Windows Mobile:
Win32 API MFC .NET Compact Framework.
Microsoft Co gives developers all necessary tools for development of applications for PDA, Pocket PC; and Smartphone.
Here are some advices about different code type choosing.
Use Native Code for achieving the burst performance, direct work with hardware, and also for minimization of system resource requirements. Use Managed Code for development of GUI-oriented applications which main requirements are development and market deployment terms. Managed Code is also good for the easy work with web-services. Use Server-Side Code for work with different devices through a single code base, and also if wide stable communication channel with a device is present.
Below are the reviews of present development tools for PDAs, Pocket PCs and Smartphones.
eMbedded Visual C++ 4.0
Microsoft eMbedded Visual C++ 4.0 development environment is meant to create applications for devices with Windows CE .NET 4.2 operating system and also (with package of updates SP3) for PDA and Smartphones on the Windows Mobile 2003 Second Edition platform. The development environment eMbedded Visual C++ 4.0 is good for creation of native code for mobile and inbuilt devices with Windows CE .NET 4.2 OS. It allows developer to perform Just-In-Time Debugging for diagnostics of unhandled exceptions, Attach-to the process for the extended debugging of processes, and also interaction with an emulator.
Visual Studio .NET and SDP functions
SDP (Smart Device Programming) functions of the integrated environment of development Visual Studio .NET 2003 (2005, 2008) allow to create applications, that uses possibilities of Microsoft .NET Compact Framework platform. Thus a developer can create the distributed mobile data-processing systems, workings both in scenarios with connection and without permanent connection. Vast class library of .NET Compact Framework platform makes application development much quicker than with traditional development tools.
Visual Studio .NET lets create applications for the Pocket PC 2002 devices and (with proper SDKs) Pocket PC 2003, 2005 and Smartphone 2003, 2005, applying the same tools as those used for the development of applications for desktop PCs. Library .NET Compact Framework is installed together with Visual Studio .NET. This library is specially developed for devices with the limited resources. Developers can also use new languages C# and Visual Basic .NET for applications for mobile and inbuilt devices. They are good in workings with web-services and ADO.NET technologies.
Control elements of ASP .NET Mobile Controls extend SDP functions and .NET Compact Framework platform. They give opportunities to use possibilities of .NET Compact Framework and Visual Studio .NET for development of mobile web-applications due to the data delivery to various mobile devices by means of ASP.NET technology. This approach allows to create single mobile web-application in the Visual Studio .NET environment, that will automatically perform data rendering for displaying on various devices: mobile phones, smartphones, PDA, Pocket PC. The integrated development environment makes it possible to create mobile web-applications simply by dragging control elements on forms.
ASP.NET System sets no components on a client device. For adaptation of formatting under concrete browsers server logic is used. It generates information in the formats of Wireless Markup Language (WML), HTML, and Compact HTML (cHTML).
Microsoft SQL Server
Microsoft SQL Server Compact Edition (SQL Server CE) is a compact DBMS for rapid development of applications that extend possibilities of work with enterprise data due to the mobile devices using. SQL Server CE is a tool facilitating development of mobile applications due to support of SQL syntax and usage of application and API interface model that is compatible with SQL Server.
SQL Server CE provides the basic set of relational database functions, in particular optimized query handler; support of transactions and heterogeneous types of data – with unpretentious requirements to the system resources. Remote access to the data and replication by confluence provide reliable delivery of information from the SQL Server bases, possibility of autonomous work with by information and subsequent synchronization with the server. SQL Server CE is good for the systems with mobile devices and wireless networks.
SQL Server CE DBMS is developed for integration with .NET Compact Framework by means of Visual Studio .NET. It simplifies development of applications for work with databases on mobile and built devices. New data supplier of SQL Server CE for code management in the Common Language Runtime environment helps to develop distensible applications with possibilities of autonomous work with information in scenarios without permanent connection.
Microsoft .NET SqlClient gives API for work of both .NET Framework and .NET Compact Framework applications. For the common Windows systems SqlClient Microsoft with SQL Server are used, and SqlServerCe for Microsoft SQL Server Compact Edition databases for Compact Framework.
Name space of SqlClient is in both versions. So we can interact:
Using .NET Compact Framework SqlClient to have an access to SQL Server from device on Desktop. Using .NET Compact Framework SqlServerCe to have an access to SQL Server Compact Edition directly on a device.
Work with databases on a device is similar to the work on Desktop. To access to SQLServer on Desktop system SQL uses TCP/IP connection thus in this case it is possible not to have SQL Server Compact Edition installed on a device.
All of the mentioned models are implemented on the desktop systems. So the experience of their application can be carried for development of the programs for Windows Mobile. Using Win32 API we rapidly get compact code, and also can use it for development of drivers and system component. Using MFC we have extensions of API functions, and also designer for development of interface. And using Compact Framework we have at our disposal well developed interface, automatic garbage collection, support of XML and other options. Also there is even more truncated version — Micro Framework, where there are less SDK functions.
After SDK for MS Visual Studio installation new configurations of assembling appear as well as new functions for assembling under these platforms. Suit also contains Emularor for software development and testing without physical connection between device and computer.
As far as many devices that are based on Windows Mobile have ARM processor it is also possible to compile units using
