SlideShare a Scribd company logo
All Aboard
The Lightning Components Action Service
​ Peter Chittum
​ Developer Evangelist
​ @pchittum
​ github.com/pchittum
​ 
Safe Harbor
Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize
or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by
the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any
projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding
strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or
technology developments and customer contracts or use of our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality
for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and
rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with
completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our
ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment,
our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on
potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent
fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important
disclosures are available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and
may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are
currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Peter Chittum
Developer Evangelist
@pchittum
github.com/pchittum
Speaker
Agenda
▪  Brief Overview of Components
▪  Action Service Basics
▪  Beyond the Basics
▪  A Miscellany of Things
App Cloud and Lightning
Connect Process
Builder
App
Builder
Component
Framework
Introducing Lightning Components
​ Reusable UI components for any device
Connect
Process
Builder
App
Builder
Component
Framework
Component Artifacts
Design Principles
•  Structured Bundle of
Resources
•  Client-side Rendered
•  Extensible, Reusable, Atomic,
Event-Driven
•  Apex as backend
•  First Class UI Citizen
APP or COMPONENT BUNDLE
Definition: markup
Style: css
Helper : js
Documentation
Controller: js
Renderer: js
Design Markup Icon: SVG
Component Client Side Rendering
JSON
component:{...}
<div>...</div>
Component State
Attribute
Component-to-Component Communication
Event
Component-to-Server Communication
Action
Agenda
▪  Brief Overview of Components
▪  Action Service Basics
▪  Beyond the Basics
▪  A Miscellany of Things
Actions: Interact with the Server
•  Apex Method Surfaced to Lightning Components
•  @AuraEnabled annotation
Many Components Many Server Trips
XMLHttpRequest
XMLHttpRequest
XMLHttpRequest
Many Components Many Actions: Boxcarring
ActionService
Demo
Agenda
▪  Brief Overview of Components
▪  Action Service Basics
▪  Beyond the Basics
▪  A Miscellany of Things
Defer High Volume Actions
ActionService
•  Defer High-Volume Actions
•  Action.setCaboose()
Insert tracking
record
Caboose action
measures on
setInterval
Device
Orientation
Stop tracking
Update record
Clear handlers
Component
render
wobble__c measurement__c
Demo
Parent Child Display Optimization
1
2
Actions: Chained
callback
enqueueAction(child)
Demo
Agenda
▪  Brief Overview of Components
▪  Action Service Basics
▪  Beyond the Basics
▪  A Miscellany of Things
Useful Tools and Lessons
•  Javascript
•  Callbacks and isValid
•  Closures
•  Unsupported Events
•  Only on init
•  Component Lifecycle
Learn Javascript
James Governor, RedMonk
Javascript is Async
​ console.log('this will go first’);
​ setTimeout(function(){'this happens third'},1);
​ console.log('this happens second');
​ // output:
​ 'this will go first'
​ 'this happens second'
​ 'this happens third'
​ 1
​ 2
​ 3
​ 4
​ 5
​ 6
​ 7
​ 8
Check Component Validity: isValid()
​ myhandler : function(component, event, helper){
​  ...
​  var action = component.get('c.myApexMethod');
​  ...
​  action.setCallback(this, function(serverResponse){
​  ...
​  component.set('v.myAttrib',serverResponse.getReturnValue());
​  });
​  $A.enqueueAction(action);
​ 1
​ 2
​ 3
​ 4
​ 5
​ 6
​ 7
​ 8
​ 9
​ action.setCallback(this, (function(serverResponse){
​  ...
if (component.isValid()) {
​  component.set('v.myAttrib',serverResponse.getReturnValue());
​  } else {
​  ...exit gracefully
​  }
​ });
​ 1
​ 2
​ 3
​ 4
​ 5
​ 6
​ 7
​ 8
​ 9
Closures for Reusability
​ //in MyComponentHelper.js
​ callbackFactory : function(component){
​  return function (serverResponse){
​  component.set('v.myAttribute', serverResponse.getReturnValue());
​ 
​  }
​ }
​ 1
​ 2
​ 3
​ 4
​ 5
​ 6
​ 7
​ doInit: function(component, event, helper){
​  component.myCallbackFunction = helper.callbackFactory(component);
​ });
​ 1
​ 2
​ 3
​ //while setting up action do this...
​ action.setCallback(this, helper.myCallbackFunction);
​ 1
​ 2
Clean Up After Yourself in Unrender
​ unrender: function(component, helper){
​ 
​  window.removeEventListener('deviceorientation',component.doOrientation);
​ }
​ 1
​ 2
​ 3
​ 4
​ 5
​ 6
​ 7
​ 8
​ 9
Go Play and Break Things
​ That what your Developer Edition org is for!
•  Action Service is how your Lightning Component talks to the App Cloud
•  Learn it!
•  It is still new, so learn the effects of working with it
•  http://salesforce.stackexchange.com
Q & A
Peter Chittum
Developer Evangelist
@pchittum
github.com/pchittum
​ A list of resources will be posted to the session Chatter feed.
Thank you

More Related Content

What's hot

Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
Salesforce Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
Salesforce Developers
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014
David Scruggs
 
Javascript Security and Lightning Locker Service
Javascript Security and Lightning Locker ServiceJavascript Security and Lightning Locker Service
Javascript Security and Lightning Locker Service
Salesforce Developers
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
Salesforce Developers
 
Lightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's GuideLightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's Guide
Adam Olshansky
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce intro
David Scruggs
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
Salesforce Developers
 
Enhance salesforce application performance using lightning platform cache
Enhance salesforce application performance using lightning platform cacheEnhance salesforce application performance using lightning platform cache
Enhance salesforce application performance using lightning platform cache
Mohith Shrivastava
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
Mark Adcock
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
Salesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
Salesforce Developers
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform Events
Salesforce Developers
 
Maximize Apex Performance with Platform Cache
Maximize Apex Performance with Platform CacheMaximize Apex Performance with Platform Cache
Maximize Apex Performance with Platform Cache
Adam Olshansky
 
Lightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & BeyondLightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & Beyond
Salesforce Developers
 
Build and Package Lightning Components for Lightning Exchange
Build and Package Lightning Components for Lightning ExchangeBuild and Package Lightning Components for Lightning Exchange
Build and Package Lightning Components for Lightning Exchange
Salesforce Developers
 
Unleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerUnleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime Debugger
Salesforce Developers
 
Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3
Mark Adcock
 
Durable Streaming and Enterprise Messaging
Durable Streaming and Enterprise MessagingDurable Streaming and Enterprise Messaging
Durable Streaming and Enterprise Messaging
Salesforce Developers
 
Implementing Einstein OCR
Implementing Einstein OCRImplementing Einstein OCR
Implementing Einstein OCR
Mohith Shrivastava
 

What's hot (20)

Introduction to Apex for Developers
Introduction to Apex for DevelopersIntroduction to Apex for Developers
Introduction to Apex for Developers
 
Local development with Open Source Base Components
Local development with Open Source Base ComponentsLocal development with Open Source Base Components
Local development with Open Source Base Components
 
Elevate workshop programmatic_2014
Elevate workshop programmatic_2014Elevate workshop programmatic_2014
Elevate workshop programmatic_2014
 
Javascript Security and Lightning Locker Service
Javascript Security and Lightning Locker ServiceJavascript Security and Lightning Locker Service
Javascript Security and Lightning Locker Service
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 
Lightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's GuideLightning Components 101: An Apex Developer's Guide
Lightning Components 101: An Apex Developer's Guide
 
Mds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce introMds cloud saturday 2015 salesforce intro
Mds cloud saturday 2015 salesforce intro
 
TrailheaDX India : Developer Highlights
TrailheaDX India : Developer HighlightsTrailheaDX India : Developer Highlights
TrailheaDX India : Developer Highlights
 
Enhance salesforce application performance using lightning platform cache
Enhance salesforce application performance using lightning platform cacheEnhance salesforce application performance using lightning platform cache
Enhance salesforce application performance using lightning platform cache
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local DevelopmentCodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Build Lightning Web Components faster with Local Development
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform Events
 
Maximize Apex Performance with Platform Cache
Maximize Apex Performance with Platform CacheMaximize Apex Performance with Platform Cache
Maximize Apex Performance with Platform Cache
 
Lightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & BeyondLightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & Beyond
 
Build and Package Lightning Components for Lightning Exchange
Build and Package Lightning Components for Lightning ExchangeBuild and Package Lightning Components for Lightning Exchange
Build and Package Lightning Components for Lightning Exchange
 
Unleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime DebuggerUnleash the Power of Apex Realtime Debugger
Unleash the Power of Apex Realtime Debugger
 
Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3
 
Durable Streaming and Enterprise Messaging
Durable Streaming and Enterprise MessagingDurable Streaming and Enterprise Messaging
Durable Streaming and Enterprise Messaging
 
Implementing Einstein OCR
Implementing Einstein OCRImplementing Einstein OCR
Implementing Einstein OCR
 

Similar to All Aboard the Lightning Components Action Service

A Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowA Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-Low
Salesforce Admins
 
Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex
Salesforce Developers
 
Scaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of EventsScaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of Events
Salesforce Developers
 
Einstein Analytics for Developers
Einstein Analytics for DevelopersEinstein Analytics for Developers
Einstein Analytics for Developers
Salesforce Developers
 
Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)
Developer Force
 
Lightning Component Framework from 0 to App
Lightning Component Framework from 0 to AppLightning Component Framework from 0 to App
Lightning Component Framework from 0 to App
Diego Szuster Marçal
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17
Mark Adcock
 
Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar
Abhinav Gupta
 
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIsDreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Hormoz Tarevern
 
Lightning Flow: The Best Feature You're Not Using
Lightning Flow: The Best Feature You're Not UsingLightning Flow: The Best Feature You're Not Using
Lightning Flow: The Best Feature You're Not Using
Salesforce Admins
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
Salesforce Developers
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce org
Roy Gilad
 
Building Complex Traversing & Branching Apps Using Visual Workflows and Apex
Building Complex Traversing & Branching Apps Using Visual Workflows and ApexBuilding Complex Traversing & Branching Apps Using Visual Workflows and Apex
Building Complex Traversing & Branching Apps Using Visual Workflows and Apex
Salesforce Developers
 
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
Salesforce Developers Japan
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
Salesforce Developers
 
Gesture Controlled Interactions with Platform Events and IoT Explorer
Gesture Controlled Interactions with Platform Events and IoT ExplorerGesture Controlled Interactions with Platform Events and IoT Explorer
Gesture Controlled Interactions with Platform Events and IoT Explorer
Salesforce Developers
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events Handlers
Salesforce Developers
 
Build Apps Fast with Lightning Components from Apttus
Build Apps Fast with Lightning Components from ApttusBuild Apps Fast with Lightning Components from Apttus
Build Apps Fast with Lightning Components from Apttus
Dreamforce
 
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJSNgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
Salesforce Developers
 
Knock! Knock! Who's There? Lightning Components!
Knock! Knock! Who's There? Lightning Components!Knock! Knock! Who's There? Lightning Components!
Knock! Knock! Who's There? Lightning Components!
Salesforce Admins
 

Similar to All Aboard the Lightning Components Action Service (20)

A Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowA Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-Low
 
Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex Force.com Friday : Intro to Apex
Force.com Friday : Intro to Apex
 
Scaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of EventsScaling to Millions of Devices and Billions of Events
Scaling to Millions of Devices and Billions of Events
 
Einstein Analytics for Developers
Einstein Analytics for DevelopersEinstein Analytics for Developers
Einstein Analytics for Developers
 
Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)
 
