salesforce developer garage seattle: force.com canvas

31
Visualforce & Force.com Canvas Jay Hurst, Salesforce.com, Product Manager – Force.com Canvas @extraidea Unlock your Web App inside of Salesforce.com

Upload: salesforce-developers

Post on 27-Jan-2015

117 views

Category:

Technology


3 download

DESCRIPTION

Presentation on Force.com Canvas from the Salesforce Developer Garage Seattle on 3/28/13 by Jay Hurst.

TRANSCRIPT

Page 1: Salesforce Developer Garage Seattle: Force.com Canvas

Visualforce & Force.com Canvas

Jay Hurst, Salesforce.com, Product Manager – Force.com Canvas @extraidea

Unlock your Web App inside of Salesforce.com

Page 2: Salesforce Developer Garage Seattle: Force.com Canvas

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 3: Salesforce Developer Garage Seattle: Force.com Canvas

Join the conversation: #forcewebinar

Jay Hurst

Product Manager – Force.com Canvas,

@extraidea

Speakers

Page 4: Salesforce Developer Garage Seattle: Force.com Canvas

Agenda

§  Review of Force.com Canvas §  Demonstrate using a Force.com Canvas App in a Visualforce Page

§  Demonstrate using custom parameters in a Force.com Canvas App

§ Dynamically rendering record-specific content §  Q&A

§  Next Steps

Page 5: Salesforce Developer Garage Seattle: Force.com Canvas

Apps, Apps, Everywhere

Companies have many applications across their org §  Cloud Applications (Salesforce.com, Google Docs)

§  Hybrid Applications

§  Home Grown Solutions (Intranet, Task Management)

Page 6: Salesforce Developer Garage Seattle: Force.com Canvas

Introducing Force.com Canvas

PILOT platform service to allow for external applications to be easily and securely integrated into Salesforce from their native environment with little re-design. §  Services Include

•  JavaScript SDK

•  Simplified Authentication (Signed Request or OAuth)

•  Context Services (Including Custom Parameters)

•  Cross Domain API Calls

•  App Registration and Management

Page 7: Salesforce Developer Garage Seattle: Force.com Canvas

What does Force.com Canvas do?

Salesforce 3rd Party App

SDK HTTPS

Page 8: Salesforce Developer Garage Seattle: Force.com Canvas

What are some examples of Canvas Apps

There are many examples of how Canvas Apps can be used §  Existing Web Applications from Partners

§  Concur Trips, Event Applications

§  Internally Developed Applications §  Intranets, Service Ticket Applications

§  Enterprise Systems with Web Front-Ends §  SAP, Sharepoint

Page 9: Salesforce Developer Garage Seattle: Force.com Canvas

Force.com Canvas – You code it, we show it! Regardless of your language of choice, JavaScript libraries allow your app to connect with salesforce at a UI and API layer:

Page 10: Salesforce Developer Garage Seattle: Force.com Canvas

Technologies used in Force.com Canvas

Page 11: Salesforce Developer Garage Seattle: Force.com Canvas

Force.com Canvas Usage Flow

1.  User Clicks on the App from the Chatter Tab (or VF Page)

2.  The 3rd Party App responds with HTML that is loaded into the salesforce UI

3.  The user interacts with the 3rd party app 4.  The 3rd party app uses the Canvas

JavaScript SDK to make a call to a server side JavaScript library

5.  The server side acts on the behalf of the user and posts to the salesforce database

6.  Alternatively, the 3rd party app can communicate server-to-server with salesforce via the standard APIs

3rd Party App

