SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
Promise Object
Presenter: Nirmal Hota, Mindfire Solutions
Date: 21/02/2014
About Me
MCTS : .NET Framework 4, Web Applications
MCTS : MS Dynamics CRM 2011 Customization and Configuration
MCTS : Microsoft Dynamics CRM 2011 Applications
TCAD : Titanium Certified Application Developer
MS Dynamics CRM, Commerce Server, .Net, WinJS, PhoneGap, Titanium,
Xamarin
My Key Skills
Connect me in :
Facebook : http://www.facebook.com/nirmal.hota.14
Twitter : http://twitter.com/nirmalhota
LinkedIn : http://in.linkedin.com/in/nirmalhota
Google+ : https://plus.google.com/104872959343373237226
Blog : http://nirmalhota.blogspot.in/
Skype : mfsi_nirmal
Contact me in :
Email : nirmalh@mindfiresolutions.com | nirmalhota@gmail.com
Agenda
>> What is a promise
>> How it works
>> Advantages of promise
>> Real life implementation (Demo)
>> Q & A
>> Some frequently used methods
What is a promise
>> Schedule work for future
>> Asynchronous programming approach
>> Runs in background thread
>> Foreground works without blocking
>> Methods exposed by convention ends with “Async”
How it works
Application
Give me stuffs (via XHR call)
MoveNext
Promisestogetback
Search
I will manipulate
the stuff if I get it
HereisyourStuff
Got it :)
Let's manipulate
Some frequently used Methods
>> then : Allows to define tasks to be done after
promise fulfilled.
>> done : Allows to define tasks to be done after
promise fulfilled.
>> any : Allows to define tasks to be done after any of
the task performed among a set of promises.
>> join : Allows to define tasks to be done after all of
the tasks performed among a set of promises.
>> cancel : Allows to cancel an in progress promise
then vs done
>> Both of them are used after the completion of
promised task
>> Both the methods takes the same kind of
parameters completed, error and in progress handlers
>> “then” returns a promise object where as “done”
returns an undefined
>> In case any exception occurred in the promised
block, “then” puts the error in the promise object and
return it to outside. But “done” throws the same to
outside as a normal exception. So better place for
“done” is at the end of the promise chain
Advantages of promise
>> No blocking of main thread for long running XHR
calls. This can be handled in the background
>> Ability to define the tasks after a long running XHR
is over
>> Can chain multiple calls
>> Tasks can be defined to be done after the
completion of multiple parallel processes or any
process out the set processes
Real life implementation
Demo
Question and
Answer
Thank you
www.mindfiresolutions.com
https://www.facebook.com/MindfireSolutions
http://www.linkedin.com/company/mindfire-solutions
http://twitter.com/mindfires

Contenu connexe

En vedette

Jasper reports in 3 easy steps
Jasper reports in 3 easy stepsJasper reports in 3 easy steps
Jasper reports in 3 easy stepsIvaylo Zashev
 
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces..."Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...hamidsamadi
 
Mobile Web Development from Scratch
Mobile Web Development from ScratchMobile Web Development from Scratch
Mobile Web Development from ScratchNokiaAppForum
 
Jaspersoft Studioチュートリアル1 - レポートの作成
Jaspersoft Studioチュートリアル1 - レポートの作成Jaspersoft Studioチュートリアル1 - レポートの作成
Jaspersoft Studioチュートリアル1 - レポートの作成htshozawa
 
Jasper Reports
Jasper ReportsJasper Reports
Jasper ReportsEnkitec
 
Introduction to java Jasper Report with Server & iReport
Introduction to java Jasper Report with Server & iReportIntroduction to java Jasper Report with Server & iReport
Introduction to java Jasper Report with Server & iReportArif Hosain
 
Embedding Jaspersoft into your PHP application
Embedding Jaspersoft into your PHP applicationEmbedding Jaspersoft into your PHP application
Embedding Jaspersoft into your PHP applicationMariano Luna
 
BatchJobService
BatchJobServiceBatchJobService
BatchJobServicesupergigas
 
A Short Intorduction to JasperReports
A Short Intorduction to JasperReportsA Short Intorduction to JasperReports
A Short Intorduction to JasperReportsGuo Albert
 
Open Source Reporting Tool Comparison
Open Source Reporting Tool ComparisonOpen Source Reporting Tool Comparison
Open Source Reporting Tool ComparisonRogue Wave Software
 
Introduction to Jasper Reports
Introduction to Jasper ReportsIntroduction to Jasper Reports
Introduction to Jasper ReportsMindfire Solutions
 

En vedette (14)

Jasper reports in 3 easy steps
Jasper reports in 3 easy stepsJasper reports in 3 easy steps
Jasper reports in 3 easy steps
 
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces..."Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
"Analytics inside your Java application", Part 2, jDays 2015 Speaker: "Veaces...
 
Mobile Web Development from Scratch
Mobile Web Development from ScratchMobile Web Development from Scratch
Mobile Web Development from Scratch
 