Lightning Component Framework from 0 to App
Lightning Component Framework from 0 to AppLightning Component Framework from 0 to App
Lightning Component Framework from 0 to App
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17
 
Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar Intro to Apex - Salesforce Force Friday Webinar
Intro to Apex - Salesforce Force Friday Webinar
 
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIsDreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
 
Lightning Flow: The Best Feature You're Not Using
Lightning Flow: The Best Feature You're Not UsingLightning Flow: The Best Feature You're Not Using
Lightning Flow: The Best Feature You're Not Using
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Decluttering your Salesfroce org
Decluttering your Salesfroce orgDecluttering your Salesfroce org
Decluttering your Salesfroce org
 
Building Complex Traversing & Branching Apps Using Visual Workflows and Apex
Building Complex Traversing & Branching Apps Using Visual Workflows and ApexBuilding Complex Traversing & Branching Apps Using Visual Workflows and Apex
Building Complex Traversing & Branching Apps Using Visual Workflows and Apex
 
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
 
Introduction to Apex Triggers
Introduction to Apex TriggersIntroduction to Apex Triggers
Introduction to Apex Triggers
 
Gesture Controlled Interactions with Platform Events and IoT Explorer
Gesture Controlled Interactions with Platform Events and IoT ExplorerGesture Controlled Interactions with Platform Events and IoT Explorer
Gesture Controlled Interactions with Platform Events and IoT Explorer
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events Handlers
 
