SlideShare a Scribd company logo
1 of 32
Download to read offline
Lightning
Josep Vall-llovera - CTO at Clapps
18/09/2015
@valnavjo Valnavjo in/jvn84 Valnavjo
Introduction
2
Index of contents
3
1. What is Lightning?
2. Getting started
3. Lightning App Builder
4. Lightning Components
5. Demo
6. What a nice surprise!
7. Code resources
8. Q&A
1. What is Lightning?
4
● Salesforce1 Lightning
● Aura framework
● Lightning Component Framework
● Lightning Process Builder
● Lightning App Builder
● Lightning Schema Builder
● Lightning Community Builder
● Lightning Connect
1. What is Lightning?
5
New stuff Rebrand
● Lightning Components
● Lightning App Builder
● Lightning Schema Builder
● Lightning Process Builder
● Lightning Community Builder
● Lightning Connect
2. Getting started
6
1. Create a DEV org
2. Set up a namespace
3. Enable Lightning Components
a. Setup - Develop - Lightning Components - Check
"Enable Lightning Components in Salesforce1
(BETA)"
b. Click Save
3. Lightning App Builder
7
1. Setup - Build - Lightning App Builder
2. Click New and follow the steps
3. Hands-on!
4. Lightning Components
8
1. Setup - Build - Develop - Lightning Components
2. List of Lightning Components
3. No UI editor… yet.
4. Lightning Components
9
1. Expose in Lightning App Builder:
a. flexipage:availableForAllPageTypes
2. Expose in Lightning Tabs:
a. force:appHostable
3. Expose in SF1:
a. Create a custom tab for Lightning Component
i. Setup - Create - Tabs
b. Include your Lightning component in the Salesforce1 navigation menu
i. Setup - Administer - Mobile Administration - Mobile Navigation
4.1. App
10
1. They can include Lightning components and regular
HTML markup.
2. They can’t be included in SF1. You have to create a
master component and expose it.
4.1. App
11
<aura:application>
<!-- App code here -->
</aura:application>
4.2. Component
12
1. They can use Apex Controller.
a. static methods annotated with @AuraEnabled
2. They can share information.
3. They can listen client-side events.
4. Wrapper classes are supported, but not inner classes.
5. Three main components:
a. aura
b. ui
c. force
4.2. Component
13
aura ui force
● aura:application
● aura:component
● aura:renderIf
● aura:unescapedHtml
● ui:inputText
● ui:outputDateTime
● ui:button
● ui:menu
● force:inputField
● force:outputField
4.2. Component
14
<aura:component>
<!-- Optional coponent attributes here -->
<!-- Optional HTML markup -->
<div class="container">
Hello world!
<!-- Other components -->
</div>
</aura:component>
4.3. Controller
15
● Handles events.
● Javascript.
● Defines functions for all client-side actions.
4.3. Controller
16
Controller
{
handleClick : function(component, event) {
var attributeValue = component.get("v.text");
component.set("v.text", event.target.value);
}
}
Component
<aura:component>
<aura:attribute name="text" type="String" default="Just a string. Waiting for change."/>
<ui:button label="Please work!" press="{!c.handleClick}"/>
<br/>
{!v.text}
</aura:component>
4.4. Helper
17
● Javascript functions.
● They looks like Controller functions.
● They can be called from:
○ Component Controller
○ Component Renderer.
● Examples:
○ Server-side actions.
○ Data processing.
○ Utility functions.
4.4. Helper
18
helper
({
open: function(component, item, mode, sort){
if (mode === "new") {
//do something
}
// do something else, such as firing an event
}
})
controller
({
open: function(component, event, helper) {
helper.updateItem(component, event.getParam("item"), ‘new’, false);
}
})
4.5. Style
19
● CSS Components Style.
● Has a special THIS CSS class added to it.
● You can also load external CSS (and JS) files.
○ They must be loaded as static resource.
○ <ltng:require />
4.5. Style
20
CSS
.THIS {
background-color: grey;
}
.THIS.white {
background-color: white;
}
External css and js
<ltng:require scripts="/resource/your_js_resource" styles="/resource/your_css_resource"
afterScriptsLoaded="{!c.yourJsFunction}"/>
4.6. Documentation
21
● Provides a way to define documentation for a component.
● Two ways:
○ DocDef
■ Full documentation: description, sample code, reference to
example
■ HTML
○ Inline
■ One or two sentences
■ Plan text
4.6. Documentation
22
<aura:documentation>
<aura:description>
<p>An <code>np:myComponent</code> component represents an element that executes
an action defined by a controller.</p>
</aura:description>
<aura:example name="myComponentExample" ref="np:myComponentExample" label="Using
the np:myComponent Component">
<p>This example shows a simple setup of <code>myComponent</code>.</p>
</aura:example>
</aura:documentation>
● See documentation
4.7. Renderer
23
● Javascript
● Take control over Rendering Lifecycle.
● Functions you can override:
○ render()
○ rerender()
○ afterRender()
○ unrender()
4.7. Renderer
24
renderer
({
render : function(cmp, helper) {
var ret = this.superRender();
console.log(‘Do something man!’);
return ret;
}
})
4.8. Design
25
1. Only Boolean, Integer or String attributes can be
exposed in design files.
2. Use ‘datasource’ attribute to render a field as a picklist
in the App Builder.
a. Use String for a picklist.
b. Use String[] for a multi-picklist.
i. This never worked for me. Any ideas?
4.8. Design
26
Design
<design:component label="Hello World">
<design:attribute name="subject" label="Subject" description="Name of the person" />
<design:attribute name="greeting" label="Greeting" />
</design:component>
Component
<aura:component implements="flexipage:availableForAllPageTypes">
<aura:attribute name="greeting" type="String" default="Hello" />
<aura:attribute name="subject" type="String" default="World" />
</aura:component>
4.9. SVG
27
● It defines a custom icon for your component when it
appears in the App Builder.
4.9. SVG
28
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.
org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400">
<circle cx="100" cy="100" r="50" stroke="black" stroke-width="5" fill="red" />
</svg>
Demo
29
● Salesforce1 Meetup Lightning app.
Code resources
https://github.com/Valnavjo/sdgbarcelona.git
30
Useful links
1. Lightning Components Developer’s Guide
2. Aura framework
3. Lightning Process Builder
4. Lightning App Builder
5. Lightning Community Builder
6. Lightning Connect
31
Thanks!
Q&A
32

