Changes between Version 63 and Version 64 of RESTController
- Timestamp:
- 10/23/10 20:05:52 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v63 v64 8 8 == Introduction == 9 9 10 The so called '''REST Controller''' (function {{{s hn_rest_controller()}}}) is a wrapper function for the RESTful API of the [wiki:S3XRC_S3Resource S3Resource] class.10 The so called '''REST Controller''' (function {{{s3_rest_controller()}}}) is a wrapper function for the RESTful API of the [wiki:S3XRC_S3Resource S3Resource] class. 11 11 12 12 The [wiki:S3XRC_S3Resource S3Resource] class implements a generic '''RESTful API''' ([http://en.wikipedia.org/wiki/Representational_State_Transfer Representational State Transfer]) for Sahana Eden database resources, which maps HTTP requests (i.e., URLs and HTTP methods like GET, PUT, DELETE etc.) to internal data stores (e.g. database resources) and methods (e.g. CRUD), and applies the methods by calling so called ''method handlers''. 13 13 14 Method handlers are to be provided by the calling controller via hooks. The function {{{s hn_rest_controller()}}} simplifies the use of the REST interface and provides a number of pre-configured standard CRUD method handlers.15 16 These default method handlers as well as {{{s hn_rest_controller()}}} itself are implemented in:17 18 * {{{mod els/01_crud.py}}}.19 20 The method handlers of {{{ 01_crud.py}}} support a number of data representation formats:14 Method handlers are to be provided by the calling controller via hooks. The function {{{s3_rest_controller()}}} simplifies the use of the REST interface and provides a number of pre-configured standard CRUD method handlers. 15 16 These default method handlers as well as {{{s3_rest_controller()}}} itself are implemented in: 17 18 * {{{modules/s3xrc/s3crud.py}}}. 19 20 The method handlers of {{{s3crud.py}}} support a number of data representation formats: 21 21 22 22 * HTML (including autogenerated Create/Update forms)