Build Apps Fast with Lightning Components from Apttus
Build Apps Fast with Lightning Components from ApttusBuild Apps Fast with Lightning Components from Apttus
Build Apps Fast with Lightning Components from Apttus
 
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJSNgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
 
Knock! Knock! Who's There? Lightning Components!
Knock! Knock! Who's There? Lightning Components!Knock! Knock! Who's There? Lightning Components!
Knock! Knock! Who's There? Lightning Components!
 

More from Peter Chittum

Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and ApexDreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Peter Chittum
 
If You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command LineIf You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command Line
Peter Chittum
 
If you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command lineIf you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command line
Peter Chittum
 
Do Not Fear the Command Line
Do Not Fear the Command LineDo Not Fear the Command Line
Do Not Fear the Command Line
Peter Chittum
 
Don't Fear the Command Line
Don't Fear the Command LineDon't Fear the Command Line
Don't Fear the Command Line
Peter Chittum
 
The Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour EditionThe Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour Edition
Peter Chittum
 
Maths Week - About Computers, for Kids
Maths Week - About Computers, for KidsMaths Week - About Computers, for Kids
Maths Week - About Computers, for Kids
Peter Chittum
 
Best api features of 2016
Best api features of 2016Best api features of 2016
Best api features of 2016
Peter Chittum
 