More Related Content

What's hot

Boost your productivity with Scala tooling!
Boost your productivity  with Scala tooling!Boost your productivity  with Scala tooling!
Boost your productivity with Scala tooling!MeriamLachkar1
 
Running a Test Harness in Parallel using Jenkins
Running a Test Harness in Parallel using JenkinsRunning a Test Harness in Parallel using Jenkins
Running a Test Harness in Parallel using JenkinsJoshua Shapiro
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?Altoros
 
OASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationOASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationMario Estrada
 
Secret Deployment Events API features for mabl
Secret Deployment Events API features for mablSecret Deployment Events API features for mabl
Secret Deployment Events API features for mablMatthew Stein
 
Two-Step Deployment with Rails
Two-Step Deployment with RailsTwo-Step Deployment with Rails
Two-Step Deployment with Railsdugsmith
 
Eclipse Mars News @JUG HH
Eclipse Mars News @JUG HHEclipse Mars News @JUG HH
Eclipse Mars News @JUG HHsimonscholz
 
Debug production server by counter
Debug production server by counterDebug production server by counter
Debug production server by counterRoy Chung-Cheng Lou
 
Inside asp.net mvc framework
Inside asp.net mvc frameworkInside asp.net mvc framework
Inside asp.net mvc frameworkCiklum Ukraine
 
Inside ASP.NET MVC framework
Inside ASP.NET MVC frameworkInside ASP.NET MVC framework
Inside ASP.NET MVC frameworkCiklum Ukraine
 
LAB2 Importing Data into HDFS Using Sqoop.docx
LAB2 Importing Data into HDFS Using Sqoop.docxLAB2 Importing Data into HDFS Using Sqoop.docx
LAB2 Importing Data into HDFS Using Sqoop.docxKarim Fathallah
 
How to create an Angular builder
How to create an Angular builderHow to create an Angular builder
How to create an Angular builderMaurizio Vitale
 
Using Kafka in your python application - Python fwdays 2020
Using Kafka in your python application - Python fwdays 2020Using Kafka in your python application - Python fwdays 2020
Using Kafka in your python application - Python fwdays 2020Oleksandr Tarasenko
 
Oleksandr Tarasenko "Using Kafka in your python applications"
Oleksandr Tarasenko "Using Kafka in your python applications"Oleksandr Tarasenko "Using Kafka in your python applications"
Oleksandr Tarasenko "Using Kafka in your python applications"Fwdays
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciollaAndrea Paciolla
 
