| 1 | = Example 4: a more complex application = |
| 2 | |
| 3 | In this application, volunteers locate fossils in images of desert terrain. |
| 4 | They can locate several (zero or more) fossils in the same image, |
| 5 | and can associate a type and a comment with each annotation. |
| 6 | They can remove existing annotations. |
| 7 | When they're all done, they click a "Done" button. |
| 8 | |
| 9 | This is implemented as a sequence of web pages; |
| 10 | each addition or deletion of an annotation goes to a new web page. |
| 11 | Hence, in addition to the '''job_show()''' callback function, |
| 12 | the application uses a separate web page, '''user/bossa_example4.php''', |
| 13 | that handles the edit operations. |
| 14 | |
| 15 | The application is implemented by three scripts in ~/projects/test/html/: |
| 16 | |
| 17 | * [source:/trunk/boinc/html/ops/bossa_example4_make_jobs.php ops/bossa_example4_make_jobs.php]: a script that creates jobs. |
| 18 | * [source:/trunk/boinc/html/inc/bossa_example4.inc inc/bossa_example4.inc]: the application's callback functions. |
| 19 | * [source:/trunk/boinc/html/user/bossa_example4.php user/bossa_example4.php]: the handler for editing operations. |
| 20 | |
| 21 | == Creating jobs == |
| 22 | |
| 23 | Using the administrative interface, create an application named "bossa_example4". |
| 24 | Create a directory '''~/projects/test/html/user/example4_images'''. |
| 25 | Put some images (.png or .jpg) there; a good source is |
| 26 | http://isaac.ssl.berkeley.edu/test/example4_images/ |
| 27 | |
| 28 | Now go to the project's ops/ directory and type |
| 29 | |
| 30 | {{{ |
| 31 | php bossa_example4_make_jobs.php --dir example4_images |
| 32 | }}} |
| 33 | |
| 34 | == |