Streaming api with generic and durable streaming
Streaming api with generic and durable streamingStreaming api with generic and durable streaming
Streaming api with generic and durable streaming
Peter Chittum
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016
Peter Chittum
 
Salesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer StrategySalesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer Strategy
Peter Chittum
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too Much
Peter Chittum
 
Dreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for DevelopersDreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for Developers
Peter Chittum
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin Zone
Peter Chittum
 
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Peter Chittum
 
Building Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College LondonBuilding Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College London
Peter Chittum
 
Elevate london dec 2014.pptx
Elevate london dec 2014.pptxElevate london dec 2014.pptx
Elevate london dec 2014.pptx
Peter Chittum
 
AngularJS App In Two Weeks
AngularJS App In Two WeeksAngularJS App In Two Weeks
AngularJS App In Two Weeks
Peter Chittum
 
Df14 Salesforce Advanced Developer Certification
Df14 Salesforce Advanced Developer CertificationDf14 Salesforce Advanced Developer Certification
Df14 Salesforce Advanced Developer Certification
Peter Chittum
 
Javascript and Remote Objects on Force.com Winter 15
Javascript and Remote Objects on Force.com Winter 15Javascript and Remote Objects on Force.com Winter 15
Javascript and Remote Objects on Force.com Winter 15
Peter Chittum
 

