> I'm not sure I understand.  What do you mean "variables" in this
> context?
Uh, sorry. I was talking about "arguments". How does your
define-callable-url react on /add, /add/1 and /add/1/2? For summation it
may be ok to have a unspecified number of arguments, but consider
webapps like blogs or wikis. This will mean checking for number of
arguments in every callable-url? Example: "/names/show-some-name/x/y/z"

I also dislike the hidden state with all this add-resource or
define-callable-url. Maybe this is only me coming from Pythonland,
where "explicit is better than implicit". I can't *see* how start-server
finds things from add-resource or define-callable-url, but rather
assume another global namespace for resources. Passing an
explicit handler (like my dispatch-rules) looks better to me. This is
opinioniated, so what do you think?

Dispatch on HTTP methods like GET and POST (but also DELETE, PUT and
more) is essential for REST-style web apps. But not only this is more
strict. This can dispatch on number of arguments for example:

(dispatch-rules
 ("/:one/:two" (GET bla))
 ("/:only-one" (GET blub)))


-- 
Gottes Segen!
Andi


  | Mail: [EMAIL PROTECTED] 
  | Web: http://beza1e1.tuxen.de
  | Jabber: [EMAIL PROTECTED]


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to