Effective java item 80 prefer executors, tasks, and streams to threads
Effective java   item 80  prefer executors, tasks, and  streams to threadsEffective java   item 80  prefer executors, tasks, and  streams to threads
Effective java item 80 prefer executors, tasks, and streams to threadsIsaac Liao
 
Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM PLM Mechanic .
 
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spotOpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spotOpenCms
 
Intelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStackIntelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStackLove Nyberg
 

What's hot (20)

Boost your productivity with Scala tooling!
Boost your productivity  with Scala tooling!Boost your productivity  with Scala tooling!
Boost your productivity with Scala tooling!
 
Neutron upgrades
Neutron upgradesNeutron upgrades
Neutron upgrades
 
Running a Test Harness in Parallel using Jenkins
Running a Test Harness in Parallel using JenkinsRunning a Test Harness in Parallel using Jenkins
Running a Test Harness in Parallel using Jenkins
 
Where is my scalable api?
Where is my scalable api?Where is my scalable api?
Where is my scalable api?
 
OASGraph LoopBack 4 Integration
OASGraph LoopBack 4 IntegrationOASGraph LoopBack 4 Integration
OASGraph LoopBack 4 Integration
 
Secret Deployment Events API features for mabl
Secret Deployment Events API features for mablSecret Deployment Events API features for mabl
Secret Deployment Events API features for mabl
 
Two-Step Deployment with Rails
Two-Step Deployment with RailsTwo-Step Deployment with Rails
Two-Step Deployment with Rails
 
Eclipse Mars News @JUG HH
Eclipse Mars News @JUG HHEclipse Mars News @JUG HH
Eclipse Mars News @JUG HH
 
Debug production server by counter
Debug production server by counterDebug production server by counter
Debug production server by counter
 
Inside asp.net mvc framework
Inside asp.net mvc frameworkInside asp.net mvc framework
Inside asp.net mvc framework
 
Inside ASP.NET MVC framework
Inside ASP.NET MVC frameworkInside ASP.NET MVC framework
Inside ASP.NET MVC framework
 
LAB2 Importing Data into HDFS Using Sqoop.docx
LAB2 Importing Data into HDFS Using Sqoop.docxLAB2 Importing Data into HDFS Using Sqoop.docx
LAB2 Importing Data into HDFS Using Sqoop.docx
 
How to create an Angular builder
How to create an Angular builderHow to create an Angular builder
How to create an Angular builder
 
Using Kafka in your python application - Python fwdays 2020
Using Kafka in your python application - Python fwdays 2020Using Kafka in your python application - Python fwdays 2020
Using Kafka in your python application - Python fwdays 2020
 
Oleksandr Tarasenko "Using Kafka in your python applications"
Oleksandr Tarasenko "Using Kafka in your python applications"Oleksandr Tarasenko "Using Kafka in your python applications"
Oleksandr Tarasenko "Using Kafka in your python applications"
 
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciollaJavascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
 
Effective java item 80 prefer executors, tasks, and streams to threads
Effective java   item 80  prefer executors, tasks, and  streams to threadsEffective java   item 80  prefer executors, tasks, and  streams to threads
Effective java item 80 prefer executors, tasks, and streams to threads
 
Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM Recapture Disk Space in Agile PLM
Recapture Disk Space in Agile PLM
 
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spotOpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
OpenCms Days 2015: Keynote - OpenCms 10 X marks the spot
 
Intelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStackIntelligent infrastructure with SaltStack
Intelligent infrastructure with SaltStack
 

Similar to September SDG - Lightning

ScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency InjectionScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency Injection7mind
 
EuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears TrainingEuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears TrainingAlessandro Molina
 
How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...Tomiwa Ademidun
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0Haytham Ghandour
 
Angular.js for beginners
Angular.js for beginners Angular.js for beginners
Angular.js for beginners Basia Madej
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIVisual Engineering
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya Kwatukha
 
Have you been stalking your servers?
Have you been stalking your servers?Have you been stalking your servers?
Have you been stalking your servers?Martin Marji Cermak
 
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...Nagios
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type scriptRavi Mone
 
UI5con 2017 - UI5 Components - More Performance...
UI5con 2017 - UI5 Components - More Performance...UI5con 2017 - UI5 Components - More Performance...
UI5con 2017 - UI5 Components - More Performance...Peter Muessig
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Pantheon
 
