Changes between Version 3 and Version 4 of BluePrintREST
- Timestamp:
- 12/31/08 04:25:30 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BluePrintREST
v3 v4 4 4 5 5 Basic approach for the S3 architecture is to have a Web Services backend & a Javascript client front end. 6 7 6 RESTful APIs make this easier. 8 7 9 Web2Py generates fairly RESTful URLs anyway for the user-facing HTML pages, such as /sahana/pr/display_person/4 8 Web2Py generates URLs in this format: 9 {{{ 10 /application/ccontroller/function/arg1/arg2?var1=x,var2=y 11 }}} 12 These are generally fairly RESTful anyway, e.g.: 13 {{{ 14 /sahana/gis/add_feature 15 /sahana/gis/list_features 16 /sahana/gis/display_feature/1 17 /sahana/gis/update_feature/1 18 }}} 19 Is there much benefit in chaning to URLs like: 20 {{{ 21 /sahana/gis/feature/create 22 /sahana/gis/feature/list 23 /sahana/gis/feature/list_add 24 /sahana/gis/feature/display/x 25 /sahana/gis/feature/display/x?format=json 26 /sahana/gis/feature/update/x 27 }}} 10 28 11 We can extend this for exporting raw data in other formats using the optional vars: /sahana/pr/display_person/4?[xml|csv] 12 13 This, obviously, requires us to build-in support into the Controllers, which should be done within the framework to make it easy for module writers to take advantage of. 29 We want to be able extending this for exporting raw data in other formats using the optional vars: /sahana/pr/display_person/4?[xml|csv] 14 30 15 31 Web2Py already supports export as JSON, CSV & RTF. Hope to extend this to XML using http://www.reportlab.org/pyrxp.html 16 32 17 Some discussions: 18 * SQLRow to JSON: http://groups.google.com/group/web2py/browse_thread/thread/dfb65087574c24f1 33 It would be best for us to add support to the framework to make it easy for module writers to have this functionality within their controllers. 34 35 Discussion of changes to Web2Py to make it more RESTful: 19 36 * http://www.wellbehavedsystems.co.uk/web2py/examples/rest.html 20 37 * http://www.wellbehavedsystems.co.uk/web2py/examples/rest_alt1.html 21 38 39 New SQLROW to JSON function: 40 * http://groups.google.com/group/web2py/browse_thread/thread/dfb65087574c24f1 22 41 23 24 Web2Py currently doesn't support HTTP PUT/DELETE/UPDATE (only GET). 42 NB Web2Py currently doesn't support HTTP PUT/DELETE/UPDATE (only GET).