Massimo

I am confused now, in your earlier reply you said

'Web applications must be written without persistent objects. State
is
share using the database, using sessions and using cache. '

and explained why other kinds of persistence were not possible. So are
global variables in modules  as good as session variables in
persistence terms? Why do they not suffer from the problems you
described so well in your previous email?

Peter


On Oct 31, 1:38 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> As Anthony suggests you can move code to modules and import modules.
> Module can have global level variables (that do not depend on the user
> or the request) that will be persistant within the process that
> imports the module.
>
> Database connections anyway, are handled by web2py in an efficient way
> already, by using connection pooling.
>
> On Oct 30, 10:30 am, Anthony <abasta...@gmail.com> wrote:
>
>
>
> > On Sunday, October 30, 2011 11:21:56 AM UTC-4, Ray (a.k.a. Iceberg) wrote:
>
> > > I guess what he concerns is performance. In other word, "web2py re-
> > > instantiate all class, variables, app logics, etc. ... every time a
> > > page is loaded.
>
> > Only the stuff in models, and you can reduce that by using conditional
> > models or by moving some code to modules and calling only when needed.
>
> > Anthony- Hide quoted text -
>
> - Show quoted text -

Reply via email to