Version 229 (modified by 12 years ago) ( diff ) | ,
---|
Developer Guidelines
Table of Contents
Getting Started
Development Enviroment
- Install a Development Enviroment
- Git Version Control
- Eclipse debugger
Development Process
We define requirements:
Designs should focus on Usability:
Designs should fit within our overall architecture:
We write Tests:
We keep code conventions to maximise readability & consistency:
Code should be documented:
Code should be able to perform well at scale:
Debugging Tips:
Framework
- Database Synchronization
- GIS - Mapping
- Internationalization
- DeveloperGuidelines/Libraries
- Menus
- Messaging
- DeveloperGuidelines/Popup
- PrePopulate- initialising the database with lookup lists &/or demo data
- SVG - One way of producing Charts
- Templates for instance configuration
- Themes
- Save Search and Subscription
- Scheduler
- Search
- DeveloperGuidelines/UserManagement
- DeveloperGuidelines/WebServices
Modules
- DeveloperGuidelines/Logistics
- DeveloperGuidelines/Organisations
- DeveloperGuidelinesSurvey
- DeveloperGuidelines/WebSetup
Deployment
Browsers default to only downloading 2 files from the same origin at a time, so many files is very slow on high latency links.
We therefore consolidate into fewer, larger files when running in Production mode.
Although, note that iPhone 3.x cannot cache files larger than 15kb and in iPhone 4 the limit is 25kb. And this is the size before gzipping.
Since GIS is a specialised app which requires many files, it's JS is loaded separately when required.
The build script is static/scripts/tools/build.sahana.py
It needs to be run as a web2py script:
python web2py.py -S eden -M -R applications/eden/static/scripts/tools/build.sahana.py
There is also a convenience wrapper for Windows to run this: static/scripts/tools/build.cmd
You must have an internet connection to run the build script unless you have a local version of the Compiler.
Our build process is based on the one used by OpenLayers
This uses Google's Closure compiler to compress the JS. This is done using their web service, however for OpenLayers itself we need to download the jar file & place in the tools folder since this is over 1Mb:
ToDo: Investigate using other options instead:
- http://developer.yahoo.com/yui/compressor/
- http://www.crowproductions.de/repos/main/public/packer/jspacker.py
ToDo: Download/execute scripts asynchronously:
Mobile
- Android - Android clients
XSLT
- XPath: http://www.w3schools.com/xpath/default.asp
- XSLT: http://www.w3schools.com/xsl/default.asp
- lxml Tutorial
- XSLT - Stylesheets for XML & JSON Import/Export
Other Resources
- Tips - useful links to explore
Translations
These are Translated versions of the documentation, which may be outdated compared to the English originals