SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Build your apps everywhere with Lightning
Web Components Open Source
by Fabien Taillon
#CD22
Fabien Taillon
- 7x Salesforce MVP
- CTO at Texeï
- Paris Developer Group leader
- French Touch Dreamin team
- Serial speaker
- Not so serial blogger
@FabienTaillon
https://texei.com/blog
#CD22
● What’s Open Sourced at Salesforce
● What’s available as a public package
● What can be done
● Let’s build something with Lightning Web Runtime
● Demo
● Differences between OSS & Platform
Agenda
#CD22
A whole site dedicated to OSS (open source software):
https://opensource.salesforce.com
Some OSS Projects:
● Lightning Web Components
● Salesforce Extensions for VS Code
● Salesforce Lightning Design System
● oclif
● TransmogrifAI (automated machine learning)
● …
Not something new, Aura was already open source.
What’s Open Sourced at Salesforce
#CD22
Some other projects are not open sourced, but available as packages
(npm) for us to use:
● Lightning Web Runtime
● Lightning Base Components
● …
What’s available as a public package
#CD22
Benefit from all publicly available resources to build your own application
locally, hosted wherever you want:
● Lightning Web Runtime
● Lightning Web Components
● Salesforce Lightning Design System
● Lightning Base Components
What can be done
#CD22
Benefit from all publicly available resources to build your own application
locally, hosted wherever you want:
● Lightning Web Runtime
● Lightning Web Components
● Salesforce Lightning Design System
● Lightning Base Components
● Custom @wire api
What can be done
#CD22
Benefit from all publicly available resources to build your own application
locally, hosted wherever you want:
● Lightning Web Runtime
● Lightning Web Components
● Salesforce Lightning Design System
● Lightning Base Components
● Custom @wire api
● Use Lightning Navigation Service
What can be done
#CD22
Benefit from all publicly available resources to build your own application
locally, hosted wherever you want:
● Lightning Web Runtime
● Lightning Web Components
● Salesforce Lightning Design System
● Lightning Base Components
● Custom @wire api
● Use Lightning Navigation Service
● Use OSS first/only features (Light DOM, dynamic component creation)
What can be done
#CD22
Benefit from all publicly available resources to build your own application
locally, hosted wherever you want:
● Lightning Web Runtime
● Lightning Web Components
● Salesforce Lightning Design System
● Lightning Base Components
● Custom @wire api
● Use Lightning Navigation Service
● Use OSS first/only features (Light DOM, dynamic component creation)
● Any tool of your choice (Rollup, webpack, TypeScript…)
What can be done
#CD22
● LWR is a runtime built with performance in mind
● Loads modules/services, like routing
● Used by the latest Experience Cloud templates
● Configurable via lwr.config.json
Easy to start with: npm init lwr
https://developer.salesforce.com/docs/platform/lwr/overview
Let’s build something with Lightning Web Runtime
#CD22
● npm install @salesforce-ux/design-system
● Copy
node_modules/@salesforce-ux/design-system/assets/styles/salesforce-lightning-
design-system.min.css
to
assets/styles/salesforce-lightning-design-system.min.css
(or script it)
Add SLDS
#CD22
● Create src/layouts/main.html
○ see template here: https://developer.salesforce.com/docs/platform/lwr/guide/lwr-slds.html
● Add stylesheet link
https://developer.salesforce.com/docs/platform/lwr/guide/lwr-slds.html
Add SLDS
#CD22
Add synthetic shadow to lwr.config.json
SLDS needs Synthetic Shadow
#CD22
● npm install lightning-base-components
● Add "npm": "lightning-base-components" to lwr.config.json
Add Lightning Base Components
#CD22
Add routes to lwr.config.json
Server-side Routing
#CD22
Add routes in main app, and define
handler function:
Client-side Routing
#CD22
Add lwr-router-container to main app template
import { createRouter } from 'lwr/router';
Client-side Routing
#CD22
Basically just an ES6 module
with a few functions:
● constructor
● connect
● disconnect
● Update
https://lwc.dev/guide/wire_adapter
Custom @wire
#CD22
DEMO
#CD22
● Custom images/assets vs static resources (different import)
○ OSS: just add files to src/assets folder
○ Platform: import myResource from '@salesforce/resourceUrl/resourceReference';
● Custom @wire → not allowed on Platform, replaced by Apex Class
○ OSS: import { getUser } from 'c/usersWireApi';
○ Platform: import getUser from '@salesforce/apex/Namespace.UsersWireApi.getUser';
Differences between OSS & Platform
#CD22
● Navigation page names
○ OSS: whatever name you would like (eg. “namedPage”)
○ Platform: page names expected by Salesforce (ex: comm__namedPage)
● Metadata file (myComponent.js-meta.xml)
○ OSS: No need, but won’t complain if the file is there
○ Platform: expected by Salesforce,
Differences between OSS & Platform
#CD22
● Presentational components
● No Salesforce only import
● Navigation is OK
● Was designed to work everywhere from the start
○ Use Salesforce expected page names
● Won’t fit for all components
Components suited to use everywhere
#CD22
LWC:
● https://lwc.dev
● https://github.com/salesforce/lwc
LWR:
● https://developer.salesforce.com/docs/platform/lwr/overview
SLDS:
● https://www.lightningdesignsystem.com
● https://github.com/salesforce-ux/design-system
Resources
#CD22
Demo projects GitHub repositories:
https://github.com/FabienTaillon/lwc-lwr-oss
https://github.com/FabienTaillon/lwc-oss-on-platform
Create Components Dynamically in LWC OSS:
https://www.youtube.com/watch?v=KYRGmilJOrM
Resources
Thank you! #CD22

