28 subscribers
Pergi ke luar talian dengan aplikasi Player FM !
Podcast Berbaloi untuk Didengar
DITAJA


Synchronous vs Asynchronous Programming in Salesforce
Manage episode 222531555 series 2443977
In this episode let’s look into what’s Synchronous and Asynchronous Programming and how do we do it Salesforce platform.
Synchronous Programming
In Synchronous programming statements will be executed one after the other. Say, we have 10 lines of code, then each and every line will be execute one after the other. So first line has to be executed it's only then the execution jumps to the second line. Likewise, second line has to be executed, only after that execution jumps on to the third line, so one and so forth. So, If our first statement is dealing with fetching list of Account records, until we get the data, execution will not jump on to the next line.
Asynchronous Programming
Asynchronous Programming is a methodology in which statements will not be executed one after the other. let’s say we have 10 lines of code and one of the statements in these 10 lines is a setTimeout() statement and lets go with the assumption that we want it to get executed after 10 secs. Then the execution comes to this setTimeOut statement and the moment the execution hits this statement, we are telling the computer I want to run this function but I don’t want to do it at least for a 10000 milliseconds in the future. So once 10 seconds from now gets passed that’s when I want this statement to get executed.
Often we use this format of coding when we want to get data from other systems or when we make AJAX calls and etc. So we make the call and the thread doesn’t know when the response is going to comeback. This is Asynchronous Programming.
We also discussed about other things in this episode. Please check it out.
× × × SIIIICK ××× PIIIICKS × × ×
A concept inspired from wesbos
Subscribe
You can subscribe to my course at Salesforce Casts
Links:
28 episod
Manage episode 222531555 series 2443977
In this episode let’s look into what’s Synchronous and Asynchronous Programming and how do we do it Salesforce platform.
Synchronous Programming
In Synchronous programming statements will be executed one after the other. Say, we have 10 lines of code, then each and every line will be execute one after the other. So first line has to be executed it's only then the execution jumps to the second line. Likewise, second line has to be executed, only after that execution jumps on to the third line, so one and so forth. So, If our first statement is dealing with fetching list of Account records, until we get the data, execution will not jump on to the next line.
Asynchronous Programming
Asynchronous Programming is a methodology in which statements will not be executed one after the other. let’s say we have 10 lines of code and one of the statements in these 10 lines is a setTimeout() statement and lets go with the assumption that we want it to get executed after 10 secs. Then the execution comes to this setTimeOut statement and the moment the execution hits this statement, we are telling the computer I want to run this function but I don’t want to do it at least for a 10000 milliseconds in the future. So once 10 seconds from now gets passed that’s when I want this statement to get executed.
Often we use this format of coding when we want to get data from other systems or when we make AJAX calls and etc. So we make the call and the thread doesn’t know when the response is going to comeback. This is Asynchronous Programming.
We also discussed about other things in this episode. Please check it out.
× × × SIIIICK ××× PIIIICKS × × ×
A concept inspired from wesbos
Subscribe
You can subscribe to my course at Salesforce Casts
Links:
28 episod
Semua episod
×
1 #28 Why Marc Benioff decided not to acquire Twitter 20:02

1 #27 All about the Syntax Expander tool am working on - Part 2 33:47

1 #26 All about the Syntax Expander tool am working on - Part 1 24:01

1 #24 Salesforce bets on a new cloud 12:14

1 #23 A $300 million investment Salesforce made that’s worthy enough 18:43

1 #22 A funny or inspirational story I heard from a friend recently 13:34

1 #21 Top 5 qualities I look at before I hire a Salesforce Developer 11:38

1 #20 Resume building tips for Salesforce Developers 12:32

1 Frequently asked questions by newbies 10:25




1 Everything you need to know about Oauth & JWT 12:38

1 All about Einstein & Voice Assistant 10:31


1 What to develop/build after you are done learning Salesforce and how to become a better Salesforce Developer. 12:05

Selamat datang ke Player FM
Player FM mengimbas laman-laman web bagi podcast berkualiti tinggi untuk anda nikmati sekarang. Ia merupakan aplikasi podcast terbaik dan berfungsi untuk Android, iPhone, dan web. Daftar untuk melaraskan langganan merentasi peranti.