Jaspersoft Studioチュートリアル1 - レポートの作成
Jaspersoft Studioチュートリアル1 - レポートの作成Jaspersoft Studioチュートリアル1 - レポートの作成
Jaspersoft Studioチュートリアル1 - レポートの作成
 
Jasper Reports
Jasper ReportsJasper Reports
Jasper Reports
 
Introduction to java Jasper Report with Server & iReport
Introduction to java Jasper Report with Server & iReportIntroduction to java Jasper Report with Server & iReport
Introduction to java Jasper Report with Server & iReport
 
Advanced Jasper Reports
Advanced Jasper ReportsAdvanced Jasper Reports
Advanced Jasper Reports
 
Embedding Jaspersoft into your PHP application
Embedding Jaspersoft into your PHP applicationEmbedding Jaspersoft into your PHP application
Embedding Jaspersoft into your PHP application
 
BatchJobService
BatchJobServiceBatchJobService
BatchJobService
 
A Short Intorduction to JasperReports
A Short Intorduction to JasperReportsA Short Intorduction to JasperReports
A Short Intorduction to JasperReports
 
Open Source Reporting Tool Comparison
Open Source Reporting Tool ComparisonOpen Source Reporting Tool Comparison
Open Source Reporting Tool Comparison
 
Introduction to Jasper Reports
Introduction to Jasper ReportsIntroduction to Jasper Reports
Introduction to Jasper Reports
 
Japer Reports
Japer ReportsJaper Reports
Japer Reports
 
Captcha ppt
Captcha pptCaptcha ppt
Captcha ppt
 

Similaire à Promise Object in Windows Store App

MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneIntegralZone
 
Building configurable applications for the web
Building configurable applications for the webBuilding configurable applications for the web
Building configurable applications for the websupertom
 
BITS 2016 How DevOps Ends the War Between Developers and Sysadmins
BITS 2016   How DevOps Ends the War Between Developers and SysadminsBITS 2016   How DevOps Ends the War Between Developers and Sysadmins
BITS 2016 How DevOps Ends the War Between Developers and SysadminsAhmed Musaad
 
Agile Delivery Methods And Leadership
Agile Delivery Methods And LeadershipAgile Delivery Methods And Leadership
Agile Delivery Methods And LeadershipRanjith Varghese
 
Development frameworks and methods
Development frameworks and methodsDevelopment frameworks and methods
Development frameworks and methodsMin Phone Nyunt Win
 
Student Answer and Work Form Unit 3 Ver. CStudent Name ________.docx
Student Answer and Work Form Unit 3 Ver. CStudent Name ________.docxStudent Answer and Work Form Unit 3 Ver. CStudent Name ________.docx
Student Answer and Work Form Unit 3 Ver. CStudent Name ________.docxjohniemcm5zt
 
Remotetestingfeaturev1 160109071942
Remotetestingfeaturev1 160109071942Remotetestingfeaturev1 160109071942
Remotetestingfeaturev1 160109071942Arunkumar H
 
Remotetestingfeature v1.1
Remotetestingfeature v1.1Remotetestingfeature v1.1
Remotetestingfeature v1.1Arunkumar H
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoDEVCON
 
How to explain DevOps to your mom
How to explain DevOps to your momHow to explain DevOps to your mom
How to explain DevOps to your momAndreas Grabner
 
Malware Cleanup Project
Malware Cleanup ProjectMalware Cleanup Project
Malware Cleanup ProjectSubarno Saha
 
Interview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMInterview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMKumari Warsha Goel
 
Becoming the Docker Champion: Bringing Docker Back to Work
Becoming the Docker Champion: Bringing Docker Back to WorkBecoming the Docker Champion: Bringing Docker Back to Work
Becoming the Docker Champion: Bringing Docker Back to WorkDocker, Inc.
 
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev ConferenceWhat is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev ConferenceGeoffrey De Smet
 
Rails Operations - Lessons Learned
Rails Operations -  Lessons LearnedRails Operations -  Lessons Learned
Rails Operations - Lessons LearnedJosh Nichols
 
How to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleHow to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleAlexandra N. Martinez
 
Salesforce Apex Hours:-Mitigate with Mono-Purpose Microservices
Salesforce Apex Hours:-Mitigate with Mono-Purpose MicroservicesSalesforce Apex Hours:-Mitigate with Mono-Purpose Microservices
Salesforce Apex Hours:-Mitigate with Mono-Purpose MicroservicesAmit Chaudhary
 

Similaire à Promise Object in Windows Store App (20)

MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
 
Building configurable applications for the web
Building configurable applications for the webBuilding configurable applications for the web
Building configurable applications for the web
 
BITS 2016 How DevOps Ends the War Between Developers and Sysadmins
BITS 2016   How DevOps Ends the War Between Developers and SysadminsBITS 2016   How DevOps Ends the War Between Developers and Sysadmins
BITS 2016 How DevOps Ends the War Between Developers and Sysadmins
 
