| Prerequisites |
This part is about the Prerequisites for a website to be used as a support for a new ZenengoMobile App.
All the xsl files MUST be put in the same directory, and the name MUST be xsl.
Every path to an internal feature MUST be rooted.
A reference to and external website (by a http link) MUST be launched with the javascript method specialLink('ext:{chemin du lien}').
Any javascript content which is in the XSL files MUST be stored within some acs:Script tags.
The SQL Files MUST be stored in the scripts directory, and organized in three subdirectories :
Once : all the files than must be Executed only once. Each file MUST be named {file execution order number in two digits}{filename}.sql. Each SQL file will be executed in the given order.
EveryTime : all the parameter files and the SQL used for the execution of the application. For example : the template files, which insert SQL code in the RUBRIQUE table. They will be executed in alphabetical order.
Ignored : all the files (like TrySets) that are not necessary in the mobile application.
The SQL scripts MUST follow the following norm :
Every request must be split with semicolons (;)
No comments
The Android and IOS application are working on Xamarin, so the .NET framework classes used MUST be present in the MonoDroid and MonoTouch version of the Mono .NET Framework.
Appart from these libraries, the following classes can be used and will be translated by the Conversion Application :
log4net
System.Configuration
SharpZipLib
ITextSharp
Svg
Activsoft.Engine
Activsoft.Engine.SQLite
Activsoft.Engine.Mobile
The following classes in Activsoft.Dashboard : DashboardXslExtenion, ExcelFilterRequestParser, JavascriptCache, MediaConfig, RedirectAfterInsertionAction and RedirectAfterInsertionActionFactory, XPathExpressionTranslator
The custom .NET project used for the website can also references those libraries, and the conversion will also be made. The conversion application must have access to the source code in order to change the references and to eventually change the C# code before compilation.
All the classes referenced in the web.config files (including the extractors and actions) MUST be in the preceeding authorized librairies or be in a custom project accessible by the conversion application.
The Extractor and Action classes can't reference the HttpContext.CurrentContext library to access the Request or Response objects. This class doesn't exist in mobile version. The Config.Current object contains though a Context property, IDictionary containing the Request in the "PseudoRequest" key and the Response in the "PseudoResponse" key.
The retrieve information from a remote server, Xamarin only provides the version 1.0 of the WebSer
To be compatible with Zenengo for Android, IOS and Windows the application MUST be compatible with WebKit browser, especially Chrome on Windows, Safari on IOS and the default browser on Android.
The javascript MUST be compatible with both web devices and portable devices. Therefore all the click event must also be converted with touch events. One elegant way to be assured of this point is to use the JQuery Mobile TODO
You can use any way to perform AJAX calls, the only thing to check is that if the calling is local (calling an inner template on the offline application), the calling must be relative to the server (do not use : page = "http://myserver/xslt.ashx" but "xslt.ashx").
The navigation between applications screens must be performed by using the go method or by submitting the submitor form. Using history or direct GET link is prohibited.
The web.js file contains the default answer to some of the specialLink calls (see next section). If the web application must answer to the specialLink calls, amend the web.js file.
The screens and template of the mobile application will access to specific features on the device. To access those features the recommended Way is to implement the specialLink function, with a string parameter.
Zenengo mobile already contains access to special mobile device's features :
Localisation : the HTML5 localisation utilities are available.
zenengo://setHeightWidth_{height in pixel}_{width in pixel} : used only in the windows version, and changes the window size of the application.
zenengo://quit : used only in the windows version, and quits the application.
zenengo://getPhoto_{input id} : open the device's camera and calls when the photo is loaded the method TODO
zenengo://getFile_{input id} : open the device's file browser and calls when the file is loaded the method TODO
zenengo://file/{file path on the device} : open on a external Activity / View / Windows the file
zenengo://startSynchro?{synchro launch parameters} : launches a synchronization process with the given parameters.
ext://{url} : opens an external browser to
The authorized acs component in the web application are the following :
acs:TextBox
acs:Calendar
acs:ListBox
acs:Combobox
acs:AutoComplete
acs:Table
acs:Tree
acs:Button
acs:CheckBox
There can be only one web.config file in the web application and it must be in the "site" directory, and must follow the following norm :
Neither the appSettings section is authorized nor are all the .NET sections which are not declared in the <sections> tag. The only exception is system.web, which will be removed by the conversion application.
The main Db section must be called "db".
All the files referenced in the website must be stored in the "site" directory.
Accepted file types are :
Image files : .jpg, .gif, .png, .svg
CSS files : .css
JS files : .js
All the website files must be stored in a subdirectory of the site directory, except for global.asax and web.config.