Changes between Version 51 and Version 52 of RESTController
- Timestamp:
- 08/22/10 18:41:20 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v51 v52 3 3 = REST Controller = 4 4 5 [wiki:S3XRC_S3Resource S3Resource]s provide a generic '''RESTful API''' ([http://en.wikipedia.org/wiki/Representational_State_Transfer Representational State Transfer]) for Sahana Eden database resources, i.e. they can map HTTP requests to data resources and function calls. 5 The so called '''REST Controller''' (function ''shn_rest_controller()'') is a wrapper function for the REST interface of the [wiki:S3XRC_S3Resource S3Resource]. 6 7 [wiki:S3XRC_S3Resource S3Resource] objects provide a generic '''RESTful API''' ([http://en.wikipedia.org/wiki/Representational_State_Transfer Representational State Transfer]) for Sahana Eden database resources, i.e. they can map HTTP requests to data resources and function calls. 6 8 7 9 In particular, they map resource addresses (=URL's) and HTTP methods (=GET, PUT, DELETE etc.) to CRUD actions, and then invoke so called ''method handlers'' (provided by the calling controller via hooks) to execute those actions. 8 10 9 The so called '''REST Controller''' (function ''shn_rest_controller()'') is a wrapper function for the S3Resource REST interface, which provides generic CRUD method handlers. These method handlers as well as the REST controller itself are implemented in {{{models/01_crud.py}}}. 11 The function {{{shn_rest_controller()}}} which provides a number of generic CRUD method handlers. These method handlers as well as the REST controller itself are implemented in 12 13 * {{{models/01_crud.py}}}. 10 14 11 15 The method handlers support a number of data representation formats: … … 16 20 * CSV 17 21 18 See also: [wiki:S3XRC S3XRC] , [wiki:DeveloperGuidelinesRESTCustomisation REST Customisation]22 See also: [wiki:S3XRC S3XRC] 19 23 20 24 A good tool for testing the REST functionality is the [http://code.google.com/p/rest-client/ RESTClient]