durusmail: quixote-users: why pass request object to public functions / methods
why pass request object to public functions / methods
why pass request object to public functions / methods
2005-01-03
2005-01-03
2005-01-03
2005-01-03
2005-01-03
2005-01-03
2005-01-03
2005-01-03
2005-01-03
2005-01-03
2005-01-05
2005-01-03
2005-01-03
why pass request object to public functions / methods
Toni Alatalo
2005-01-03
On Mon, 3 Jan 2005, Thomas Guettler wrote:

just a reaction, if this is becoming like a vote..

> I like the request in the signature of a method, too. You see immediately
> if a method is called via web or if it is a internal method which can't be
> called from a webbrowser.

i didn't dislike it either, vaguely seeing the same reason .. perhaps a
little analogous to how a reference to the instance is passed in method
calls as the first argument, instead of having a magic reference (like
'this' in Java?)

was sometimes a bit strange though to have it passed through a longish
chain of intermediate functions finally to the one that rendered the
response, but still didn't find that bad.

the decorator draft that Oleg just posted seemed interesting, thanks for
all those that have been slowly teaching the whole mechanism (haven't
studied, not to mention tried or used it, otherwise yet :)

>  Thomas

~Toni



reply