Code repository for the 2016 Dreamforce Presentation -- Using JavaScript Promises with JavaScript Remoting and Visualforce Remote Objects
The code for this demo is in the Remote_Object_Demo.page. It uses the q library to define a JavaScript Promise that calls the .retrieve() method on the Account model created by the Visualforce Remote Objects framework.
The code for this demo is in the Remoting_Demo.page and Remoting_Demo_Controller.cls. It uses the q library to define a JavaScript Promise that calls the .getAccounts() Remote Method on the controller using the JavaScript Remoting framework.
JavaScript Promises There and back again
Understanding JavaScript Promises
q, A promise library for JavaScript