LOCATION: HomeProductsEnterprise Samples

NEWS

July 29, 2008
Resco announces Resco CustomKeyboard for .NET CF

A brand new keyboard control optimized for .NET Compact Framework.

June 10, 2008
Resco releases Resco MobileForms Toolkit 2008 Volume 2

A suite of powerful Visual Studio controls and libraries designed specifically for mobile devices.

May 20, 2008
Resco releases Resco ImageButton for .NET CF Beta

Adjustable, modifiable and skinnable button for .NET Compact Framework.

More News
Mobile Survey

Overview

A survey is a very important marketing tool for almost any type of organization. In many cases it’s carried out by mobile workers in the filed, by filling in paper-based forms. However, this outdated process can be easily replaced using mobile devices allowing data processing automation.
The main goal of this example is to show a modern way of developing a mobile survey client-server solution in Microsoft Visual Studio, .NET Framework and .NET Compact Framework.
The solution consists of three modules:

  1. MobileSurvey Manager – a desktop application allowing the user to design surveys
  2. MobileSurvey Client – a mobile application, allowing the mobile user to fill a survey in using a Windows Mobile Pocket PC or Smartphone device
  3. MobileSurvey WebService - provides for data synchronization

To make things simple, XML DataSet files are used as the data store in both desktop and mobile device environments. Zip compression provides for data transfer optimization between the server and the client.
The picture below shows the solution architecture.

solution architecture

MobileSurvey forms use the Resco DetailView .NET control which covers most of the required functionality allowing the user to enter data into various edit controls such as TextBox, ComboBox, CheckBox, Numeric, etc. Moreover, the DetailView content can be stored in an XML template, which dramatically simplifies its distribution to mobile devices.
The sample solution contains C# source code which can be freely customized in accordance with the customer’s requirements.

MobileSurvey Manager

MobileSurvey Manager is a desktop application providing a simple user interface for creating and designing surveys which can be then distributed to mobile devices.

The application’s main form shows the basic information about all available surveys allowing creation of new surveys and modification or deletion of the exiting ones.

MobileSurvey Manager

Once a survey is created, it’s necessary to specify the data structure to be used by it. This can be done using the Design Data Structure form.
The survey layout can be easily designed thanks to the DetailView Designer, which is part of the Resco DetailView .NET control and can be used as a standalone application.

Resco DetailView .NET

The survey results can be viewed in a simple grid form.

MobileSurvey Client

The MobileSurvey client application provides a simple user interface allowing the user to fill in different surveys using his/her mobile device.

The application’s main form Resco AdvancedList .NET control displays all available surveys.

MobileSurvey Client

By selecting one and tapping the Open link the survey form is displayed.

MobileSurvey Client

This form uses the Resco DetailView .NET control for loading its survey content from the corresponding XML template defined by the MobileSurvey Manager. The form allows the user to create a new survey result set, fill the results in and save, modify or delete them. This process can be repeated as many times as required, so there is no need to close the form and reopen it for every new result set.

The last form of the application provides for data synchronization.

MobileSurvey Client

It calls the MobileSurvey web methods to perform the necessary synchronization steps, such as downloading new surveys to the device, and uploading the survey results to the server.
The MobileSurvey Client is available for the Windows Mobile Pocket PC as well as the Smartphone platform.

MobileSurvey WebService

MobileSurvey WebService takes care of data synchronization between mobile devices and the server computer. It provides three web methods:

  1. GetDataSources – returns names of all data sources present on the server
  2. DownloadFile – downloads a specific survey from the server
  3. UploadData – uploads new result sets for a specific survey back to the server

The above methods are called by the Client application, which in the first step downloads all new surveys to the device and then uploads all new result sets gathered since the last synchronization.
Because the data is stored in XML text files, the Resco Zip .NET compression component is implemented in the solution. It compresses the data before the MobileSurvey WebService sends them to the Internet. On the other side, the MobileSurvey Client application uses the Zip .NET component to decompress data to a readable form (the same method is used to transfer data in the opposite direction).