Sounds like you need to break the logic into modules instead of having them
all in the models folders that is kind of bad design. And module can be
imported into a conditional model file when needed which will make it
accessed to all actions in the controller that needs them. You can also
make cold
Bruce- thanks for the example- it's a good approach to selectively loading
tables. However I'm looking for a solution not only for avoiding
unnecessary table definitions but for avoiding unnecessary loading and
parsing of the model files themselves, as in my case they are big files
that house e
I am righting a quick example app as I don't think anyone is really
understanding what I am saying :D I will email it within the next 30 mins.
On Tue, Aug 28, 2012 at 10:36 PM, Bruce Wade wrote:
> Conditional models will work, however not with the default design as you
> may have noticed. In you
Conditional models will work, however not with the default design as you
may have noticed. In youadworld there are some controllers that required
access to 20 tables and others that required access to only a few tables.
The technique I used works perfect for that without ever duplicating the
model
pbreit- Yeah I thought about letting apache handle the public part, but
that still leaves me in the lurch because I can't use web2py to determine
whether the user is logged in, which is how we decide whether to deliver
the public or private portion to begin with. So the only practical course
is
Fair enough. If there's no processing at all, best to serve the static site
direct through Nginx/Apache. Otherwise, as you note, conditional models may
not work so waiting for "lazy tables" might be best (should be any day now
in 2.0).
On Tuesday, August 28, 2012 8:55:35 PM UTC-7, Yarin wrote:
Hey Bruce- again, it doesn't appear that you can use conditional models for
more than one controller at a time, and we're dealing with a large app
where multiple controllers need to load shared models. Massimo's stated as
much. Unless you've got a novel approach I don't see how that can be a
so
Hi Yarin,
Using conditional models will allow you to not load any models when you
don't need them. Your idea of moving the brochure part of the site so it
doesn't even get loaded by web2py will definitely increase performance
however if you just remove the need for loading the models that should b
Who said anything about premature? We want our app to run faster, and we
are gonna worry about it.
On Tuesday, August 28, 2012 11:49:22 PM UTC-4, pbreit wrote:
>
> If you haven't determined a performance issue, best to not worry about it
> ("premature optimization -> evil").
>
>
> On Tuesday, Au
If you haven't determined a performance issue, best to not worry about it
("premature optimization -> evil").
On Tuesday, August 28, 2012 6:52:12 PM UTC-7, Yarin wrote:
>
> A basic architecture question:
>
> We're putting together a typical web app where non-logged in users reach a
> public-fac
10 matches
Mail list logo