<script var a= var xl if(xls

Client-Side JS (canvas-all.js)

VB

ASP

VB

C#

VB

C++

VB

CF

VB

Java

VB

JSP

VB

.NET

VB

PHP

VB

VB

3rd PartyDatabase

Web UI

Salesforce.com UI

Canvas Link

if(conn SELEC WHERE print

Server-side JS

Salesforce.com Database

1 2

3

4

5

6Chatter Tab

Server

Page 12: Salesforce Developer Garage Seattle: Force.com Canvas

What is the Signed Request Access Method? The signed request is the default (and recommended) access method. §  When you click the Canvas app, we POST a signed request to your endpoint

§  You can verify the request was sent by salesforce and then view context info

§  Context contains data like: •  Scoped OAuth Token

•  User Info (Name, email, ID, etc..)

•  Company Info (Company name, ID, etc…) •  Environment Info (page is the canvas on, size of the iFrame)

•  Useful Links

Salesforce.com Confidential

Page 13: Salesforce Developer Garage Seattle: Force.com Canvas

Signed Request Demo

Page 14: Salesforce Developer Garage Seattle: Force.com Canvas

Force.com Canvas - Registration/Management Flow

1.  App is created with specified modules

2.  After creation app is available in creator org

3.  If created in a namespaced DE org, App can be published

§  Published Apps can be installed into any org with Canvas enabled

Salesforce.com Confidential

Canvas Connected App

Basic Information- Name- Description- Info URL- Icon URL- Contact Email- Contact Phone

Force.com Canvas Module

- Canvas URL- Access Method

OAuth Module- Callback URL- Digital Signature- Selected OAuth Scopes

Install URL

Published(DE Org)

Subscriber Org- Manageable inside org- Useable inside org

Install

Creator Org- Manageable inside org- Useable inside org

Page 15: Salesforce Developer Garage Seattle: Force.com Canvas

Force.com Canvas – Visualforce Component

Add a Force.com Canvas App to any Visualforce Page §  Visualforce Tabs, Inline Visualforce

Pages, Standalone Visualforce Pages

§  Ability to specify Canvas height and Width

§  Signed Request/Context delivers Page and Record specific information

Salesforce.com Confidential

Page 16: Salesforce Developer Garage Seattle: Force.com Canvas

Force.com Canvas Expanding the Warehouse App

Page 17: Salesforce Developer Garage Seattle: Force.com Canvas

Force.com Canvas – Expanding the Warehouse App

Canvas App Walkthrough: §  Explaining the idea of the Canvas Fulfillment App

§  Demo the app in the Canvas App Previewer / Chatter Tab

§  Create a Visualforce Page/Tab to display the Canvas App

§  Inline the App inside of the Invoice Statement object §  Modify the App to dynamically render based on context

Page 18: Salesforce Developer Garage Seattle: Force.com Canvas

What is the Force.com Canvas Warehouse App §  The Warehouse App is a walkthrough provided by salesforce which

explains the customizability of the salesforce.com app •  The app takes you through the declarative and integration capabilities of

salesforce.com

•  The full workbook can be found at http://www.salesforce.com/us/developer/docs/workbook/forcecom_workbook.pdf

§  The Force.com Canvas App will represent a fulfillment center that your warehouse app will use

•  Picture salesforce.com as your sales center, and the Web App your fulfillment/shipping center…Force.com Canvas allows you to interact with both apps

Page 19: Salesforce Developer Garage Seattle: Force.com Canvas
Page 20: Salesforce Developer Garage Seattle: Force.com Canvas

Heroku: A Multi-language Cloud App Platform

Page 21: Salesforce Developer Garage Seattle: Force.com Canvas

Canvas Demo

Page 22: Salesforce Developer Garage Seattle: Force.com Canvas

Combining the Fulfillment App with the Warehouse App §  Fulfilment data now exposed inside of the Chatter tab

Page 23: Salesforce Developer Garage Seattle: Force.com Canvas

Exposing a Canvas App in a Visualforce Page §  Spring ‘13 introduces the ability to drop a Canvas App in a Visualforce Page

•  Use the new <apex:canvasApp /> tag

•  The required information is: –  applicationName –The full name of the app

–  namespacePrefix – The namespace of the Canvas App –  developerName – The developer name of the app (found on the app detail page)

•  Optional information includes: –  height – The height of your canvas

–  width – The width of your canvas –  border – The width of the border around your canvas

–  scrolling – Indicates if the canvas should have scroll bars

–  parameters – JSON string to pass in the Context sent to the app

Page 24: Salesforce Developer Garage Seattle: Force.com Canvas

Using apex:canvasApp <apex:page showheader="false">

<apex:canvasApp applicationName="Fulfillment App”

height="1000px" width="800px” parameters="{'myValue' : 'value1'}” />

</apex:page>

Page 25: Salesforce Developer Garage Seattle: Force.com Canvas

Exposing a Canvas App in a Visualforce Tab §  Extending the ability to add a Canvas App in a Visualforce Page, you can

also create a Visualforce Tab

Page 26: Salesforce Developer Garage Seattle: Force.com Canvas

Adding a Canvas App into a Record Detail Page §  By adding a Canvas App to a Visualforce Page, you can also embed

the app in a Record Detail page

§  This will allow you to visually deliver content directly on your records

Page 27: Salesforce Developer Garage Seattle: Force.com Canvas

Passing Parameters to your Canvas App §  Using the “parameters” element of apex:canvasApp alows you to pass

custom information to your Canvas App

§ This will allow you to dynamically render you app information

§ Ex – You can pass a Salesforce Record ID and display the appropriate related record from the 3rd Party App

<apex:page sidebar="false" showheader="false" standardController="Invoice_Statement__c"> <apex:canvasApp developerName="denv_warehouse" parameters="{'orderId':'{!Invoice_Statement__c.id}','name': '{!HTMLENCODE(Invoice_Statement__c.name)}'}" width="800px" height="380px" scrolling="false"/> </apex:page>

Page 28: Salesforce Developer Garage Seattle: Force.com Canvas

Dynamically Rendering Content §  By extracting the parameters from the signed request or context, you

can render specific data

§ Ex - Show record specific information inline

Page 29: Salesforce Developer Garage Seattle: Force.com Canvas

Force.com Canvas – Spring ’13 Enhancements

In today’s session we have: §  Walked through the new features of Force.com Canvas in Spring ‘13

•  Exposing a Canvas App on a Visualforce Page

•  Setting the specific Canvas Size

•  Dynamically rendering content based on custom parameters

§  Walked through some example in code on how to utilize the new features

Page 30: Salesforce Developer Garage Seattle: Force.com Canvas

Where to now? Force.com Canvas Resources can be found at

§  Force.com Canvas Developer Site - http://bit.ly/forcecanvas

§  Force.com Canvas Developer Guide - http://bit.ly/canvasdeveloperguide

§  Discussion Board - http://bit.ly/canvasdiscussionboards

§  Past Webinar

Heroku §  Heroku Developer Site - https://devcenter.heroku.com/

Contact Us: §  Email or tweet Jay – [email protected]/@extraidea

§  Tweet @forcedotcom with #forcewebinar

Page 31: Salesforce Developer Garage Seattle: Force.com Canvas

Thank You!