Contenu connexe

Tendances

Change, Release, Management In-Depth vTom.pptx
Change, Release, Management In-Depth vTom.pptxChange, Release, Management In-Depth vTom.pptx
Change, Release, Management In-Depth vTom.pptx
AdilPatel34
 

Tendances (20)

Salesforce CPQ by yuvaraj
Salesforce CPQ by yuvarajSalesforce CPQ by yuvaraj
Salesforce CPQ by yuvaraj
 
Zero-Trust SASE DevSecOps
Zero-Trust SASE DevSecOpsZero-Trust SASE DevSecOps
Zero-Trust SASE DevSecOps
 
From Sandbox To Production: An Introduction to Salesforce Release Management
From Sandbox To Production: An Introduction to Salesforce Release ManagementFrom Sandbox To Production: An Introduction to Salesforce Release Management
From Sandbox To Production: An Introduction to Salesforce Release Management
 
Manage Salesforce Like a Pro with Governance
Manage Salesforce Like a Pro with GovernanceManage Salesforce Like a Pro with Governance
Manage Salesforce Like a Pro with Governance
 
Deliver a Next Level Experience with Lightning Console Apps!
Deliver a Next Level Experience with Lightning Console Apps!Deliver a Next Level Experience with Lightning Console Apps!
Deliver a Next Level Experience with Lightning Console Apps!
 
Automate Salesforce Releases with DevOps: Crawl, Walk, Run!
Automate Salesforce Releases with DevOps: Crawl, Walk, Run!Automate Salesforce Releases with DevOps: Crawl, Walk, Run!
Automate Salesforce Releases with DevOps: Crawl, Walk, Run!
 
Salesforce CPQ, Orders, Contracts, Amendments and Renewals
Salesforce CPQ, Orders, Contracts, Amendments and RenewalsSalesforce CPQ, Orders, Contracts, Amendments and Renewals
Salesforce CPQ, Orders, Contracts, Amendments and Renewals
 
