Other OutSystems sites...
OutSystems Website
About Agility Blog
OutSystems Network
Login
Signup
Forums
Academy
Forge
Ideas
Forums
›
Technology & Integration
›
Performance question
Performance question
Rui Molefas
Rank: #264
Posted on 2012-05-16
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Hello all,
this is probably not my sharpest question but...what is better, to rely on database access or to "walk around" with a number of arguments?
I ask this because in some cases I use an action in a webscreen to query a certain DB to get a certain value, and in the next screens some of the attributes i also got with that query will also be used. Is it better to make queries on each screen to get specific values or, in the first query get all the attributes and pass them onto the next web screens as arguments.
This is merely to increase the performance of my application.
Thank you in advance.
Hermínio Mira
Rank: #60
Posted on 2012-05-17
thumbs_up_ico
1
thumbs_down_ico
0
reply
post_link_ico
Hi Rui,
In my experience I found out that I prefer to do queries in each screen, the issues I see with using values as parameters:
gets messy really quick (always adding non mandatory input parameters which you then forget what they are supposed to do in a week...)
can lead to "strange" errors in screens just because you forgot to assign a variable in some link
maintainablility is gonna be tough...
new users looking at the code will say "what was this guy thinking when he put 30 input parameters?" :)
Hope it helps,
Hermínio Mira
Ricardo Araújo
Rank: #44
Posted on 2012-05-17
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Rui Molefas wrote
:
in some cases I use an action in a webscreen to query a certain DB to get a certain value, and in the next screens some of the attributes i also got with that query will also be used. Is it better to make queries on each screen to get specific values or...
Rui,
forget the or part. It's better to do simple queries in the screens because the platform will tune the query in order to get only the used attributes in that screen otherwise you'll retrive all attributes in the entities existing in that query.
Cheers,
Ricardo
Rui Molefas
Rank: #264
Posted on 2012-05-17
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Thanks a lot for your replies!
Evert van der Zalm
Rank: #32
Posted on 2012-05-18
thumbs_up_ico
0
thumbs_down_ico
0
reply
post_link_ico
Hermínio Mira wrote
:
Hi Rui,
In my experience I found out that I prefer to do queries in each screen, the issues I see with using values as parameters:
gets messy really quick (always adding non mandatory input parameters which you then forget what they are supposed to do in a week...)
can lead to "strange" errors in screens just because you forgot to assign a variable in some link
maintainablility is gonna be tough...
new users looking at the code will say "what was this guy thinking when he put 30 input parameters?" :)
Hope it helps,
Hermínio Mira
Don't forget the security issue (url manupilation).
Ricardo Araújo wrote
:
Rui Molefas wrote
:
in some cases I use an action in a webscreen to query a certain DB to get a certain value, and in the next screens some of the attributes i also got with that query will also be used. Is it better to make queries on each screen to get specific values or...
Rui,
forget the or part. It's better to do simple queries in the screens because the platform will tune the query in order to get only the used attributes in that screen otherwise you'll retrive all attributes in the entities existing in that query.
Cheers,
Ricardo
Ricardo, please don't say it like it's always tuned by the platform, there are some rules before that is done....
Kind regards,
Evert
Quick Reply
Notify me by email when someone answers to my post
attachment
Choose File
No file chosen
Submit
Login to reply
Something on your mind?
Login to Start a Discussion
Top Forums Posters
Gonçalo Martins
Davide Marquês
Charles Colaço
Ricardo Silva
Richard Pearson
Statler & Waldorf
Justin James
Fábio Silva
Robert Chanphakeo
André Vieira
See leaderboard
Online Training
On-demand video lessons to help you learn at your own pace.
Learn More