Using Promises with the JavaScript Object Model in SharePoint 2013

Reading Time: 1 minute

The front-end development provides support to have a responsive UI, now exist very third-party libraries that help the developers.
In this article I want to explain how is possible to use the javascript promises applied to JSOM (javascript object model) in SharePoint 2013, I used this particular topic in a project for a customer.

JSOM provides the possibility to retrieve information, fo​r example from a SharePoint list and to conduct the CRUD operations on it in asynchronous mode at all advantage of the UI.

However, in some cases is useful to wait the response of the call, for this support us the Deferred object of jQuery, in fact this object can storing a queue of callbacks and observe the success or failure state of any synchronous or asynchronous function.

Check this example present on the MSDN portal, obviously is necessary to do referencing at jQuery in the web page.

for following the full sample please look my post on Code MSDN and now enjoy with the code !