First Steps to Salesforce Release Management & DevOps [Salesforce User Group,...
First Steps to Salesforce Release Management & DevOps [Salesforce User Group,...First Steps to Salesforce Release Management & DevOps [Salesforce User Group,...
First Steps to Salesforce Release Management & DevOps [Salesforce User Group,...
 
Salesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for DeploymentSalesforce Release Management - Best Practices and Tools for Deployment
Salesforce Release Management - Best Practices and Tools for Deployment
 
CPQ - An Introduction
CPQ - An IntroductionCPQ - An Introduction
CPQ - An Introduction
 
Salesforce CPQ
Salesforce CPQSalesforce CPQ
Salesforce CPQ
 
Discover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automationsDiscover salesforce, dev ops and Copado CI/CD automations
Discover salesforce, dev ops and Copado CI/CD automations
 
DevOps in Salesforce AppCloud
DevOps in Salesforce AppCloudDevOps in Salesforce AppCloud
DevOps in Salesforce AppCloud
 
Salesforce CPQ Online Training
Salesforce CPQ Online TrainingSalesforce CPQ Online Training
Salesforce CPQ Online Training
 
Azure Devops Build Tools for Powerapps
Azure Devops Build Tools for PowerappsAzure Devops Build Tools for Powerapps
Azure Devops Build Tools for Powerapps
 
OpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for Beginners
 
OutSystems Lessons: Center of Excellence and Adoption Strategies
OutSystems Lessons: Center of Excellence and Adoption StrategiesOutSystems Lessons: Center of Excellence and Adoption Strategies
OutSystems Lessons: Center of Excellence and Adoption Strategies
 
Salesforce Marketing Cloud: Creating 1:1 Journeys
Salesforce Marketing Cloud: Creating 1:1 JourneysSalesforce Marketing Cloud: Creating 1:1 Journeys
Salesforce Marketing Cloud: Creating 1:1 Journeys
 
Salesforce CI/CD - A strategy for success
Salesforce CI/CD - A strategy for successSalesforce CI/CD - A strategy for success
Salesforce CI/CD - A strategy for success
 
Change, Release, Management In-Depth vTom.pptx
Change, Release, Management In-Depth vTom.pptxChange, Release, Management In-Depth vTom.pptx
Change, Release, Management In-Depth vTom.pptx
 

Similaire à Build your apps everywhere with Lightning Web Components Open Source, Fabien Taillon

Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
Opersys inc.
 
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
melbats
 

Similaire à Build your apps everywhere with Lightning Web Components Open Source, Fabien Taillon (20)

Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering LabVoxxed days Vilnius 2015 - Android Reverse Engineering Lab
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
 
Advanced Code Flow, Notes From the Field
Advanced Code Flow, Notes From the FieldAdvanced Code Flow, Notes From the Field
Advanced Code Flow, Notes From the Field
 
Cloud Platform as a Service: Heroku
Cloud Platform as a Service: HerokuCloud Platform as a Service: Heroku
Cloud Platform as a Service: Heroku
 
Chromium: NaCl and Pepper API
Chromium: NaCl and Pepper APIChromium: NaCl and Pepper API
Chromium: NaCl and Pepper API
 
CodeMotion tel aviv 2015 - android reverse engineering lab
CodeMotion tel aviv 2015 - android reverse engineering labCodeMotion tel aviv 2015 - android reverse engineering lab
CodeMotion tel aviv 2015 - android reverse engineering lab
 
Dockerizing react app
Dockerizing react appDockerizing react app
Dockerizing react app
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifest
 
Develop & Deploy your Laravel Application on Google Cloud Platforms
Develop & Deploy your Laravel Application on Google Cloud PlatformsDevelop & Deploy your Laravel Application on Google Cloud Platforms
Develop & Deploy your Laravel Application on Google Cloud Platforms
 
Getting started with docker (2017)
Getting started with docker (2017)Getting started with docker (2017)
Getting started with docker (2017)
 
Key Steps in Developing .NET Core Applications
Key Steps in Developing .NET Core ApplicationsKey Steps in Developing .NET Core Applications
Key Steps in Developing .NET Core Applications
 
Modern Perl Web Development with Dancer
Modern Perl Web Development with DancerModern Perl Web Development with Dancer
Modern Perl Web Development with Dancer
 
Informix Expedition Through Connectivity
Informix Expedition Through ConnectivityInformix Expedition Through Connectivity
Informix Expedition Through Connectivity
 
Building CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptxBuilding CI_CD for Mobile Development.pptx
Building CI_CD for Mobile Development.pptx
 
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScriptENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
ENIB 2015-2016 - CAI Web - S01E01- La forge JavaScript
 
Tools for building your identity application
Tools for building your identity applicationTools for building your identity application
Tools for building your identity application
 
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShift
 

Plus de CzechDreamin

Plus de CzechDreamin (20)

Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
 
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
 
How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...
 
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
 
Architecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron CrearArchitecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron Crear
 
Ape to API, Filip Dousek
Ape to API, Filip DousekApe to API, Filip Dousek
Ape to API, Filip Dousek
 
Push Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel MoyaPush Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel Moya
 
How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...
 
ChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark JonesChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark Jones
 
Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...
 
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
 
Sales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy AvilovSales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy Avilov
 
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
 
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
 
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat FragosoNo Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
 
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew CookWhy do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook
 
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel SombuBe kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu
 
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
 
The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...
 
Restriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise LockieRestriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise Lockie
 

Dernier

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Dernier (20)

Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 

Build your apps everywhere with Lightning Web Components Open Source, Fabien Taillon

  • 1. Build your apps everywhere with Lightning Web Components Open Source by Fabien Taillon
  • 2. #CD22 Fabien Taillon - 7x Salesforce MVP - CTO at Texeï - Paris Developer Group leader - French Touch Dreamin team - Serial speaker - Not so serial blogger @FabienTaillon https://texei.com/blog
  • 3. #CD22 ● What’s Open Sourced at Salesforce ● What’s available as a public package ● What can be done ● Let’s build something with Lightning Web Runtime ● Demo ● Differences between OSS & Platform Agenda
  • 4. #CD22 A whole site dedicated to OSS (open source software): https://opensource.salesforce.com Some OSS Projects: ● Lightning Web Components ● Salesforce Extensions for VS Code ● Salesforce Lightning Design System ● oclif ● TransmogrifAI (automated machine learning) ● … Not something new, Aura was already open source. What’s Open Sourced at Salesforce
  • 5. #CD22 Some other projects are not open sourced, but available as packages (npm) for us to use: ● Lightning Web Runtime ● Lightning Base Components ● … What’s available as a public package
  • 6. #CD22 Benefit from all publicly available resources to build your own application locally, hosted wherever you want: ● Lightning Web Runtime ● Lightning Web Components ● Salesforce Lightning Design System ● Lightning Base Components What can be done
  • 7. #CD22 Benefit from all publicly available resources to build your own application locally, hosted wherever you want: ● Lightning Web Runtime ● Lightning Web Components ● Salesforce Lightning Design System ● Lightning Base Components ● Custom @wire api What can be done
  • 8. #CD22 Benefit from all publicly available resources to build your own application locally, hosted wherever you want: ● Lightning Web Runtime ● Lightning Web Components ● Salesforce Lightning Design System ● Lightning Base Components ● Custom @wire api ● Use Lightning Navigation Service What can be done
  • 9. #CD22 Benefit from all publicly available resources to build your own application locally, hosted wherever you want: ● Lightning Web Runtime ● Lightning Web Components ● Salesforce Lightning Design System ● Lightning Base Components ● Custom @wire api ● Use Lightning Navigation Service ● Use OSS first/only features (Light DOM, dynamic component creation) What can be done
  • 10. #CD22 Benefit from all publicly available resources to build your own application locally, hosted wherever you want: ● Lightning Web Runtime ● Lightning Web Components ● Salesforce Lightning Design System ● Lightning Base Components ● Custom @wire api ● Use Lightning Navigation Service ● Use OSS first/only features (Light DOM, dynamic component creation) ● Any tool of your choice (Rollup, webpack, TypeScript…) What can be done
  • 11. #CD22 ● LWR is a runtime built with performance in mind ● Loads modules/services, like routing ● Used by the latest Experience Cloud templates ● Configurable via lwr.config.json Easy to start with: npm init lwr https://developer.salesforce.com/docs/platform/lwr/overview Let’s build something with Lightning Web Runtime
  • 12. #CD22 ● npm install @salesforce-ux/design-system ● Copy node_modules/@salesforce-ux/design-system/assets/styles/salesforce-lightning- design-system.min.css to assets/styles/salesforce-lightning-design-system.min.css (or script it) Add SLDS
  • 13. #CD22 ● Create src/layouts/main.html ○ see template here: https://developer.salesforce.com/docs/platform/lwr/guide/lwr-slds.html ● Add stylesheet link https://developer.salesforce.com/docs/platform/lwr/guide/lwr-slds.html Add SLDS
  • 14. #CD22 Add synthetic shadow to lwr.config.json SLDS needs Synthetic Shadow
  • 15. #CD22 ● npm install lightning-base-components ● Add "npm": "lightning-base-components" to lwr.config.json Add Lightning Base Components
  • 16. #CD22 Add routes to lwr.config.json Server-side Routing
  • 17. #CD22 Add routes in main app, and define handler function: Client-side Routing
  • 18. #CD22 Add lwr-router-container to main app template import { createRouter } from 'lwr/router'; Client-side Routing
  • 19. #CD22 Basically just an ES6 module with a few functions: ● constructor ● connect ● disconnect ● Update https://lwc.dev/guide/wire_adapter Custom @wire
  • 21. #CD22 ● Custom images/assets vs static resources (different import) ○ OSS: just add files to src/assets folder ○ Platform: import myResource from '@salesforce/resourceUrl/resourceReference'; ● Custom @wire → not allowed on Platform, replaced by Apex Class ○ OSS: import { getUser } from 'c/usersWireApi'; ○ Platform: import getUser from '@salesforce/apex/Namespace.UsersWireApi.getUser'; Differences between OSS & Platform
  • 22. #CD22 ● Navigation page names ○ OSS: whatever name you would like (eg. “namedPage”) ○ Platform: page names expected by Salesforce (ex: comm__namedPage) ● Metadata file (myComponent.js-meta.xml) ○ OSS: No need, but won’t complain if the file is there ○ Platform: expected by Salesforce, Differences between OSS & Platform
  • 23. #CD22 ● Presentational components ● No Salesforce only import ● Navigation is OK ● Was designed to work everywhere from the start ○ Use Salesforce expected page names ● Won’t fit for all components Components suited to use everywhere
  • 24. #CD22 LWC: ● https://lwc.dev ● https://github.com/salesforce/lwc LWR: ● https://developer.salesforce.com/docs/platform/lwr/overview SLDS: ● https://www.lightningdesignsystem.com ● https://github.com/salesforce-ux/design-system Resources
  • 25. #CD22 Demo projects GitHub repositories: https://github.com/FabienTaillon/lwc-lwr-oss https://github.com/FabienTaillon/lwc-oss-on-platform Create Components Dynamically in LWC OSS: https://www.youtube.com/watch?v=KYRGmilJOrM Resources