Changes between Version 53 and Version 54 of RESTController
- Timestamp:
- 08/22/10 18:44:54 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RESTController
v53 v54 3 3 = REST Controller = 4 4 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 providea 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 RESTful API of the [wiki:S3XRC_S3Resource S3Resource] class. 6 7 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, i.e. they can map HTTP requests to data resources and function calls. 8 8 9 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. 10 10 11 The function {{{shn_rest_controller()}}} provides a number of generic CRUD method handlers. These method handlers as well as {{{shn_rest_controller()}}} itself are implemented in:11 The function {{{shn_rest_controller()}}} provides by default a number of generic CRUD method handlers. These method handlers as well as {{{shn_rest_controller()}}} itself are implemented in: 12 12 13 13 * {{{models/01_crud.py}}}. … … 23 23 24 24 A good tool for testing the REST functionality is the [http://code.google.com/p/rest-client/ RESTClient] 25 26 25 == Resources == 27 26