Changes between Version 3 and Version 4 of BluePrintREST


Ignore:
Timestamp:
12/31/08 04:25:30 (16 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintREST

    v3 v4  
    44
    55Basic approach for the S3 architecture is to have a Web Services backend & a Javascript client front end.
    6 
    76RESTful APIs make this easier.
    87
    9 Web2Py generates fairly RESTful URLs anyway for the user-facing HTML pages, such as /sahana/pr/display_person/4
     8Web2Py generates URLs in this format:
     9{{{
     10/application/ccontroller/function/arg1/arg2?var1=x,var2=y
     11}}}
     12These 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}}}
     19Is 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}}}
    1028
    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.
     29We want to be able extending this for exporting raw data in other formats using the optional vars: /sahana/pr/display_person/4?[xml|csv]
    1430
    1531Web2Py already supports export as JSON, CSV & RTF. Hope to extend this to XML using http://www.reportlab.org/pyrxp.html
    1632
    17 Some discussions:
    18  * SQLRow to JSON: http://groups.google.com/group/web2py/browse_thread/thread/dfb65087574c24f1
     33It 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
     35Discussion of changes to Web2Py to make it more RESTful:
    1936 * http://www.wellbehavedsystems.co.uk/web2py/examples/rest.html
    2037 * http://www.wellbehavedsystems.co.uk/web2py/examples/rest_alt1.html
    2138
     39New SQLROW to JSON function:
     40 * http://groups.google.com/group/web2py/browse_thread/thread/dfb65087574c24f1
    2241
    23 
    24 Web2Py currently doesn't support HTTP PUT/DELETE/UPDATE (only GET).
     42NB Web2Py currently doesn't support HTTP PUT/DELETE/UPDATE (only GET).