More from Peter Chittum (20)

Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and ApexDreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
 
If You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command LineIf You Can Write a Salesforce Formula, You Can Use the Command Line
If You Can Write a Salesforce Formula, You Can Use the Command Line
 
If you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command lineIf you can write a Salesforce Formula you can use the command line
If you can write a Salesforce Formula you can use the command line
 
Do Not Fear the Command Line
Do Not Fear the Command LineDo Not Fear the Command Line
Do Not Fear the Command Line
 
Don't Fear the Command Line
Don't Fear the Command LineDon't Fear the Command Line
Don't Fear the Command Line
 
The Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour EditionThe Power of Salesforce APIs World Tour Edition
The Power of Salesforce APIs World Tour Edition
 
Maths Week - About Computers, for Kids
Maths Week - About Computers, for KidsMaths Week - About Computers, for Kids
Maths Week - About Computers, for Kids
 
Best api features of 2016
Best api features of 2016Best api features of 2016
Best api features of 2016
 
Streaming api with generic and durable streaming
Streaming api with generic and durable streamingStreaming api with generic and durable streaming
Streaming api with generic and durable streaming
 
Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016Spring '16 Release Overview - Bilbao Feb 2016
Spring '16 Release Overview - Bilbao Feb 2016
 
Salesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer StrategySalesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer Strategy
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too Much
 
Dreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for DevelopersDreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for Developers
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin Zone
 
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015
 
Building Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College LondonBuilding Applications on the Salesforce1 Platform for Imperial College London
Building Applications on the Salesforce1 Platform for Imperial College London
 
Elevate london dec 2014.pptx
Elevate london dec 2014.pptxElevate london dec 2014.pptx
Elevate london dec 2014.pptx
 
AngularJS App In Two Weeks
AngularJS App In Two WeeksAngularJS App In Two Weeks
AngularJS App In Two Weeks
 
Df14 Salesforce Advanced Developer Certification
Df14 Salesforce Advanced Developer CertificationDf14 Salesforce Advanced Developer Certification
Df14 Salesforce Advanced Developer Certification
 
Javascript and Remote Objects on Force.com Winter 15
Javascript and Remote Objects on Force.com Winter 15Javascript and Remote Objects on Force.com Winter 15
Javascript and Remote Objects on Force.com Winter 15
 

Recently uploaded

Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
welrejdoall
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
Tatiana Al-Chueyr
 

Recently uploaded (20)

Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Best Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdfBest Practices for Effectively Running dbt in Airflow.pdf
Best Practices for Effectively Running dbt in Airflow.pdf
 

