This document describes additional Information regarding Windows Mobile Client used in Warehouse Data Collection functionality.
The solution consists of two parts.
Wadaco - Main application
WadacoInstaller – Deployment project
responsible for generating CAB-file (installer)
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:
The model is an interface defining the data to be displayed or otherwise acted upon in the user interface.
The view is a passive interface that displays data (the model) and routes user commands (events) to the presenter to act upon that data.
The presenter acts upon the model and the
view. It retrieves data from repositories (the model), and formats it for
display in the view.
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.
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.
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)
Go to Project/Properties/Build Events/”Post-build event command line”
Add new line "
$(TargetDir)XX\wadaco.resources.dll" “$(TargetDir)XX\XX_wadaco.resources.dll
”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
”Go to aforementioned folder and run LocalizationPatcher.exe
Enter all available language codes in field “Localizations” (separated with colon)
Browse for the project INF-file (will be located in “
wadaco\source\wadaco\mobile\winmobile\release
”)Finally point out the path to CabWiz.exe (SDKTools)
Patch and Build CAB! Now you are done and have a CAB-file containing all the correct localizations.
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.
Physical Device
- Optional: Build solution (also see section 3)
- Copy the generated CAB-file from
WadacoInstaller/Release/
to the device- Locate CAB-file on device and run it.
Emulator
- Run the project in Visual Studio.
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):
https://mclient.ifsworld.com/xxx
, where xxx is an arbitrary
name kpvmpe947.corpnet.ifsworld.com
)
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.
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.
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.
Depending on if you have a physical device or running in an emulator the setup is a bit different.