What's new and what's next in Rudder
What's new and what's next in RudderWhat's new and what's next in Rudder
What's new and what's next in RudderRUDDER
 
Measuring Performance / iOS Apps
Measuring Performance / iOS AppsMeasuring Performance / iOS Apps
Measuring Performance / iOS AppsIgor Mandrigin
 
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushEasy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushQArea
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29Nitin Bhojwani
 

Similar to September SDG - Lightning (20)

ScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency InjectionScalaUA - distage: Staged Dependency Injection
ScalaUA - distage: Staged Dependency Injection
 
EuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears TrainingEuroPython 2013 - Python3 TurboGears Training
EuroPython 2013 - Python3 TurboGears Training
 
How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...How to build a website that works without internet using angular, service wor...
How to build a website that works without internet using angular, service wor...
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
 
Airflow 101
Airflow 101Airflow 101
Airflow 101
 
Angular.js for beginners
Angular.js for beginners Angular.js for beginners
Angular.js for beginners
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte III
 
Le Wagon - React 101
Le Wagon - React 101Le Wagon - React 101
Le Wagon - React 101
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
Have you been stalking your servers?
Have you been stalking your servers?Have you been stalking your servers?
Have you been stalking your servers?
 
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
Nagios Conference 2013 - Jake Omann - Developing Nagios XI Components and Wiz...
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type script
 
Spring boot
Spring bootSpring boot
Spring boot
 
UI5con 2017 - UI5 Components - More Performance...
UI5con 2017 - UI5 Components - More Performance...UI5con 2017 - UI5 Components - More Performance...
UI5con 2017 - UI5 Components - More Performance...
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
 
What's new and what's next in Rudder
What's new and what's next in RudderWhat's new and what's next in Rudder
What's new and what's next in Rudder
 
Measuring Performance / iOS Apps
Measuring Performance / iOS AppsMeasuring Performance / iOS Apps
Measuring Performance / iOS Apps
 
mean stack
mean stackmean stack
mean stack
 
Easy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & DrushEasy Drupal Project Deployment With Features Module & Drush
Easy Drupal Project Deployment With Features Module & Drush
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29
 

Recently uploaded

Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 

