Dispatching operations to user-defined methods
Hallvard B Furuseth
h.b.furuseth at usit.uio.no
Wed May 3 04:20:09 EDT 2006
I wrote:
> I'm wondering how to design this:
> (...)
> One obvious implementation would be to provide a class Operation,
> let the user define a single subclass of this, and have the server
> call request_search(), response_search(), request_modify(),
> check_access() etc in that subclass.
>
> Then I suppose the server would turn individual operations into
> instance of internal subclasses of the user's subclass - class
> SearchOperation(<user's class>), ModifyOperation(<user's class>)
> etc. Begins to look a bit messy now.
> (...)
<Slap head> Or two classes - one operation class and one class
subclassed by the user.
Still need some way to let the user provide both general and more
specialized methods though.
--
Hallvard
More information about the Python-list
mailing list