Firstly thanks for your answers. In order to clarify some of the
remaining things:

1. Routes clarification

HTTP 1.1 defines [1] 7 methods: OPTIONS, GET, HEAD, POST, PUT, DELETE,
TRACE (and reserves the CONNECT). The web2py routing is using to
determine the function name in the controller a part of the URL
according to the rule:

/application/controller/[FUNCTION]/...

What I need to create a RESTful app is that FUNCTION is automatically
deduced from the HTTP Request method and not from the controller
function name. So, my controller will be:

class SomeController(object):
  def get(self):
     # all GET request to /application/somecontroller/ are getting
here

  def post(self):
     # all POST requests to /application/somecontroller/ are getting
here

2. Models and Data Access

As I have already said this is a probably a good enough starting point
http://mdp.cti.depaul.edu/AlterEgo/default/show/189  and I will most
probably be able to take it from there.

3. Templates

I'll re-read the documentation, but so far it looks like I should be
able to accomplish all 3 scenarios.

I will not comment on "Django templates are 'ill-defined'" as I have
no idea. As far as I can tell the 2 models that are actually working
are:
- Sitemesh: decoration + basic composition (http://
www.opensymphony.com/sitemesh/
- Tiles: composition

4. Cross-cutting request/response cycle interceptors

I think Yarko's answer is more in the direction I was looking, but
most probably I'll have to dig a bit into the code and come up with a
much more detailed question.

Massimo's first part of the answer is not a solution that it couples
the code with the interceptors and the main goal is exactly the
opposite: to separate the cross-cutting orthogonal concerns.

In conclusion, the only remaining question is if and how is it
possible to create a routing mechanism based on RESTful principles
that uses the HTTP request method information.

Many thanks,

./alex
--
.w( the_mindstorm )p.
  Alexandru Popescu



[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
[2] http://www.opensymphony.com/sitemesh/
[3] http://struts.apache.org/1.x/struts-tiles/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to