Agile Delivery Methods And Leadership
Agile Delivery Methods And LeadershipAgile Delivery Methods And Leadership
Agile Delivery Methods And Leadership
 
Development frameworks and methods
Development frameworks and methodsDevelopment frameworks and methods
Development frameworks and methods
 
Student Answer and Work Form Unit 3 Ver. CStudent Name ________.docx
Student Answer and Work Form Unit 3 Ver. CStudent Name ________.docxStudent Answer and Work Form Unit 3 Ver. CStudent Name ________.docx
Student Answer and Work Form Unit 3 Ver. CStudent Name ________.docx
 
Remotetestingfeaturev1 160109071942
Remotetestingfeaturev1 160109071942Remotetestingfeaturev1 160109071942
Remotetestingfeaturev1 160109071942
 
Remotetestingfeature v1.1
Remotetestingfeature v1.1Remotetestingfeature v1.1
Remotetestingfeature v1.1
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent Convento
 
How to explain DevOps to your mom
How to explain DevOps to your momHow to explain DevOps to your mom
How to explain DevOps to your mom
 
Malware Cleanup Project
Malware Cleanup ProjectMalware Cleanup Project
Malware Cleanup Project
 
Interview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMInterview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRM
 
Becoming the Docker Champion: Bringing Docker Back to Work
Becoming the Docker Champion: Bringing Docker Back to WorkBecoming the Docker Champion: Bringing Docker Back to Work
Becoming the Docker Champion: Bringing Docker Back to Work
 
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev ConferenceWhat is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
What is Drools, Guvnor and Planner? 2012 02-17 Brno Dev Conference
 
Rails Operations - Lessons Learned
Rails Operations -  Lessons LearnedRails Operations -  Lessons Learned
Rails Operations - Lessons Learned
 
Role of dev ops in it consulting
Role of dev ops in it consultingRole of dev ops in it consulting
Role of dev ops in it consulting
 
How to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in MuleHow to use Salesforce composite request connector in Mule
How to use Salesforce composite request connector in Mule
 
Salesforce Apex Hours:-Mitigate with Mono-Purpose Microservices
Salesforce Apex Hours:-Mitigate with Mono-Purpose MicroservicesSalesforce Apex Hours:-Mitigate with Mono-Purpose Microservices
Salesforce Apex Hours:-Mitigate with Mono-Purpose Microservices
 
What's new in Microsoft Teams
What's new in Microsoft Teams What's new in Microsoft Teams
What's new in Microsoft Teams
 
CV28022015
CV28022015CV28022015
CV28022015
 

Plus de Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 

Dernier

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Dernier (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 

Promise Object in Windows Store App

  • 1. Promise Object Presenter: Nirmal Hota, Mindfire Solutions Date: 21/02/2014
  • 2. About Me MCTS : .NET Framework 4, Web Applications MCTS : MS Dynamics CRM 2011 Customization and Configuration MCTS : Microsoft Dynamics CRM 2011 Applications TCAD : Titanium Certified Application Developer MS Dynamics CRM, Commerce Server, .Net, WinJS, PhoneGap, Titanium, Xamarin My Key Skills Connect me in : Facebook : http://www.facebook.com/nirmal.hota.14 Twitter : http://twitter.com/nirmalhota LinkedIn : http://in.linkedin.com/in/nirmalhota Google+ : https://plus.google.com/104872959343373237226 Blog : http://nirmalhota.blogspot.in/ Skype : mfsi_nirmal Contact me in : Email : nirmalh@mindfiresolutions.com | nirmalhota@gmail.com
  • 3. Agenda >> What is a promise >> How it works >> Advantages of promise >> Real life implementation (Demo) >> Q & A >> Some frequently used methods
  • 4. What is a promise >> Schedule work for future >> Asynchronous programming approach >> Runs in background thread >> Foreground works without blocking >> Methods exposed by convention ends with “Async”
  • 5. How it works Application Give me stuffs (via XHR call) MoveNext Promisestogetback Search I will manipulate the stuff if I get it HereisyourStuff Got it :) Let's manipulate
  • 6. Some frequently used Methods >> then : Allows to define tasks to be done after promise fulfilled. >> done : Allows to define tasks to be done after promise fulfilled. >> any : Allows to define tasks to be done after any of the task performed among a set of promises. >> join : Allows to define tasks to be done after all of the tasks performed among a set of promises. >> cancel : Allows to cancel an in progress promise
  • 7. then vs done >> Both of them are used after the completion of promised task >> Both the methods takes the same kind of parameters completed, error and in progress handlers >> “then” returns a promise object where as “done” returns an undefined >> In case any exception occurred in the promised block, “then” puts the error in the promise object and return it to outside. But “done” throws the same to outside as a normal exception. So better place for “done” is at the end of the promise chain
  • 8. Advantages of promise >> No blocking of main thread for long running XHR calls. This can be handled in the background >> Ability to define the tasks after a long running XHR is over >> Can chain multiple calls >> Tasks can be defined to be done after the completion of multiple parallel processes or any process out the set processes