Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

difference between XHR and Collection/DatabaseUser in Server Code

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

difference between XHR and Collection/DatabaseUser in Server Code

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.

Return to “Issues”