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 
solution. Thanks

On Tuesday, August 28, 2012 11:56:27 PM UTC-4, Bruce Wade wrote:
>
> 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 be 
> good enough. I want to go even 1 step further on my next project, have the 
> HTML loaded and cached directly from nginx and only used web2py on 
> ajax/socketio requests to load json to the HTML which will then parse and 
> load the content. 
>
> Now that I am no longer working on the secure.youadworld.com project I 
> can write a little tutorial on how I used conditional models for that 
> application. I will create an example project to show this technique. I'm 
> sure others have there own ways also.
>
> On Tue, Aug 28, 2012 at 8:49 PM, pbreit <[email protected] <javascript:>
> > wrote:
>
>> 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-facing basic 'brochure' site, and then log in to reach the 'real' 
>>> application. With such a setup, it makes no sense to be loading models for 
>>> the public portion of the site, as it's just some semi-static pages and a 
>>> login form. So I'm wondering 
>>>
>>>    - a) Is there a way to prevent models loading at the request or 
>>>    controller level?
>>>    - b) Should the 'public' site be part of the same application at 
>>>    all, or should it be a separate light-weight application with a login 
>>> form 
>>>    that then points to the 'real' application? 
>>>    
>>>  -- 
>>  
>>  
>>  
>>
>
>
>
> -- 
> -- 
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>  

-- 



Reply via email to