Re: [web2py] Application Arquitecture advices

2015-04-17 Thread Sébastien Loix
I am mixing both client and server side code according to my need. All the json data loaded into angular is made through *Restangular *calls to a controler 'api.py'. In that api controller I have several functions, all with the '@request.restful()' decorator. Inside each of them I import a

Re: [web2py] Application Arquitecture advices

2015-04-16 Thread Niphlod
calling web2py functions is still taxing the server. Don't forget that for the 99% of usecases, the taxing problem is accessing the db data, not processing it. On Thursday, April 16, 2015 at 2:46:08 AM UTC+2, Richard wrote: Ok, you are right... I only said that as long as that page not reload

Re: [web2py] Application Arquitecture advices

2015-04-15 Thread Richard Vézina
Sébastien, Start by making something then when you will need performance you can work on it. I have 155 tables in my app and it is not the model that slow down things... It is more the number of records in these tables that matter so far... I mean, I should use SQLFORM.grid which use paging and

Re: [web2py] Application Arquitecture advices

2015-04-15 Thread Sébastien Loix
Thank you Richard, I really appreciate your time to explain it to me. I think I start understanding it all slowly... You're right that until I don't have any performance issue I shouldn't try to optimize anything. I already created some modules that I import when needed (mainly for API calls

Re: [web2py] Application Arquitecture advices

2015-04-15 Thread Richard Vézina
Wait if you use Angular you won't really need to care about performance issue before a lot of time... Since you are not going to experiment be performance issue except when you reload page... Richard On Wed, Apr 15, 2015 at 12:55 PM, Sébastien Loix seb1...@gmail.com wrote: Thank you Richard, I

Re: [web2py] Application Arquitecture advices

2015-04-15 Thread Niphlod
this is the uttmost unproper and biased statement I've seen in a while. Angular doesn't make your app fast by default, and neither snappier, and neither more resource-friendly on the server. If you're good with Angular you're just pushing your logic client-side, and avoiding page reloads. This

Re: [web2py] Application Arquitecture advices

2015-04-15 Thread Richard Vézina
Ok, you are right... I only said that as long as that page not reload and he call web2py functions which are not requesting a new page load it will reduce the amount of server side processing since the function call will have limited web2py API call... Richard On Wed, Apr 15, 2015 at 6:35 PM,

Re: [web2py] Application Arquitecture advices

2015-04-14 Thread 黄祥
yes, you are right, models executed on every request. but you can use, model less application (define table using modules, best practice if you have the same table that been used by more than 1 web2py app) or conditional models (response.models_to_run) In book you can see an advice : -

Re: [web2py] Application Arquitecture advices

2015-04-14 Thread Sébastien Loix
Hi Richard, Thank you for the advice. I hadn't yet looked into web2py plugins and now that I read carefully the docs it seems that it can be a great solution! What I am worried about is that I see my models grow rapidly and I read somewhere (I can't find the post anymore) that models should be

Re: [web2py] Application Arquitecture advices

2015-04-13 Thread Richard Vézina
If it all for the same client, I would say single app... Think : db backup, one app will growth faster than the other, more boiler plate (2X, or more if you have more than 2 apps), all the issues you already aware of regarding authentification... I would suggest you to use web2py plugin system if

[web2py] Application Arquitecture advices

2015-04-10 Thread Sébastien Loix
Hi to all, I would like to ask for some advices on my web2py application arquitecture as I am seeing it grow rapidly and it might be a good time to start thinking it through before it is too late :) The website I am working on consist of several big parts (for now it has 2 web2py