September SDG - Lightning

  • 1. Lightning Josep Vall-llovera - CTO at Clapps 18/09/2015 @valnavjo Valnavjo in/jvn84 Valnavjo
  • 3. Index of contents 3 1. What is Lightning? 2. Getting started 3. Lightning App Builder 4. Lightning Components 5. Demo 6. What a nice surprise! 7. Code resources 8. Q&A
  • 4. 1. What is Lightning? 4 ● Salesforce1 Lightning ● Aura framework ● Lightning Component Framework ● Lightning Process Builder ● Lightning App Builder ● Lightning Schema Builder ● Lightning Community Builder ● Lightning Connect
  • 5. 1. What is Lightning? 5 New stuff Rebrand ● Lightning Components ● Lightning App Builder ● Lightning Schema Builder ● Lightning Process Builder ● Lightning Community Builder ● Lightning Connect
  • 6. 2. Getting started 6 1. Create a DEV org 2. Set up a namespace 3. Enable Lightning Components a. Setup - Develop - Lightning Components - Check "Enable Lightning Components in Salesforce1 (BETA)" b. Click Save
  • 7. 3. Lightning App Builder 7 1. Setup - Build - Lightning App Builder 2. Click New and follow the steps 3. Hands-on!
  • 8. 4. Lightning Components 8 1. Setup - Build - Develop - Lightning Components 2. List of Lightning Components 3. No UI editor… yet.
  • 9. 4. Lightning Components 9 1. Expose in Lightning App Builder: a. flexipage:availableForAllPageTypes 2. Expose in Lightning Tabs: a. force:appHostable 3. Expose in SF1: a. Create a custom tab for Lightning Component i. Setup - Create - Tabs b. Include your Lightning component in the Salesforce1 navigation menu i. Setup - Administer - Mobile Administration - Mobile Navigation
  • 10. 4.1. App 10 1. They can include Lightning components and regular HTML markup. 2. They can’t be included in SF1. You have to create a master component and expose it.
  • 11. 4.1. App 11 <aura:application> <!-- App code here --> </aura:application>
  • 12. 4.2. Component 12 1. They can use Apex Controller. a. static methods annotated with @AuraEnabled 2. They can share information. 3. They can listen client-side events. 4. Wrapper classes are supported, but not inner classes. 5. Three main components: a. aura b. ui c. force
  • 13. 4.2. Component 13 aura ui force ● aura:application ● aura:component ● aura:renderIf ● aura:unescapedHtml ● ui:inputText ● ui:outputDateTime ● ui:button ● ui:menu ● force:inputField ● force:outputField
  • 14. 4.2. Component 14 <aura:component> <!-- Optional coponent attributes here --> <!-- Optional HTML markup --> <div class="container"> Hello world! <!-- Other components --> </div> </aura:component>
  • 15. 4.3. Controller 15 ● Handles events. ● Javascript. ● Defines functions for all client-side actions.
  • 16. 4.3. Controller 16 Controller { handleClick : function(component, event) { var attributeValue = component.get("v.text"); component.set("v.text", event.target.value); } } Component <aura:component> <aura:attribute name="text" type="String" default="Just a string. Waiting for change."/> <ui:button label="Please work!" press="{!c.handleClick}"/> <br/> {!v.text} </aura:component>
  • 17. 4.4. Helper 17 ● Javascript functions. ● They looks like Controller functions. ● They can be called from: ○ Component Controller ○ Component Renderer. ● Examples: ○ Server-side actions. ○ Data processing. ○ Utility functions.
  • 18. 4.4. Helper 18 helper ({ open: function(component, item, mode, sort){ if (mode === "new") { //do something } // do something else, such as firing an event } }) controller ({ open: function(component, event, helper) { helper.updateItem(component, event.getParam("item"), ‘new’, false); } })
  • 19. 4.5. Style 19 ● CSS Components Style. ● Has a special THIS CSS class added to it. ● You can also load external CSS (and JS) files. ○ They must be loaded as static resource. ○ <ltng:require />
  • 20. 4.5. Style 20 CSS .THIS { background-color: grey; } .THIS.white { background-color: white; } External css and js <ltng:require scripts="/resource/your_js_resource" styles="/resource/your_css_resource" afterScriptsLoaded="{!c.yourJsFunction}"/>
  • 21. 4.6. Documentation 21 ● Provides a way to define documentation for a component. ● Two ways: ○ DocDef ■ Full documentation: description, sample code, reference to example ■ HTML ○ Inline ■ One or two sentences ■ Plan text
  • 22. 4.6. Documentation 22 <aura:documentation> <aura:description> <p>An <code>np:myComponent</code> component represents an element that executes an action defined by a controller.</p> </aura:description> <aura:example name="myComponentExample" ref="np:myComponentExample" label="Using the np:myComponent Component"> <p>This example shows a simple setup of <code>myComponent</code>.</p> </aura:example> </aura:documentation> ● See documentation
  • 23. 4.7. Renderer 23 ● Javascript ● Take control over Rendering Lifecycle. ● Functions you can override: ○ render() ○ rerender() ○ afterRender() ○ unrender()
  • 24. 4.7. Renderer 24 renderer ({ render : function(cmp, helper) { var ret = this.superRender(); console.log(‘Do something man!’); return ret; } })
  • 25. 4.8. Design 25 1. Only Boolean, Integer or String attributes can be exposed in design files. 2. Use ‘datasource’ attribute to render a field as a picklist in the App Builder. a. Use String for a picklist. b. Use String[] for a multi-picklist. i. This never worked for me. Any ideas?
  • 26. 4.8. Design 26 Design <design:component label="Hello World"> <design:attribute name="subject" label="Subject" description="Name of the person" /> <design:attribute name="greeting" label="Greeting" /> </design:component> Component <aura:component implements="flexipage:availableForAllPageTypes"> <aura:attribute name="greeting" type="String" default="Hello" /> <aura:attribute name="subject" type="String" default="World" /> </aura:component>
  • 27. 4.9. SVG 27 ● It defines a custom icon for your component when it appears in the App Builder.
  • 28. 4.9. SVG 28 <?xml version="1.0"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3. org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> <circle cx="100" cy="100" r="50" stroke="black" stroke-width="5" fill="red" /> </svg>
  • 31. Useful links 1. Lightning Components Developer’s Guide 2. Aura framework 3. Lightning Process Builder 4. Lightning App Builder 5. Lightning Community Builder 6. Lightning Connect 31