Monday, 14 March 2011

WeightTracker Localisation Checklist

Checklist of things to do when creating language assets for a new locale upon receiving string and image files:

(1) Android strings: Need to copy in...
(a) '..._helpText_...'
(b) '..._facebookpost_...'
... strings from the gwt strings file, and need to put in...
(c) 'mobile_2_newentry_1_b_2_UK_ONLY_RadioButton' (if missing)
(d) 'url_...'
(e) 'fbpost_...'
(f) 'marketHelpline' (null value if 'mobile_6_options_1_a_5_disclaimer' doesn't have a 'marketHelpline' string placeholder)
(g) 'stones'
(h) 'pounds'
(i) 'kilograms'
... key-value pairs, and need to manually tinker with...
(j) 'mobile_5_goal_2_update_1_a_3_Paragraph' (change placeholder to "{n}")
(k) 'web_6_help_1_a_2_helpText_1' (put in [] placeholder)
strings. See the equivalent English strings for examples.

(2) Android images: Create folders (hdpi, ldpi, mdpi) in language assets for the locale specific images for the language in question.

(3) GWT strings: Need to put in and fix up
(a) 'url_...'
(b) 'region_...'
(c) 'fbpost_...'
(d) 'mobile_2_newentry_1_a_8_feeling'
strings, and remember to combine
(e) 'web_dashboardscreen_e_1_Paragraph_0'
with
(f) 'web_dashboardscreen_e_1_Paragraph_1'
and remove extra sentence (if extra sentence there) from
(g) 'web_homescreen_c_2_Paragraph_0'
string, and remember to add [] text placeholders in
(h) 'web_dashboardscreen_c_1_Paragraph_0'
(i) 'web_6_help_1_a_2_helpText_1'
(j) 'web_3_editgoal_1_a_8_Paragraph' (change placeholder to "{n}")
(k) 'web_3_editgoal_1_b_7_Paragraph' (change placeholder to "{n}")
(l) 'web_homescreen_b_2_Paragraph'
strings. See the equivalent English strings for examples.

(4) GWT Windows: Create folder in language assets to contain
(a) Locale-specific 'docked_bg.png' image.
(b) 'war/WeightTracker_WINDOWS_flyout.html' and 'war/WeightTracker_WINDOWS.html' files. Remember to change 'alli_locale' meta-variable as appropriate.
(c) 'war/gadget.xml' file. Remember to change 'name', 'info url' and 'description' properties as appropriate.

(5) GWT Mac: Create folder in language assets to contain
(a) 'war/WeightTracker_MAC.html' file. Remember to change 'alli_locale' meta-variable as appropriate.
(b) 'war/Info.plist' file. Remember to change 'CFBundleDisplayName' key value as appropriate.

(6) Server facebook resources: Add 'btnFBLogin_xx.png' and 'fbcrossdomain_xx.aspx' for the region (xx) being added, as well as any other images and files required.

When deploying the Android, Mac and/or Windows app/gadget for a particular locale, copy in the required "language assets" to the 'war' folder for the GWT Mac and Windows gadgets and to the 'res' folder for the Android app. Additionally, for the Android app:
(1) Change 'ALLI_LOCALE' variable in 'AlliCore/User.java'.
(2) Change 'CURRENT_REGION' variable in 'AlliCore/User.java'.

Notes for future:
(i) Create string with value "Saving. Please wait..." (and remember to include in translations).
(ii) Create string with value "Account Error" (and remember to include in translations).

Friday, 4 March 2011

WeightTracker app different Web.config files

Web.config - local test
Web.config2 - our online one for our servers/api/db
Web.config3 - our servers; their api
Web.config4 - their servers; their api

General WeightTracker App Deployment Checklist

Things general to all apps/gadgets not to forget when compiling and uploading for deployment...

(1) Change the 'baseURL' value (and variants, i.e. 'remoteBaseURL', 'localBaseURL' etc) in the 'ServerComms' class (located in the 'AlliCore' project, 'ksd.gsk.alli.core.comms' package).

(2) Change the connect to local host setting, found in
(a) 'WeightTracker' project, 'WeightTrackerApp' class for Android app.
(b) 'WeightTracker_MAC' class ('onModuleLoad2' method call) for Mac gadget.
(b) 'WeightTracker_WINDOWS' and 'WeightTracker_WINDOWS_flyout' classes ('onModuleLoad2' method call) for Windows gadget.

(3) Change the 'FB_AppID' and 'FB_AppCanvasURL' values in the 'User' class (located in the 'AlliCore' project, 'ksd.gsk.alli.core.user' package).

(4) Increase the versioning. Version setting found in
(a) 'WeightTrackerApp' class and 'AndroidManifest' xml file for Android 'WeightTracker' project.
(b) 'WeightTracker_FACEBOOK' class for GWT Facebook project.
(c) 'WeightTracker_IGOOGLE' class for GWT iGoogle project.
(d) 'WeightTracker_MAC' class and 'war/Info.plist' file for GWT Mac project.
(e) 'WeightTracker_STANDALONE' class for GWT Standalone project.
(f) 'WeightTracker_WINDOWS' class and 'war/gadget.xml' file for GWT Windows project.
(g) Server-side 'Web.config' file ('appSettings' node).

(5) Comment out (disable) the 'log_level' 'TRACE' property in each of the GWT projects' '...gwt.xml' file(s) and remember to take out unnecessary Log.error and Log.trace calls.

(6) Change the 'appSettings' values in the server-side 'Web.config' file (or choose and rename the correct 'Web.config' file version) as necessary.

(7) Set the server url as appropriate in the 'igoogle/index.html' and 'igoogle/gadget/alli_weighttracker.xml' server-side files.

Thursday, 3 March 2011

Android WeightTracker App Deployment Checklist

Things specific to the Android app not to forget when compiling and uploading for deployment...

(1) Go through the localization checklist in the following post:
http://adilatwork.blogspot.com/2011/03/weighttracker-localisation-checklist.html

(2) Go through the checklist for general deployment in the following post:
http://adilatwork.blogspot.com/2011/03/general-app-deployment-checklist.html

Tuesday, 1 March 2011

How to deploy an app on the various platforms

Steps to deploy/upload an app created for various platforms...

(1) Open up Filezilla and connect to the server host.

(2) Navigate to web/content/ on the remote server site.

(3) Upload the 'bin' folder containing the server code dlls.

(4) Upload 'web.config' file containing app settings, server configurations etc.

(5) Upload 'comms' folder (and any other additional server-side libraries required) containing 'ashx' files.

(6) Create/upload 'images' folder on server (if one exists locally) which will contain any images required and not embedded in the client-side code for any of the platforms.

(7) Create 'standalone' folder and upload to it the compiled files from the gwt standalone project (i.e. those in the 'war' folder minus the 'WEB-INF' folder).

(8) Create 'igoogle' folder on server and a 'gadget' folder within it. Upload to the 'igoogle' folder any required images as well as the 'index.html' file containing a link to the location from where the igoogle app can be downloaded. Upload to the 'gadget' folder the gadget xml spec file and also the gwt compiled code, i.e. the javascript and image files (not the stuff in WEB-INF).

(9) Create 'fb' folder on server and upload to it the 'aspx' and images files from the server-side code and also the gwt compiled code folder (found in the 'war' folder). Optionally: upload an 'index.html' file with a link to the location from where the facebook app can be downloaded. Remember to navigate to 'facebook.com/developers', sign in, select the app, then 'edit settings', 'facebook integration', and put urls as appropriate pointing to the uploaded app code ('canvas url' in particular). Finally, play with other settings as appropriate, clear cache and test.

(10) Create 'mac' folder on server (to where the mac gadget code will be uploaded). Create folder on local machine named '[appname].wdgt'. Copy everything in the compiled 'war' folder of the mac gwt project (minus the 'WEB-INF' folder) into the newly created '.wdgt' file. Compress the 'wdgt' file as a 'zip' file. Upload 'zip' folder. Optionally: upload 'index.html' file specifying where to find the mac gadget.

(11) Create 'windows' folder on server (to where the windows gadget code will be uploaded). Select everything in the compiled 'war' folder of the windows gwt project (minus the 'WEB-INF' folder) and compress as a 'zip' file. Rename 'zip' file as '[appname].gadget' and upload. Optionally: upload 'index.html' file specifying where to find the windows gadget.

(12) Create 'android' folder on server and upload to it the '[appname].apk' file located in the Android java project 'bin' folder. Optionally: upload 'index.html' file specifying where to find the Android app.

Note: After uploading it might be necessary to "rebuild the application" on Rackspace where it's hosted. (To do so: log in to manage.rackspacecloud.com, click 'Hosting', 'Cloud Sites', select the appropriate site and then click "rebuild this application" on the bottom right.)