hfoss and rad
TRANSCRIPT
Humanitarian-FOSS and Rapid Application
Development4 July 2010, Academia SinicaMichael Howden and Fran Boon [email protected]
Overview• Background of HFOSS• HFOSS vs. FOSS• Developing HFOSS• Rapid Application Development• Getting Involved
The Historic Trigger: 12/26/04 Indian Ocean Tsunami
• At least 226,000 dead
• Up to 5 million people lost homes, or access to food and water
• 1 million people left without a means to make a living
• At least $7.5 billion in the cost of damages
Problem: Aftermath of Disasters• The trauma caused by waiting to be found or find the next of kin
• Coordinating all aid groups and helping them to operate effectively as one
• Managing the multitude of requests from the affected region and matching them effectively to the pledges of assistance
• Tracking the location of all temporary shelters, camps, etc.
How Can Technology Help?• Scalable management of information
– No stacks of forms and files to manage• Efficient distribution of information
– Accessibility of information on demand• Automatic collation and calculation
– No delay for assessments and calculations• Live situational awareness
– Reports are updated live as data is entered
Sahana is Born• Organisation Registry• Missing / Affected
Persons Registry• Request Management• Mapping
Beneficiaries
$
$ $
Donors
Humanitarian Organizations Supplies
INFORMATION
$Money
NPOs /Government
Projects Related to HFOSS
Humanitarian FOSS vs. FOSS• Goal: To Add to the Social Good• Programmers != Users• Diverse Community
– Programmers– Designers & Producers– Disaster Responders– Social Workers– You!
Challenges• Uncertain and changing conditions.• Communication Gap:
• NPOs/Government IT Providers• Limited time and resources• Technology is Easy
Getting people to use it is hard!
Participatory Programming• Engaging with Users• Bottom Up vs. Top down• Agile vs. Waterfall
Software Development Cycle
RAPID APPLICATION DEVELOPMENT…
Emergency• We have to build a system by
lunchtime!
Incident Reporting System
Data:• Location• Date• Reporter• Details
Screens:• Report Incident• View Incidents• Update Incident
Model-View-Controller• Models
– Define Tables in the Database
• Controllers– Workflow, Logic
• Views– HTML / JavaScript Templates
Model: Define Tablemodels/irs.py
table = db.define_table("irs_incident",location_id,
Field("date", "date"),person_id,
comments)
Controller: CRUD Formscontrollers/irs.py
def incident():
return shn_rest_controller("irs", "incident")
http://127.0.0.1:8000/eden/irs/incident
Rapid Application Development
Scripting Language: Python
•Library support including GIS, GSM
•Interactive Shell to explore
Rapid Application Development
Framework: Web2Py
•MVC – easier to maintain•Automatic Database Migration•Sensible Defaults
– No need to specify Routes to Controllers– Field Types provide server-side & client-
side validation & client-side rendering•In-built Translation interface
Rapid Application Development
Sahana Eden Resource Controller
•CRUD Forms with default Views
•Web Services– REST– JSON– XML
Rapid Application Development
Sahana Eden•Mapping
– OpenStreetMap– Google, Yahoo, Bing– GIS: WMS, WFS
•Messaging– SMS– Email– Twitter
Coding Style: Substitution
controllers/irs.py
module = request.controller
def incident():resource = request.functiontablename = "%s_%s" % (module, resource)table = db[tablename]
return shn_rest_controller(module, resource)
Coding Style: Maintainability
controllers/irs.py
def incident():"Using a docstring helps other coders"
# Lots of other comments are also useful
Coding Style: Constants
MY_LABEL = “My Label”
…
… MY_LABEL …
………… MY_LABEL ………
Community Development Process
•Blue Prints
– Functional Specs: User Stories
– Drafted on Wiki
– Discussed on Chat & Mailing List
Community Development Process
• Agile Development– Functional increments released quickly to users
for early feedback– Copes better with rapidly-changing
requirements
• Simulations– Usability Testing
• Issue Tracker– Logging & Prioritising
Rapid Application Development
• Building new functionality is fast & easy– Critical for HFOSS
• Python, Web2Py• Sahana Resource Controller• Coding Style• Community Development Process
– Agile
Interested?Join the Global Community:
http://eden.sahanafoundation.org
• Mailing List
• IRC Chat