Lightning allows developers to rapidly develop highly interactive applications with Lightning Components. In this webinar, we will show you the best practices to build a single page application by using features from the Lightning Component framework.
2. Statement under the Private Securities Litigation Reform Act of 1995:
This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of
the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking
statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service
availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future
operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of
our services.
The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service,
new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions
or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and
acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and
manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization
and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our
annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and
others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.
Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be
delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Forward-Looking Statement
4. Have Questions?
• Don’t wait until the end to ask your question!
— Technical support will answer questions starting now.
• Stick around for live Q&A at the end
— Speakers will tackle more questions at the end, time-
allowing.
• Head to Developer Forums
— More questions? Visit developer.salesforce.com/forums
6. SendOffer Lightning Component
1. We built a Recruitment Application that handles
candidates, interviews, and offers.
2. SendOffer LC provides an easy way to construct and send
offer letter to candidate
3. 4 Stages: Detail, Edit, Review, Send
7. Single Page Application (SPA)
1. Does not require page reloads to work
2. Faster than Page-Centric Apps
3. Usually built with Javascript, CSS, Ajax
4. Examples: Salesforce Lightning Experience, Salesforce 1
9. Lightning Base Components
1. Built in on the platform
- No more html + SLDS + javascript work
2. Lightning:Input
3. Lightning:Select
4. Lightning:Icon
5. Lightning:TextArea
6. Lightning:button
10. Lightning Events & CSS
1. Application Events
- passing data between children
2. Component Events & CSS
- bubbling - show and hide children Components
11. Dynamic Creation of LCs
1. Gives you more flexibility
2. Define which child LCs and which attributes should be
created based on
- data (eg. list row should show as read-only or not)
- user interaction (eg. add error messages
dynamically based on validation checks)
15. Dynamic Creation of LCs
List.cmpListController.js
<apex:Component>
<div>
{!v.Body}
</div>
</apex:Component>
// JS Controller:
//Loop
for (i = 0; i <
list.length; i++)
{
if (i.isReadOnly){
// Create Row
Component without Edit
Link
}
else
// Create Row
Component with Edit Link
}
16. Resources
1. Lightning Base Components (Link)
2. Lightning Events (Link)
3. Show/Hide Markup with CSS (Link)
4. Dynamic creation of LCs (Link)
5. Github (Link)
So what is a Single-Page-Application or SPA? It is basically an app that works inside a browser and does not require the user to reload the page for the app to work. SPAs try to imitate a “natural” environment in the browser – no page reloads, no extra wait time - and to keep the user in one, comfortable web space where content is presented in a simple, easy and workable fashion. A good example of a SPA is the Salesforce Lightning Experience UI itself. Our goal for today's demo is to demonstrate how you can create a mini SPA inside a Lightning Component as this type of design is highly interactive and can open up interesting possibilities for your app's UI.
You can see on this diagram, we have a parent Lightning Component called OfferLetterSPA that acts as our SPA outermost Container which means it will be always visible and that's the LC that our users will drag and drop to Lightning Pages using the Lightning App Builder. Inside this parent Lightning container we are going to surface up different child Lightning Components and we are going to control their visibility from this Parent LC whenever the user clicks on the Next or Back buttons on the child components