Top Banner
Building JavaScript Applications on the Salesforce1 Platform June 19, 2014
38

Building JavaScript Applications on the Salesforce1 Platform

Jan 26, 2015

Download

Technology

Description:

In this session, we will discuss and demonstrate how to build engaging employee and customer-facing applications in JavaScript on top of the Salesforce1 Platform.

We will explore all the aspects involved in building these next generation applications including authentication, the REST APIs, mobile development options, and different integration scenarios. We will also share some inspiring examples built on the Salesforce1 Platform with leading JavaScript frameworks such as AngularJS, Ionic, BackboneJS, Ratchet and more.

Key Takeaways:

::Get an overview of the Salesforce1 Platform from a developer point of view
::Understand Salesforce OAuth Authentication
::Acquire knowledge on the Salesforce REST APIs
::Get insight on building a Single Page Application on the Salesforce1 Platform
::Explore using modern JavaScript Frameworks such as AngularJS, Ionic, Backbone, etc.
::Gain knowledge on building state-of-the art mobile apps on the Salesforce1 Platform
::Get familiar with building custom apps with Heroku and Heroku Connect

Intended Audience:

This session is for both seasoned JavaScript developers who want to learn how to build applications on top of the Salesforce1 Platform, and seasoned Salesforce developers who want to learn how to create amazing user experiences in JavaScript.

Recommended Resources:

https://developer.salesforce.com/en/events/webinars/JavaScript_Applications_Salesforce?d=70130000000lgzk

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Building JavaScript Applications on the Salesforce1 Platform

Building JavaScript Applicationson the Salesforce1 PlatformJune 19, 2014

Page 2: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Speaker

Christophe Coenraets

Developer Evangelist

http://coenraets.org

https://github.com/ccoenraets

@ccoenraets

Page 3: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Safe Harbor

Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with 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-Q for the most recent fiscal quarter ended July 31, 2012. This 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.

Page 4: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Go Social!

@salesforcedevs / #forcewebinar

Salesforce Developers

+Salesforce Developers

Salesforce Developers

Salesforce DevelopersThe video will be posted to YouTube

& the webinar recap page (same URL as registration).

This webinar is being recorded!

Page 5: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Have Questions?

Don’t wait until the end to ask your question! – Technical support will answer questions starting now.

Respect Q&A etiquette– Please don’t repeat questions. The support team is

working their way down the queue.

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

Page 6: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Agenda

Why Salesforce for JavaScript Developers?

Why JavaScript for Salesforce Developers?

Five Reference Architectures

Single Page Applications with AngularJS and Ionic

Page 7: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Why Salesforce?

IdeaBuild App

Idea

buy & setup

hardware

install complex software

define user access

build & test security

make it mobile &

social

setup reporting & analytics

build app

Traditional Platforms

6-12 Months?

App

App

Page 8: Building JavaScript Applications on the Salesforce1 Platform

Develop, package and instantly deploy apps

Access rich APIs and frameworks

Code in your favorite language

Add fields, design layouts, and manage users

Point-and-click workflow & business logic

Drag-and-drop reports and dashboards

Programmatic Declarative

Programmatic and Declarative Development

Page 9: Building JavaScript Applications on the Salesforce1 Platform

Why JavaScript?

1. Build Engaging User Experiences

2. Leverage JavaScript Libraries

3. Build Custom Applications

Page 10: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Five Reference Architectures

1. JavaScript in Visualforce Pages

2. JavaScript Apps Hosted Externally

3. Canvas Apps

4. Hybrid Apps

5. Consumer Apps

Page 11: Building JavaScript Applications on the Salesforce1 Platform

1. JavaScript in Visualforce Pages

(REST)JavaScript Remoting

Remote Objects

Visualforce Page

Page 12: Building JavaScript Applications on the Salesforce1 Platform

Demos

Page 13: Building JavaScript Applications on the Salesforce1 Platform

2. JavaScript Apps Hosted Externally

REST APIs

app.jsindex.html

OAuth

HTTP Server

