SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
Lightning Message Service
@pchittum | pchittum@salesforce.com
Peter Chittum, Sr Director Developer Evangelism
Forward-Looking Statement
Statement under the Private Securities Litigation Reform Act of 1995:
This presentation contains forward-looking statements about the company’s financial and operating results, which may include expected GAAP and non-GAAP financial and other operating
and non-operating results, including revenue, net income, diluted earnings per share, operating cash flow growth, operating margin improvement, expected revenue growth, expected
current remaining performance obligation growth, expected tax rates, the one-time accounting non-cash charge that was incurred in connection with the Salesforce.org combination; stock-
based compensation expenses, amortization of purchased intangibles, shares outstanding, market growth and sustainability goals. The achievement or success of the matters covered by
such forward-looking statements involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, the company’s
results could differ materially from the results expressed or implied by the forward-looking statements we make.
The risks and uncertainties referred to above include -- but are not limited to -- risks associated with the effect of general economic and market conditions; the impact of geopolitical events;
the impact of foreign currency exchange rate and interest rate fluctuations on our results; our business strategy and our plan to build our business, including our strategy to be the leading
provider of enterprise cloud computing applications and platforms; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; the
competitive nature of the market in which we participate; our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our
customer base and operations, including as a result of acquisitions; our service performance and security, including the resources and costs required to avoid unanticipated downtime and
prevent, detect and remediate potential security breaches; the expenses associated with new data centers and third-party infrastructure providers; additional data center capacity; real estate
and office facilities space; our operating results and cash flows; new services and product features, including any efforts to expand our services beyond the CRM market; our strategy of
acquiring or making investments in complementary businesses, joint ventures, services, technologies and intellectual property rights; the performance and fair value of our investments in
complementary businesses through our strategic investment portfolio; our ability to realize the benefits from strategic partnerships, joint ventures and investments; the impact of future gains
or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies within the company's strategic
investment portfolio; our ability to execute our business plans; our ability to successfully integrate acquired businesses and technologies, including delays related to the integration of
Tableau due to regulatory review by the United Kingdom Competition and Markets Authority; our ability to continue to grow unearned revenue and remaining performance obligation; our
ability to protect our intellectual property rights; our ability to develop our brands; our reliance on third-party hardware, software and platform providers; our dependency on the development
and maintenance of the infrastructure of the Internet; the
effect of evolving domestic and foreign government regulations, including those related to the provision of services on the Internet, those related to accessing the Internet, and those
addressing data privacy, cross-border data transfers and import and export controls; the valuation of our deferred tax assets and the release of related valuation allowances; the potential
availability of additional tax assets in the future; the impact of new accounting pronouncements and tax laws; uncertainties affecting our ability to estimate our tax
rate; the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; factors related to our outstanding debt, revolving credit facility, term loan and
loan associated with 50 Fremont; compliance with our debt covenants and lease obligations; current and potential litigation involving us; and the impact of climate change.
Further information on these and other factors that could affect the company’s financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings it makes with the
Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of the company’s website at
www.salesforce.com/investor.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.
Agenda
Intro to LMS
Demo
Footer
Principles of Message Service
Client-side event bus between DOM branches
LWC, Aura, and Visualforce as Equal Citizens
Don't Be Surprising (Scope)
Communication between DOM Branches
LWC, Aura, Visualforce as Equal Citizens
Demo
Context
Distinguish between different near-root level DOM features
Scope
Whether a subscriber remains active when its context becomes inactive
Resources
Learn MOAR Summer 20 Release blog: https://bit.ly/lms-launch-blog
Follow the work in this github issue: https://bit.ly/lms-recipe-issue
Scoped Messaging example: https://bit.ly/lms-with-scope
Appendix A: All The Samples
Where can I go to find other resources to learn about
LMS (apart from the docs, of course)
Internal LMS Example Inventory
LWC Recipes Sample App
● LWC Publisher
● LWC Subscriber
● Aura Publisher
● Aura Subscriber
● VF Publisher
○ Page and Static Resource
● VF Subscriber (with postback)
○ Page and Static Resource
● VF Subscriber (with remote obj)
○ Page and Static Resource
E-Bikes Sample App
● productTileList
● productCard
● productFilter
Dreamhouse Sample App
● propertySummary
● daysOnMarket
● propertyFilter
● propertyMap
● propertyTileList
Easy Spaces Sample App
● reservationHelper
● reservationList
● customerList
● spaceDesigner
Trailhead Modules and Projects
● Build a Bear-Tracking App with Lightning
Web Components Project
Appendix: the LMS APIs
A summary of interacting with LMS across all three
Salesforce UI technologies: LWC, Aura, Visualforce
LMS Moving Parts
The message service: the reusable parts, used to publish, subscribe, etc.
The message channel: a way to name and segment messages
(Note: for all examples we're using the recipes in the LWC Recipes sample app)
The above message channel would be referenced as Record_Selected__c in code
Message Channel Metadata
Definining a Message Channel
Import via ES6 modules
import { subscribe, publish, MessageContext } from 'lightning/messageService';
import RECORD_SELECTED_CHANNEL from '@salesforce/messageChannel/Record_Selected__c';
LMS in LWC
MessageService imports
● publish
● subscribe
● unsubscribe
● MessageContext
● APPLICATION_SCOPE
Message Channel
● Surfaced as an ES6 module by API name
in the @salesforce module scope
● Use default import syntax
export default class LmsPublisherWebComponent extends LightningElement {
@wire(getContactList)
contacts;
@wire(MessageContext)
messageContext;
// Respond to UI event by publishing message
handleContactSelect(event) {
const payload = { recordId: event.target.contact.Id };
publish(this.messageContext, RECORD_SELECTED_CHANNEL, payload);
}
}
In LWC
Publishing a Message
export default class LmsSubscriberWebComponent extends LightningElement {
subscription = null;
...
@wire(MessageContext)
messageContext;
...
subscribeToMessageChannel() {
this.subscription = subscribe(
this.messageContext,
RECORD_SELECTED_CHANNEL,
(message) => this.handleMessage(message)
);
}
...
connectedCallback() {
this.subscribeToMessageChannel();
}
In LWC
Subscribing to a Message Channel
Access via the aura <lightning:messageChannel/> component
<lightning:messageChannel type="Record_Selected__c" onMessage="{!c.handleMessage}" />
LMS in Aura
lightning:messageChannel attributes
● onMessage
● scope
● type
One tag to rule them all
● Same tag for publishers and subscribers
● Subscription is implicit when handler
specified
● Message channel specified by literal
unqualified API name
In markup
<lightning:messageChannel
type="Record_Selected__c"
aura:id="recordSelected"
/>
In your controller
var payload = { recordId: event.target.contact.Id };
component.find('recordSelected').publish(payload);
In Aura
Publishing a Message
<lightning:messageChannel
type="Record_Selected__c"
aura:id="recordSelected"
onMessage="{!c.handleMessage}"
/>
...yep...that's literally all you do
In Aura
Subscribing to a Message Channel
Access via standard Visualforce objects
setPageConfigs({
messageChannel: '{!$MessageChannel.Record_Selected__c}',
lmsSubscribe: sforce.one.subscribe
});
LMS in Visualforce
sforce.one functions
● publish
● subscribe
● unsubscribe
Message Channel
● Surfaced as a global variable by API name
under $MessageChannel
● Bind and assign to a JS variable
Visualforce page
setPageConfigs({
messageChannel: '{!$MessageChannel.Record_Selected__c}',
lmsPublish: sforce.one.publish
});
Static resource JS module
const payload = { recordId: selectedIdNode.dataset.id };
_pageConfigs.lmsPublish(_pageConfigs.messageChannel, payload);
In Visualforce
Publishing a Message
Visualforce page
setPageConfigs({
messageChannel: '{!$MessageChannel.Record_Selected__c}',
lmsSubscribe: sforce.one.subscribe
});
Static resource JS module
document.addEventListener('readystatechange', (event) => {
if (event.target.readyState === 'complete') {
lmsChannelSubscription = _pageConfigs.lmsSubscribe(
_pageConfigs.messageChannel,
handleLMSMessageRemoting
);
}
});
In Visualforce
Subscribing to a Message Channel

Más contenido relacionado

La actualidad más candente

Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best PracticesVivek Chawla
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforceMark Adcock
 
Salesforce Tutorial for Beginners: Basic Salesforce Introduction
Salesforce Tutorial for Beginners: Basic Salesforce IntroductionSalesforce Tutorial for Beginners: Basic Salesforce Introduction
Salesforce Tutorial for Beginners: Basic Salesforce IntroductionHabilelabs
 
Understanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoUnderstanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoSalesforce Developers
 
Automate All The Things with Flow
Automate All The Things with FlowAutomate All The Things with Flow
Automate All The Things with FlowSalesforce Admins
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platformJohn Stevenson
 
Salesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demoSalesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demoAdama Sidibé
 
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 EventsSalesforce Developers
 
Salesforce admin training 1
Salesforce admin training 1Salesforce admin training 1
Salesforce admin training 1HungPham381
 
Webinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce OptimizerWebinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce OptimizerSalesforce Admins
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewDhanik Sahni
 
What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...
What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...
What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...Edureka!
 
Salesforce intro session_for_students_v2
Salesforce intro session_for_students_v2Salesforce intro session_for_students_v2
Salesforce intro session_for_students_v2Stephen Edache Paul
 
Salesforce Basic Navigation
Salesforce Basic NavigationSalesforce Basic Navigation
Salesforce Basic NavigationLorraine Pinto
 
Salesforce Streaming event - PushTopic and Generic Events
Salesforce Streaming event - PushTopic and Generic EventsSalesforce Streaming event - PushTopic and Generic Events
Salesforce Streaming event - PushTopic and Generic EventsDhanik Sahni
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in SalesforceJitendra Zaa
 
Getting started with Salesforce security
Getting started with Salesforce securityGetting started with Salesforce security
Getting started with Salesforce securitySalesforce Admins
 
Session 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCESession 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCESmritiSharan1
 

La actualidad más candente (20)

Salesforce Development Best Practices
Salesforce Development Best PracticesSalesforce Development Best Practices
Salesforce Development Best Practices
 
Introduction to Visualforce
Introduction to VisualforceIntroduction to Visualforce
Introduction to Visualforce
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
Salesforce Tutorial for Beginners: Basic Salesforce Introduction
Salesforce Tutorial for Beginners: Basic Salesforce IntroductionSalesforce Tutorial for Beginners: Basic Salesforce Introduction
Salesforce Tutorial for Beginners: Basic Salesforce Introduction
 
Understanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We DoUnderstanding the Salesforce Architecture: How We Do the Magic We Do
Understanding the Salesforce Architecture: How We Do the Magic We Do
 
Automate All The Things with Flow
Automate All The Things with FlowAutomate All The Things with Flow
Automate All The Things with Flow
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platform
 
Salesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demoSalesforce Marketing Cloud overview demo
Salesforce Marketing Cloud overview demo
 
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 admin training 1
Salesforce admin training 1Salesforce admin training 1
Salesforce admin training 1
 
Webinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce OptimizerWebinar: Take Control of Your Org with Salesforce Optimizer
Webinar: Take Control of Your Org with Salesforce Optimizer
 
Salesforce Integration Pattern Overview
Salesforce Integration Pattern OverviewSalesforce Integration Pattern Overview
Salesforce Integration Pattern Overview
 
What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...
What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...
What Is Salesforce? | Salesforce Training - What Does Salesforce Do? | Salesf...
 
Salesforce intro session_for_students_v2
Salesforce intro session_for_students_v2Salesforce intro session_for_students_v2
Salesforce intro session_for_students_v2
 
Salesforce Basic Navigation
Salesforce Basic NavigationSalesforce Basic Navigation
Salesforce Basic Navigation
 
Salesforce Streaming event - PushTopic and Generic Events
Salesforce Streaming event - PushTopic and Generic EventsSalesforce Streaming event - PushTopic and Generic Events
Salesforce Streaming event - PushTopic and Generic Events
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in Salesforce
 
Getting started with Salesforce security
Getting started with Salesforce securityGetting started with Salesforce security
Getting started with Salesforce security
 
Session 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCESession 1: INTRODUCTION TO SALESFORCE
Session 1: INTRODUCTION TO SALESFORCE
 
Commerce Cloud 101
Commerce Cloud 101Commerce Cloud 101
Commerce Cloud 101
 

Similar a Lightning Message Service overview

Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"Sudipta Deb ☁
 
WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too! WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too! Salesforce Admins
 
TrailheadX Presentation - 2020 Cluj
TrailheadX Presentation -  2020 ClujTrailheadX Presentation -  2020 Cluj
TrailheadX Presentation - 2020 ClujArpad Komaromi
 
Alba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdfAlba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdfMarkPawlikowski2
 
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...Russell Feldman
 
Dreamforce Global Gathering
Dreamforce Global GatheringDreamforce Global Gathering
Dreamforce Global GatheringSudipta Deb ☁
 
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 GuideAdam Olshansky
 
Salesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flowsSalesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flowsAmol Dixit
 
Deep dive into salesforce connected app part 4
Deep dive into salesforce connected app   part 4Deep dive into salesforce connected app   part 4
Deep dive into salesforce connected app part 4Mohith Shrivastava
 
Stamford developer group Experience Cloud
Stamford developer group   Experience CloudStamford developer group   Experience Cloud
Stamford developer group Experience CloudAmol Dixit
 
Summer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptxSummer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptxKishore B T
 
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...Anna Loughnan Colquhoun
 
London Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringLondon Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringKeir Bowden
 
Introduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/ArchitectureIntroduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/ArchitectureAmol Dixit
 
Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3Lalit Panwar
 
Stamford developer group Omni channel
Stamford developer group Omni channelStamford developer group Omni channel
Stamford developer group Omni channelAmol Dixit
 

Similar a Lightning Message Service overview (20)

Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"Kitchener Developer Group's session on "All about events"
Kitchener Developer Group's session on "All about events"
 
WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too! WT19: Platform Events Are for Admins Too!
WT19: Platform Events Are for Admins Too!
 
Winter '22 highlights
Winter '22 highlightsWinter '22 highlights
Winter '22 highlights
 
TrailheadX Presentation - 2020 Cluj
TrailheadX Presentation -  2020 ClujTrailheadX Presentation -  2020 Cluj
TrailheadX Presentation - 2020 Cluj
 
Stephen's 10 ish favourite spring'20 features
Stephen's 10 ish favourite spring'20 featuresStephen's 10 ish favourite spring'20 features
Stephen's 10 ish favourite spring'20 features
 
Alba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdfAlba Rivas - Building Slack Applications with Bolt.js.pdf
Alba Rivas - Building Slack Applications with Bolt.js.pdf
 
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
Los Angeles Admin Trailblazer Community Group TrailheaDX 2020 Global Gatherin...
 
Dreamforce Global Gathering
Dreamforce Global GatheringDreamforce Global Gathering
Dreamforce Global Gathering
 
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
 
Salesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flowsSalesforce Stamford developer group - power of flows
Salesforce Stamford developer group - power of flows
 
Deep dive into salesforce connected app part 4
Deep dive into salesforce connected app   part 4Deep dive into salesforce connected app   part 4
Deep dive into salesforce connected app part 4
 
TDX Global Gathering - Wellington UG
TDX Global Gathering - Wellington UGTDX Global Gathering - Wellington UG
TDX Global Gathering - Wellington UG
 
Stamford developer group Experience Cloud
Stamford developer group   Experience CloudStamford developer group   Experience Cloud
Stamford developer group Experience Cloud
 
Summer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptxSummer 23 LWC Updates + Slack Apps.pptx
Summer 23 LWC Updates + Slack Apps.pptx
 
Delivering powerful integrations without code using out-of-the-box Salesforce...
Delivering powerful integrations without code using out-of-the-box Salesforce...Delivering powerful integrations without code using out-of-the-box Salesforce...
Delivering powerful integrations without code using out-of-the-box Salesforce...
 
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
Spring 21 Salesforce Release Highlights with Awesome Admin Marc Baizman Welli...
 
London Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringLondon Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global Gathering
 
Introduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/ArchitectureIntroduction to Salesforce Pub-Sub APIs/Architecture
Introduction to Salesforce Pub-Sub APIs/Architecture
 
Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3Jaipur MuleSoft Meetup No. 3
Jaipur MuleSoft Meetup No. 3
 
Stamford developer group Omni channel
Stamford developer group Omni channelStamford developer group Omni channel
Stamford developer group Omni channel
 

Más de 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 ApexPeter Chittum
 
Winter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for SalesforceWinter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for SalesforcePeter Chittum
 
Apply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsApply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsPeter 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 LinePeter 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 linePeter Chittum
 
Do Not Fear the Command Line
Do Not Fear the Command LineDo Not Fear the Command Line
Do Not Fear the Command LinePeter Chittum
 
Don't Fear the Command Line
Don't Fear the Command LineDon't Fear the Command Line
Don't Fear the Command LinePeter 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 EditionPeter Chittum
 
Maths Week - About Computers, for Kids
Maths Week - About Computers, for KidsMaths Week - About Computers, for Kids
Maths Week - About Computers, for KidsPeter Chittum
 
Best api features of 2016
Best api features of 2016Best api features of 2016
Best api features of 2016Peter 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 streamingPeter 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 2016Peter Chittum
 
Salesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer StrategySalesforce Platform Encryption Developer Strategy
Salesforce Platform Encryption Developer StrategyPeter Chittum
 
All Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action ServiceAll Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action ServicePeter 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 MuchPeter Chittum
 
Dreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for DevelopersDreamforce 15 - Platform Encryption for Developers
Dreamforce 15 - Platform Encryption for DevelopersPeter Chittum
 
Platform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePlatform Encryption World Tour Admin Zone
Platform Encryption World Tour Admin ZonePeter 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 2015Peter 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 LondonPeter Chittum
 
Elevate london dec 2014.pptx
Elevate london dec 2014.pptxElevate london dec 2014.pptx
Elevate london dec 2014.pptxPeter Chittum
 

Más de 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
 
Winter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for SalesforceWinter 21 Developer Highlights for Salesforce
Winter 21 Developer Highlights for Salesforce
 
Apply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday ProblemsApply the Salesforce CLI To Everyday Problems
Apply the Salesforce CLI To Everyday Problems
 
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
 
All Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action ServiceAll Aboard the Lightning Components Action Service
All Aboard the Lightning Components Action Service
 
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
 

Último

Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...kalichargn70th171
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxAS Design & AST.
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdfSteve Caron
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 

Último (20)

Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
The Ultimate Guide to Performance Testing in Low-Code, No-Code Environments (...
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Mastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptxMastering Project Planning with Microsoft Project 2016.pptx
Mastering Project Planning with Microsoft Project 2016.pptx
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
[ CNCF Q1 2024 ] Intro to Continuous Profiling and Grafana Pyroscope.pdf
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 

Lightning Message Service overview

  • 1. Lightning Message Service @pchittum | pchittum@salesforce.com Peter Chittum, Sr Director Developer Evangelism
  • 2. Forward-Looking Statement Statement under the Private Securities Litigation Reform Act of 1995: This presentation contains forward-looking statements about the company’s financial and operating results, which may include expected GAAP and non-GAAP financial and other operating and non-operating results, including revenue, net income, diluted earnings per share, operating cash flow growth, operating margin improvement, expected revenue growth, expected current remaining performance obligation growth, expected tax rates, the one-time accounting non-cash charge that was incurred in connection with the Salesforce.org combination; stock- based compensation expenses, amortization of purchased intangibles, shares outstanding, market growth and sustainability goals. The achievement or success of the matters covered by such forward-looking statements involves risks, uncertainties and assumptions. If any such risks or uncertainties materialize or if any of the assumptions prove incorrect, the company’s results could differ materially from the results expressed or implied by the forward-looking statements we make. The risks and uncertainties referred to above include -- but are not limited to -- risks associated with the effect of general economic and market conditions; the impact of geopolitical events; the impact of foreign currency exchange rate and interest rate fluctuations on our results; our business strategy and our plan to build our business, including our strategy to be the leading provider of enterprise cloud computing applications and platforms; the pace of change and innovation in enterprise cloud computing services; the seasonal nature of our sales cycles; the competitive nature of the market in which we participate; our international expansion strategy; the demands on our personnel and infrastructure resulting from significant growth in our customer base and operations, including as a result of acquisitions; our service performance and security, including the resources and costs required to avoid unanticipated downtime and prevent, detect and remediate potential security breaches; the expenses associated with new data centers and third-party infrastructure providers; additional data center capacity; real estate and office facilities space; our operating results and cash flows; new services and product features, including any efforts to expand our services beyond the CRM market; our strategy of acquiring or making investments in complementary businesses, joint ventures, services, technologies and intellectual property rights; the performance and fair value of our investments in complementary businesses through our strategic investment portfolio; our ability to realize the benefits from strategic partnerships, joint ventures and investments; the impact of future gains or losses from our strategic investment portfolio, including gains or losses from overall market conditions that may affect the publicly traded companies within the company's strategic investment portfolio; our ability to execute our business plans; our ability to successfully integrate acquired businesses and technologies, including delays related to the integration of Tableau due to regulatory review by the United Kingdom Competition and Markets Authority; our ability to continue to grow unearned revenue and remaining performance obligation; our ability to protect our intellectual property rights; our ability to develop our brands; our reliance on third-party hardware, software and platform providers; our dependency on the development and maintenance of the infrastructure of the Internet; the effect of evolving domestic and foreign government regulations, including those related to the provision of services on the Internet, those related to accessing the Internet, and those addressing data privacy, cross-border data transfers and import and export controls; the valuation of our deferred tax assets and the release of related valuation allowances; the potential availability of additional tax assets in the future; the impact of new accounting pronouncements and tax laws; uncertainties affecting our ability to estimate our tax rate; the impact of expensing stock options and other equity awards; the sufficiency of our capital resources; factors related to our outstanding debt, revolving credit facility, term loan and loan associated with 50 Fremont; compliance with our debt covenants and lease obligations; current and potential litigation involving us; and the impact of climate change. Further information on these and other factors that could affect the company’s financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings it makes with the Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of the company’s website at www.salesforce.com/investor. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements, except as required by law.
  • 4. Principles of Message Service Client-side event bus between DOM branches LWC, Aura, and Visualforce as Equal Citizens Don't Be Surprising (Scope)
  • 6.
  • 7. LWC, Aura, Visualforce as Equal Citizens
  • 9. Context Distinguish between different near-root level DOM features
  • 10. Scope Whether a subscriber remains active when its context becomes inactive
  • 11. Resources Learn MOAR Summer 20 Release blog: https://bit.ly/lms-launch-blog Follow the work in this github issue: https://bit.ly/lms-recipe-issue Scoped Messaging example: https://bit.ly/lms-with-scope
  • 12.
  • 13. Appendix A: All The Samples Where can I go to find other resources to learn about LMS (apart from the docs, of course)
  • 14. Internal LMS Example Inventory LWC Recipes Sample App ● LWC Publisher ● LWC Subscriber ● Aura Publisher ● Aura Subscriber ● VF Publisher ○ Page and Static Resource ● VF Subscriber (with postback) ○ Page and Static Resource ● VF Subscriber (with remote obj) ○ Page and Static Resource E-Bikes Sample App ● productTileList ● productCard ● productFilter Dreamhouse Sample App ● propertySummary ● daysOnMarket ● propertyFilter ● propertyMap ● propertyTileList Easy Spaces Sample App ● reservationHelper ● reservationList ● customerList ● spaceDesigner Trailhead Modules and Projects ● Build a Bear-Tracking App with Lightning Web Components Project
  • 15. Appendix: the LMS APIs A summary of interacting with LMS across all three Salesforce UI technologies: LWC, Aura, Visualforce
  • 16. LMS Moving Parts The message service: the reusable parts, used to publish, subscribe, etc. The message channel: a way to name and segment messages (Note: for all examples we're using the recipes in the LWC Recipes sample app)
  • 17. The above message channel would be referenced as Record_Selected__c in code Message Channel Metadata Definining a Message Channel
  • 18. Import via ES6 modules import { subscribe, publish, MessageContext } from 'lightning/messageService'; import RECORD_SELECTED_CHANNEL from '@salesforce/messageChannel/Record_Selected__c'; LMS in LWC MessageService imports ● publish ● subscribe ● unsubscribe ● MessageContext ● APPLICATION_SCOPE Message Channel ● Surfaced as an ES6 module by API name in the @salesforce module scope ● Use default import syntax
  • 19. export default class LmsPublisherWebComponent extends LightningElement { @wire(getContactList) contacts; @wire(MessageContext) messageContext; // Respond to UI event by publishing message handleContactSelect(event) { const payload = { recordId: event.target.contact.Id }; publish(this.messageContext, RECORD_SELECTED_CHANNEL, payload); } } In LWC Publishing a Message
  • 20. export default class LmsSubscriberWebComponent extends LightningElement { subscription = null; ... @wire(MessageContext) messageContext; ... subscribeToMessageChannel() { this.subscription = subscribe( this.messageContext, RECORD_SELECTED_CHANNEL, (message) => this.handleMessage(message) ); } ... connectedCallback() { this.subscribeToMessageChannel(); } In LWC Subscribing to a Message Channel
  • 21. Access via the aura <lightning:messageChannel/> component <lightning:messageChannel type="Record_Selected__c" onMessage="{!c.handleMessage}" /> LMS in Aura lightning:messageChannel attributes ● onMessage ● scope ● type One tag to rule them all ● Same tag for publishers and subscribers ● Subscription is implicit when handler specified ● Message channel specified by literal unqualified API name
  • 22. In markup <lightning:messageChannel type="Record_Selected__c" aura:id="recordSelected" /> In your controller var payload = { recordId: event.target.contact.Id }; component.find('recordSelected').publish(payload); In Aura Publishing a Message
  • 24. Access via standard Visualforce objects setPageConfigs({ messageChannel: '{!$MessageChannel.Record_Selected__c}', lmsSubscribe: sforce.one.subscribe }); LMS in Visualforce sforce.one functions ● publish ● subscribe ● unsubscribe Message Channel ● Surfaced as a global variable by API name under $MessageChannel ● Bind and assign to a JS variable
  • 25. Visualforce page setPageConfigs({ messageChannel: '{!$MessageChannel.Record_Selected__c}', lmsPublish: sforce.one.publish }); Static resource JS module const payload = { recordId: selectedIdNode.dataset.id }; _pageConfigs.lmsPublish(_pageConfigs.messageChannel, payload); In Visualforce Publishing a Message
  • 26. Visualforce page setPageConfigs({ messageChannel: '{!$MessageChannel.Record_Selected__c}', lmsSubscribe: sforce.one.subscribe }); Static resource JS module document.addEventListener('readystatechange', (event) => { if (event.target.readyState === 'complete') { lmsChannelSubscription = _pageConfigs.lmsSubscribe( _pageConfigs.messageChannel, handleLMSMessageRemoting ); } }); In Visualforce Subscribing to a Message Channel