- Implemented in JavaScript using:
- JavaScriptMVC (JMVC)
- Initial implementation written for JMVC version 1.5
- Currently runs on JMVC version 3
- RDF/XML parser from the Tabulator project
- jQuery & jQuery UI
- Consumes RDF/XML survey definitions as described here
git clone git://github.com/chb/survey_client.git
cd survey_client
git submodule init
git submodule update
View a sample survey by opening survey_client/survey/exampleSurvey.html
in your favorite browser
The client's example data connector (contained in survey_client/survey/index.html
) is configured to read from your browser's local storage to retrieve survey definitions. This setup works well when testing the client in conjunction with the Indivo Survey Builder, which by default is configured to write to browser local storage.
The example data connector also contains commented out code for retrieving definitions using an Ajax request.
###Development v.s. Production Modes By default, the client will run in development mode, allowing for console logging and easier debugging. To compress the client for increased performance and a decreased download profile, do the following
- from
survey_client/
run./steal/js ./survey/scripts/build.js
- edit
survey_client/survey/index.html
and change the existing script tag to point to the new production bundle:
- old
src='../steal/steal.js?survey,development'>
- new
src='../steal/steal.js?survey,production'>
###Running Tests
You can run the functional test suite by opening up survey_client/survey/funcunit.html