Cross Domain Policy

Page 14: Building JavaScript Applications on the Salesforce1 Platform

2. JavaScript Apps Hosted Externally

app.jsindex.html

OAuth

REST APIs

HTTP Server

Proxy

Page 15: Building JavaScript Applications on the Salesforce1 Platform

http://bit.ly/trysoql

Page 16: Building JavaScript Applications on the Salesforce1 Platform

http://bit.ly/sfdash

Page 17: Building JavaScript Applications on the Salesforce1 Platform
Page 18: Building JavaScript Applications on the Salesforce1 Platform

Connected App

Page 19: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

ForceTK: JavaScript REST API Toolkit

http://bit.ly/forcetk

Page 20: Building JavaScript Applications on the Salesforce1 Platform

3. Embed a Canvas App

iframe with context about:

– Current user

– Current page

JavaScript SDK

http://bit.ly/sf-canvas-sdk

Page 21: Building JavaScript Applications on the Salesforce1 Platform

4. Hybrid Apps (Mobile SDK)

REST APIs

OAuth

Page 22: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Mobile SDK for Hybrid Apps

Wrapper

Bridge

Hybrid Remote:– Visualforce Pages loaded in native container as needed

Hybrid Local:– HTML + JS + CSS installed locally on the device

Page 23: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Single Page Application (SPA)

<html>

<head>

<title>My App</title>

<script src="app.js"></script>

</head>

<body></body>

</html>

Page 24: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Single Page Application

Web app that lives in a single HTML page

Views created in JavaScript and injected into DOM

Well suited for mobile apps:– More responsive (no network dependency to get the UI)

– Works offline

Page 25: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

New Challenges

Create complex apps in JavaScript

Long-lived DOM

Native-like user experiences

Page 26: Building JavaScript Applications on the Salesforce1 Platform

JavaScript Frameworks Can Help

DOM

Architecture

UI

Full stack Custom stack

Page 27: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

MVC Architecture

Templates

Data Binding

UI Layer on top of AngularJS

UI Components

UI Patterns

+

Page 28: Building JavaScript Applications on the Salesforce1 Platform

Tabs Side MenusLists Action Sheets

Page 29: Building JavaScript Applications on the Salesforce1 Platform

Contacts Demo

Page 30: Building JavaScript Applications on the Salesforce1 Platform

5. Consumer App

Case

Campaign

Product

ContactInteracti

on

Campaign

Product

ContactInteracti

on

Marketing Manager

Customer

Heroku Connect

REST

Page 31: Building JavaScript Applications on the Salesforce1 Platform

Nibs Demo

Page 32: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Recap

Use JavaScript in Visualforce pages to deliver great user experiences

Create connected apps in JavaScript that authenticate with Salesforce through OAuth and access data using APIs

Create Hybrid Apps in JavaScript using the Mobile SDK

Use Frameworks like AngularJS and Ionic to create Single Page Applications

Combine the Salesforce, Heroku, and Heroku Connect to deliver engaging consumer apps

Page 33: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Resources

REST API Home– https://developer.salesforce.com/page/REST_API

Mobile SDK Home– https://developer.salesforce.com/page/Mobile_SDK

AngularJS– https://angularjs.org/

Ionic Framework– http://ionicframework.com/

Page 34: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Next Steps

Salesforce Developer workshop– http://ccoenraets.github.io/salesforce-developer-workshop/

Page 35: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Survey

Your feedback is crucial to the successof our webinar programs. Thank you!

http://bit.ly/SF1JScript

#forcewebinar

Page 36: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinarwww.summerofhacks.com

July 11-13

July 18-20

July 25-27

July 18-20

#summerofhacks

Page 37: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

October 13-16, 2014 • San

Francisco, CA

$899 DEVELOPER DISCOUNT CODE:

D14DVLPR

#devzone

Page 38: Building JavaScript Applications on the Salesforce1 Platform

#forcewebinar

Q & A

Christophe Coenraets

Developer Evangelist

http://coenraets.org

@ccoenraets