Warehouse Data Collection Mobile Client (WADACO)

This document describes additional Information regarding Windows Mobile Client used in Warehouse Data Collection functionality.

Contents

Overview

Content

The solution consists of two parts.

Application Design

The design of the main application is based on a design pattern called MVP (Model-View-Presenter).
MVP is a user interface design pattern engineered to facilitate automated unit testing and improve the separation of concerns in presentation logic:

Versioning
   Warehouse Data Collection Mobile Client version will be available in two places.

  1. On the label of ‘Windows Mobile Client logging window’ along with the title.
  2. In a text file called ‘WadacoInstallerVersion.txt’ inside the WadacoInstaller.CAB.

 
Versioning will be done as below,
<TRACK>.<UPDATE>.<ISSUE_SEQUENCE>.<0>

Ex : 10.1.1.0
The definition will be like below.
10 = IFS Application Track
 1 = The UPD number on which this new version is included-in.
 1 = Issue sequence that will be incremental.
 0 = Is not applicable in this context.


Localization

Static Localizations

Examples: buttons, labels, menu options etc.
Static localizations is done through VS built-in localization support, see http://msdn.microsoft.com/en-us/library/y99d1cd3.

Dynamic Localizations

Examples: dynamic titles, error messages etc.
For each new language, a resource file needs to be created in the projects Properties folder. Naming convention is “Resources.XX.resx”, where XX is proper language code (see existing resource files). Copy all resource values from file “Resources.resx” and translate them in your new resource file. If new resource values are added, remember to add the value for each language.
When you are done with adding the new resource file you need to do the following: (XX will be the new language code)

  1. Go to Project/Properties/Build Events/”Post-build event command line”

  2. Add new line "$(TargetDir)XX\wadaco.resources.dll" “$(TargetDir)XX\XX_wadaco.resources.dll

  3. Build the project (in Release mode). If everything worked as planned you should now have a copy of the resource DLL containing your new language in “wadaco\source\wadaco\mobile\winmobile\release

  4. Go to aforementioned folder and run LocalizationPatcher.exe

  5. Enter all available language codes in field “Localizations” (separated with colon)

  6. Browse for the project INF-file (will be located in “wadaco\source\wadaco\mobile\winmobile\release”)

  7. Finally point out the path to CabWiz.exe (SDKTools)

  8. Patch and Build CAB! Now you are done and have a CAB-file containing all the correct localizations.

 

Localization Patcher

This is a small helper program which is shipped with the source code for Wadaco WM and the focus is to provide an easy to use GUI to patch the INF-file due to shortcomings in the CabWiz.exe program in regard to localizations. See below.

Why this cumbersome procedure?
Unfortunately there exists a well-known bug in the Cab Wizard program (used to generate the CAB-file). If you deploy the resulting CAB right away without patching it, you'll find that the localized resources do not work properly. When building, for each language a resource DLL is created, and each DLL reside in a folder reflecting the language code but each DLL itself has the same name as all other language resource DLLs.
When the CabWiz.exe reads the INF file, it uses the same language resource DLL for all operations and ignores the fact that they are in different directories and different files. And therefore we need to give all language resource DLLs unique names (Post-build manual step), and finally patch the INF-file to point to the renamed DLL-files.
 

Run Wadaco On Windows Mobile

Prerequisites
 

  1. WADACO installed in IFS Applications
  2. WADACO_MOBILE_USER permission set granted
  3. Optional: Visual Studio 2008 with Compact framework 3.5 and Windows Mobile 5 SDK installed (Only needed in development)
  4. Handheld device running Windows Mobile with CF3.5 installed (emulator will also work)
  5. Refer Section: Communication

 

Deployment

Physical Device

  1. Optional: Build solution (also see section 3)
  2. Copy the generated CAB-file from WadacoInstaller/Release/ to the device
  3. Locate CAB-file on device and run it.

Emulator

  1. Run the project in Visual Studio.

Communication

All communication is done through web services. So the mobile application needs to have access to the Wadaco WSDL.
The Wadaco WSDL is available at:
[application server address]/fndext/soapgateway?handler=DataCaptureManagement

The application server must be reachable from the device, meaning that either the device must use the same network as the application server or there must exist a way to reach the application server from an outside network.
 

Steps to setup remote access via ISA/TMG (reversed proxy, excerpt from COS):

  1. Public URL = https://mclient.ifsworld.com/xxx, where xxx is an arbitrary name
  2. The internal server name e.g. lkpvmpe947 (kpvmpe947.corpnet.ifsworld.com)
  3. Internal path (should be /*)
  4. The internal server port number e.g. 58080 (Default port)
  5. Access due date (if not specified access is closed after 3 months)


HEADS UP!
The mobile application assumes the address given only points to the application server and will add the reminder of the address itself. (/fndext/soapgateway?handler=DataCaptureManagement)
 

Note: Authentication between the Windows Mobile client and the WADACO web service is done through Basic authentication. (BA) The BA mechanism provides no confidentiality protection for the transmitted credentials. They are only encoded with Base64, which means they are not encrypted or hashed in any way. Therefore, to be certain communication is properly secured, it is strongly advised to use HTTPS as communication protocol.

Development

Forms

All classes related to forms have a base class which should be used to inherit from when developing new Forms, BaseModel, BasePresenter and BaseView. They contain functionality that all new classes in their respective responsibility, will need.

Localization

When implementing new functionality, correcting bugs etc. basically everything that makes you rebuild the CAB-file, you'll need to make sure you follow the steps in section 3 and run the Localization Patcher or else the localizations will not work properly.

Deployment And Testing

Depending on if you have a physical device or running in an emulator the setup is a bit different.

Physical Device

  1. Dock the device in the cradle which should be connected to your PC.
  2. Open Windows Mobile Device Center on your PC (install if you don't have it)
  3. WMDC should recognize your device and present it as connected. (If not, troubleshoot until it does)
  4. Go to Mobile Device Settings / Connection Settings and allow incoming connections on COM3 and set computer connection to The Internet.
  5. Now you should be able start VS and debug on physical device (Choose device and not emulator when VS asks which device should be used for running the application)

Emulator

  1. Make sure you have installed proper Windows Mobile SDK.
  2. Open 'VS/ Tools/ Device Emulator Manager' on preferred emulator device, RMB and first choose Connect and then Cradle. (Simulates step 1 for Physical Device)
  3. Follow steps 2 -5 in Physical Device. But instead chose DMA for incoming connections at step 4! And of course choose correct emulator when starting the application in VS.