SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

"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
 
Jasper Reports
Jasper ReportsJasper Reports
Jasper Reports
Enkitec
 
A Short Intorduction to JasperReports
A Short Intorduction to JasperReportsA Short Intorduction to JasperReports
A Short Intorduction to JasperReports
Guo Albert
 

Andere mochten auch (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
 

Ähnlich wie Promise Object in Windows Store App

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
johniemcm5zt
 
Interview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRMInterview Questions For Microsoft Dynamics CRM
Interview Questions For Microsoft Dynamics CRM
Kumari Warsha Goel
 
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
Geoffrey De Smet
 
Rails Operations - Lessons Learned
Rails Operations -  Lessons LearnedRails Operations -  Lessons Learned
Rails Operations - Lessons Learned
Josh Nichols
 

Ähnlich wie 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
 

Mehr von Mindfire Solutions

Mehr von 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
 

Kürzlich hochgeladen

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Kürzlich hochgeladen (20)

SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
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 ...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
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
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
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 🔝✔️✔️
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

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