All Aboard the Lightning Components Action Service

  • 1. All Aboard The Lightning Components Action Service ​ Peter Chittum ​ Developer Evangelist ​ @pchittum ​ github.com/pchittum ​ 
  • 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 4. Agenda ▪  Brief Overview of Components ▪  Action Service Basics ▪  Beyond the Basics ▪  A Miscellany of Things
  • 5. App Cloud and Lightning Connect Process Builder App Builder Component Framework
  • 6. Introducing Lightning Components ​ Reusable UI components for any device Connect Process Builder App Builder Component Framework
  • 7. Component Artifacts Design Principles •  Structured Bundle of Resources •  Client-side Rendered •  Extensible, Reusable, Atomic, Event-Driven •  Apex as backend •  First Class UI Citizen APP or COMPONENT BUNDLE Definition: markup Style: css Helper : js Documentation Controller: js Renderer: js Design Markup Icon: SVG
  • 8. Component Client Side Rendering JSON component:{...} <div>...</div>
  • 12. Agenda ▪  Brief Overview of Components ▪  Action Service Basics ▪  Beyond the Basics ▪  A Miscellany of Things
  • 13. Actions: Interact with the Server •  Apex Method Surfaced to Lightning Components •  @AuraEnabled annotation
  • 14. Many Components Many Server Trips XMLHttpRequest XMLHttpRequest XMLHttpRequest
  • 15. Many Components Many Actions: Boxcarring ActionService
  • 16. Demo
  • 17. Agenda ▪  Brief Overview of Components ▪  Action Service Basics ▪  Beyond the Basics ▪  A Miscellany of Things
  • 18. Defer High Volume Actions ActionService •  Defer High-Volume Actions •  Action.setCaboose()
  • 19. Insert tracking record Caboose action measures on setInterval Device Orientation Stop tracking Update record Clear handlers Component render wobble__c measurement__c Demo
  • 20. Parent Child Display Optimization 1 2
  • 22. Demo
  • 23. Agenda ▪  Brief Overview of Components ▪  Action Service Basics ▪  Beyond the Basics ▪  A Miscellany of Things
  • 24. Useful Tools and Lessons •  Javascript •  Callbacks and isValid •  Closures •  Unsupported Events •  Only on init •  Component Lifecycle
  • 26. Javascript is Async ​ console.log('this will go first’); ​ setTimeout(function(){'this happens third'},1); ​ console.log('this happens second'); ​ // output: ​ 'this will go first' ​ 'this happens second' ​ 'this happens third' ​ 1 ​ 2 ​ 3 ​ 4 ​ 5 ​ 6 ​ 7 ​ 8
  • 27. Check Component Validity: isValid() ​ myhandler : function(component, event, helper){ ​  ... ​  var action = component.get('c.myApexMethod'); ​  ... ​  action.setCallback(this, function(serverResponse){ ​  ... ​  component.set('v.myAttrib',serverResponse.getReturnValue()); ​  }); ​  $A.enqueueAction(action); ​ 1 ​ 2 ​ 3 ​ 4 ​ 5 ​ 6 ​ 7 ​ 8 ​ 9 ​ action.setCallback(this, (function(serverResponse){ ​  ... if (component.isValid()) { ​  component.set('v.myAttrib',serverResponse.getReturnValue()); ​  } else { ​  ...exit gracefully ​  } ​ }); ​ 1 ​ 2 ​ 3 ​ 4 ​ 5 ​ 6 ​ 7 ​ 8 ​ 9
  • 28. Closures for Reusability ​ //in MyComponentHelper.js ​ callbackFactory : function(component){ ​  return function (serverResponse){ ​  component.set('v.myAttribute', serverResponse.getReturnValue()); ​  ​  } ​ } ​ 1 ​ 2 ​ 3 ​ 4 ​ 5 ​ 6 ​ 7 ​ doInit: function(component, event, helper){ ​  component.myCallbackFunction = helper.callbackFactory(component); ​ }); ​ 1 ​ 2 ​ 3 ​ //while setting up action do this... ​ action.setCallback(this, helper.myCallbackFunction); ​ 1 ​ 2
  • 29. Clean Up After Yourself in Unrender ​ unrender: function(component, helper){ ​  ​  window.removeEventListener('deviceorientation',component.doOrientation); ​ } ​ 1 ​ 2 ​ 3 ​ 4 ​ 5 ​ 6 ​ 7 ​ 8 ​ 9
  • 30. Go Play and Break Things ​ That what your Developer Edition org is for! •  Action Service is how your Lightning Component talks to the App Cloud •  Learn it! •  It is still new, so learn the effects of working with it •  http://salesforce.stackexchange.com
  • 31. Q & A Peter Chittum Developer Evangelist @pchittum github.com/pchittum ​ A list of resources will be posted to the session Chatter feed.