Page 1 of 1

difference between XHR and Collection/DatabaseUser in Server Code

Posted: Wed Jul 01, 2015 8:33 am
by Dongzhi Yang7528784

Hi Team,

For server code, you have provided 2 ways of interacting with the database, using XHR and using Collection/ DatabaseUser objects.

Could you let me know the major differences between them? for example, in situations where I can use both, which one is more efficient , faster or resource friendly?
I'd like to know this because I want to build efficient code in server script

Thanks

Dongzhi


difference between XHR and Collection/DatabaseUser in Server Code

Posted: Wed Jul 01, 2015 4:54 pm
by Serhii Kulibaba

Hello Dongzhi,

Use XHR for all REST APIs;
Use Collection/DatabaseUser only for appery.io DB queries;

It is better to use Collection/DatabaseUser for working with appery.io DB.


difference between XHR and Collection/DatabaseUser in Server Code

Posted: Thu Jul 02, 2015 2:28 am
by Dongzhi Yang7528784

Thanks for the answer