> Regarding the comment that the flexibility to have a separate wrapper is 
> not important,
>

Unimportant for the wrapper code to be outside the application folder 
because there is a simple approach that should work fine. The installer 
creates the /applications/myapp folder and puts a single __wrapper.py file 
inside the /models folder. The content of this wrapper file would be 
sufficient to handle pre-processing of the request as well as 
post-processing of the response. The application developer would send the 
application to the installer, and it would simply be unpacked on top of the 
/myapp folder, leaving the __wrapper.py file in place (alternatively, the 
__wrapper.py file cold be copied in after).

By the way, this process is exactly identical to the plugin proposal 
(though without using the strict naming conventions of the plugin system, 
which would complicate things unnecessarily). You could view either the 
wrapper or the wrapped application (or both) as a plugin (a plugin is just 
any subset of an application).

Note, something like the above is only really necessary if you assume you 
have to wrap arbitrary applications and that there can be no coordination 
or cooperation between the installer and the application developer. Without 
those constraints, we could instead simply provide an API to the 
application developer, and the application could be responsible for 
importing from a special "wrapper" module in order to set up the code 
necessary to do the wrapping.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to