sao paolo workshop

97
@reidcarlberg @joshbirk bem vindos

Upload: joshua-birk

Post on 15-Jan-2015

883 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Sao Paolo Workshop

@reidcarlberg@joshbirk

bem vindos

Page 2: Sao Paolo Workshop

WIFI SSID: SSID

USERNAME: uname

PASSWORD: pword

Page 3: Sao Paolo Workshop

–adjective

1.acting one upon or with the other

2. Of or pertaining to a two-way system of electronic communications, as by means of television or computer.

Interactive

Page 4: Sao Paolo Workshop

@forcedotcom / #forcewebinar

Developer Force Group

facebook.com/forcedotcom

Page 5: Sao Paolo Workshop

Data ModelsDeclarative Logic

ApexVisualforce

HerokuSite.com

Chatter

REST API

Formula Fields

Mobile Interfaces OAuth

Spring MVC

git

Workflows

Triggers

Validation Rules

MVC Model

Governor Limits

Cloud Deployment

Controller SOQL

Binding Data

Page 6: Sao Paolo Workshop

http://developer.force.com/join

Page 7: Sao Paolo Workshop

Check Your Developer Edition Environment

http://developer.force.com/join

Page 8: Sao Paolo Workshop

Got your coffee? Let’s get started:

http://bit.ly/brazilweek

Page 9: Sao Paolo Workshop

Name, Title@twitter

Page 10: Sao Paolo Workshop

Safe HarborSafe 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 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, 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, 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-K for the most recent fiscal quarter ended July 31, 2011. This document and others 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 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 11: Sao Paolo Workshop

Customers, Partners, and Employees Are Demanding a New Generation of Apps. Now.

456 Million Tablets at Work

782 Million Smartphones at Work

2009 2010 2011 20122013(E) 2014(E)

2015(E) 2016(E)

Page 12: Sao Paolo Workshop

“80% of new commercial enterprise apps will be deployed on cloud platforms in 2012”

IDC Predictions 2012: Competing for 2020

Page 13: Sao Paolo Workshop

Chatter

Force.comHeroku Site.com

Database.com

Salesforce Touch Platform

App

Exc

hang

e

Sal

esf

orce

Ide

ntity

Your Apps Our Apps Any Apps

The Salesforce Platform

Page 14: Sao Paolo Workshop

800,000 developers

Page 15: Sao Paolo Workshop

9 Billion API calls last month

Page 16: Sao Paolo Workshop

2.5x increase in demand for Force.com developers

Page 17: Sao Paolo Workshop

You are the makers.

Page 18: Sao Paolo Workshop

App Fundamentals for the Enterprise

Mobile Social Identity Data Marketplace

Page 19: Sao Paolo Workshop

Data Modelling

Declarative Applications

Create relationships, requirements and validation rules

Apex, Visualforce and API’s automatically extended

Page 20: Sao Paolo Workshop

Native Geolocation

SELECT Id, Warehouse_Location__latitude__s, Warehouse_Location__longitude__s,Street_Address__c, Name FROM Vendor__c WHERE DISTANCE(Warehouse_Location__c, GEOLOCATION(37.794539,-122.394717), 'mi') <= 10;

Page 21: Sao Paolo Workshop

Business Logic

Workflows & Approvals

Apex & Visualforce

Enterprise API’s

Chatter

Page 22: Sao Paolo Workshop

Business Logic

Data model is API enabled

Create Custom API Services

Apex & Visualforce

Page 23: Sao Paolo Workshop

Go Mobile, Go Social

Mobile SDK for Android and iOS

Chatter Mobile and Chatter REST

Salesforce Identity & OAuth

Page 24: Sao Paolo Workshop

Go Mobile, Go Social

OAuth2 Authentication

Leverage Existing Force.com Skills

Secure Offline Storage

Xcode Project Wizard

Page 25: Sao Paolo Workshop

Extend and Market

Heroku

AppExchange

Page 26: Sao Paolo Workshop

Heroku

Simple Cloud Deployment

Easy Maintenance

Quick Scaling

Polyglot Framework

Page 27: Sao Paolo Workshop

Canvas

Canvas integrates Third Party applications with Salesforce UI

Identity enables access Salesforce data

Quickly Create EmbeddedHeroku Apps

Page 28: Sao Paolo Workshop

AppExchange

1,700+ Apps 20k+ Reviews 1.4m+ Installs

Page 29: Sao Paolo Workshop

The Salesforce Platform

InfrastructureServices

Network

Storage

Operating System

Database

App Server

Web Server

Data Center

Disaster Recovery

OperationsServices

Authentication

Availability

Monitoring

Patch Management

Upgrades

Backup

NOC

Troubleshooting

Your Innovative

AppApplicationServices

Security/Sharing

Integration

Customization

Web Services

Multi-Language

Workflow

Built-in ServicesTouch

Services

Native iOS SDK

Native Android SDK

HTML5

Xcode wizards

PIN code support

Custom APEX REST

Geo-location Mobile

APIs

SocialServices

Feeds

Profiles

Status updates

Groups

File sharing

Approvals

Messenger

Presence

PlatformServices

Globalization

APIs

Security

Analytics

Search

Identity

Page 30: Sao Paolo Workshop

Chatter

Force.comHeroku Site.com

Database.com

Salesforce Touch Platform

App

Exc

hang

e

Sal

esf

orce

Ide

ntity

Your Apps Our Apps Any Apps

The Salesforce Platform

Page 31: Sao Paolo Workshop

@ReidCarlberg

DATA MODELING

Page 32: Sao Paolo Workshop

Safe HarborSafe 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 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, 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, 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-K for the most recent fiscal quarter ended July 31, 2011. This document and others 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 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 33: Sao Paolo Workshop

Data Modeling

Declarative Applications

Create relationships, requirements and validation rules

Apex, Visualforce and API’s automatically extended

Page 34: Sao Paolo Workshop

Spreadsheet Versus ApplicationRelational DataValidated dataProcess driven workflowsApproval SystemField AuditingUsers, Profiles and PermissionsEnterprise Collaboration

OR

With the same amount of programming…

Page 35: Sao Paolo Workshop

Let’s Build an App!

Page 36: Sao Paolo Workshop

Warehouse Application Requirements

• Track price and inventory on hand for all merchandise

• Create invoices containing one or more merchandise items as a line items

• Present total invoice amount and current shipping status

Page 37: Sao Paolo Workshop

Warehouse Application Requirements

• Track price and inventory on hand for all merchandise

• Create invoices containing one or more merchandise items as a line items

• Present total invoice amount and current shipping status

Page 38: Sao Paolo Workshop

Warehouse Application Requirements

• Track price and inventory on hand for all merchandise

• Create invoices containing one or more merchandise items as a line items

• Present total invoice amount and current shipping status

Page 39: Sao Paolo Workshop

Warehouse Data Model

Merchandise

Name Price Inventory

Pinot $20 15

Cabernet $30 10

Malbec $20 20

Zinfandel $10 50

Invoice

Number Status Count Total

INV-01 Shipped 16 $370

INV-02 New 20 $200

Invoice Line Items

Invoice Line Merchandise Units Sold

Unit Price

Value

INV-01 1 Pinot 1 15 $20

INV-01 2 Cabernet 5 10 $150

INV-01 3 Malbec 10 20 $200

INV-02 1 Pinot 20 50 $200

Page 40: Sao Paolo Workshop

TUTORIALS 1 & 2

Page 41: Sao Paolo Workshop

Name, Title@twitter

BUSINESS LOGIC COLLABORATION

Page 42: Sao Paolo Workshop

Safe HarborSafe 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 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, 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, 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-K for the most recent fiscal quarter ended July 31, 2011. This document and others 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 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 43: Sao Paolo Workshop

Spreadsheet Versus Application

Page 44: Sao Paolo Workshop

Business Logic

Workflows & Approvals

Apex & Visualforce

Enterprise API’s

Chatter

Page 45: Sao Paolo Workshop

Validation Rules

Workflows Approvals

Declarative Programming

Formula Fields

Page 46: Sao Paolo Workshop

Formula Fields• ‘Pre-packaged’ operations for performing common logic

• Support for commons functions– Math– Text– Date & Time – Logical

• Can chain functions togetherAND ( OR (

ISPICKVAL(StageName, "Closed Won"),

ISPICKVAL(StageName, "Negotiation/Review")),

ISBLANK(Delivery_Date__c) )

Page 47: Sao Paolo Workshop

If Then Error

Implied on record save.

Formula evals true (error) or false (save)

Return error message (UI or API)

Validation Rules

Page 48: Sao Paolo Workshop

When

Why

What

Workflows

Page 49: Sao Paolo Workshop

TaskOutbound Message

Update Field

Email

Workflows

Page 50: Sao Paolo Workshop

ApprovalsSingle/Multi/Skip step processes

Route based on roles, or queues

Automation of manual processes

Approval via emails

Page 51: Sao Paolo Workshop

Track Approval History

Define Actions

Approvals

Page 52: Sao Paolo Workshop

Business Logic

Workflows & Approvals

Apex & Visualforce

Enterprise API’s

Chatter

Page 53: Sao Paolo Workshop

CHATTER DEMO

Page 54: Sao Paolo Workshop

Privacy and SecurityHome Tab / Profile Page Record Detail Page

Every internal user can see what you post

Only users with “Read” access to the record can see what

you post

Page 55: Sao Paolo Workshop

Chatter Components

chatter:follow

chatter:newsfeed

chatter:feed

chatter:followers

chatter:feedAndFollowers

Page 56: Sao Paolo Workshop

Chatter Triggers

if(feed_text == ‘promote’) {rec.status__c = “Approved”

addToEmailPromotion(rec); FeedItem post = new FeedItem(); post.ParentId = rec.Id; post.Body = ‘Record added to promotion’;

feedsToInsert.addITem(post);}

Page 57: Sao Paolo Workshop

TUTORIALS 3 & 4

Page 58: Sao Paolo Workshop

Joshua Birk, Developer Evangelist@joshbirk

APEX + VISUALFORCE

Page 59: Sao Paolo Workshop

Safe HarborSafe 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 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, 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, 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-K for the most recent fiscal quarter ended July 31, 2011. This document and others 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 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 60: Sao Paolo Workshop

Business Logic

Workflows & Approvals

Apex & Visualforce

Enterprise API’s

Chatter

Page 61: Sao Paolo Workshop
Page 62: Sao Paolo Workshop

Model View Controller (MVC) Pattern

Model Controller

View

Page 63: Sao Paolo Workshop

Your Data Your Logic

Your Interface

Model View Controller (MVC) Pattern

Page 64: Sao Paolo Workshop

Custom Objects Apex

Visualforce

Model View Controller (MVC) Pattern

Page 65: Sao Paolo Workshop

Apexcloud-based programmatic language with direct access to Force.com data

Page 66: Sao Paolo Workshop

public with sharing class myControllerExtension {

private final Account acct; public Contact newContact {get; set;} public myControllerExtension(ApexPages.StandardController stdController) { this.acct = (Account)stdController.getRecord(); }

public PageReference associateNewContact(Id cid) { newContact = [SELECT Id, Account from Contact WHERE Id =: cid LIMIT 1];

newContact.Account = acct; update newContact; }}

Apex Class AnatomyClass and Interface based

Scoped Variables

Inline SOQL

Inline DML

Page 67: Sao Paolo Workshop

What can you do with Apex?

Controllers Inbound/OutboundEmail Services

Custom API andHTTP Callouts

Database Triggers Scheduled and Batched Tasks

Page 68: Sao Paolo Workshop

The Developer Console

Page 69: Sao Paolo Workshop

VisualforceA component based framework for building user interfaces with web standards like HTML, CSS and JavaScript

Page 70: Sao Paolo Workshop

<apex:page controller=“Contact” extension=“duplicateUtilty” action=“checkPhone”>

<apex:form>

<apex:outputField var=“{!Contact.FirstName}” ><apex:outputField var=“{!Contact.LastName}” />

<apex:inputField var=“{!Contact.Phone}” /><apex:commandButton value=“Update” action=“{!quicksave}” />

<apex:form>

</apex>

Visualforce Page AnatomyStandard ControllersCustom ControllersCustom Extensions

Data bound components

Controller Callbacks

Page 71: Sao Paolo Workshop

@RemoteAction public static String updateMerchandiseItem(String productId, Integer newInventory) { List<Merchandise__c> m = [SELECT Id, Name, Price__c, Total_Inventory__c, Description__c from Merchandise__c WHERE Id =: productId LIMIT 1]; if(m.size() > 0) { m[0].Total_Inventory__c = newInventory; try { update m[0]; return 'Item Updated'; } catch (Exception e) { return e.getMessage(); } } else { return 'No item found with that ID'; } } }

JavaScript RemotingAccess Apex from JavaScript

Asynchronous Responses

j$(".updateBtn").click(function() { var id = j$(this).attr('data-id'); var inventory = parseInt(j$("#inventory"+id).val()); j$.mobile.showPageLoadingMsg(); MobileInventoryExtension.updateMerchandiseItem(id,inventory,handleUpdate); });

Apex

Visualforce

Page 72: Sao Paolo Workshop

What can you do with Visualforce?

Email Templates Generate PDFsEmbed in Page Layouts

Mobile Interfaces Web Sites

Page 73: Sao Paolo Workshop

TUTORIAL #9

Page 74: Sao Paolo Workshop

Salesforce Mobile

Mobile HTML Application

Mobile SDK Development

No additional development, admin configured and controlled

Web development skills required, easily made for multiple devices and screens

Offers access to device functionality and can create the most fast performing applications

Page 75: Sao Paolo Workshop

Mobile HTML Application

Mobile SDK Development

Web development skills required, easily made for multiple devices and screens

Offers access to device functionality and can create the most fast performing applications

Salesforce MobileNo additional development, admin configured and controlled

Page 76: Sao Paolo Workshop

MOBILE VF DEMO

Page 77: Sao Paolo Workshop

Joshua Birk, Developer Evangelist@joshbirk

INTEGRATION + HEROKU

Page 78: Sao Paolo Workshop

Safe HarborSafe 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 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, 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, 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-K for the most recent fiscal quarter ended July 31, 2011. This document and others 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 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 79: Sao Paolo Workshop

Business Logic

Workflows & Approvals

Apex & Visualforce

Enterprise API’s

Chatter

Page 80: Sao Paolo Workshop

REST API

curl https://na1.salesforce.com/services/data/v20.0/query/?q=SELECT+name+from+Account -H "Authorization: OAuth token" -H "X-PrettyPrint:1"

{ "done" : true, "totalSize" : 14, "records" : [ { "attributes" : { "type" : "Account", "url" : "/services/data/v20.0/sobjects/Account/001D000000IRFmaIAH" }, "Name" : "Test 1" }, { "attributes" : { "type" : "Account", "url" : "/services/data/v20.0/sobjects/Account/001D000000IomazIAB" }, "Name" : "Test 2" },

...

]}

Page 81: Sao Paolo Workshop

OAuth

Page 82: Sao Paolo Workshop

OAuth2 Flow

RemoteApplication

SalesforcePlatform

Sends App Credentials

User logs in,Token sent to callback

Confirms token

Send access token

Maintain session withrefresh token

Page 83: Sao Paolo Workshop

Bulk APIAsynchronous API for handling large amounts of XML based data

Page 84: Sao Paolo Workshop

Extract Transform Load (ETL)A type of toolset which allows for the easy migration and manipulation of data between different systems

Page 85: Sao Paolo Workshop

Streaming APIA Bayeux implementation to provide real-time data updates to clients

Page 86: Sao Paolo Workshop

Extend and Market

Heroku

AppExchange

Page 87: Sao Paolo Workshop
Page 88: Sao Paolo Workshop

Polyglot frameworkPaaS architecture which allows for multiple language to be deployed

Page 89: Sao Paolo Workshop
Page 90: Sao Paolo Workshop

$ git push heroku masterCounting objects: 67, done.Delta compression using up to 4 threads.Compressing objects: 100% (53/53), done.Writing objects: 100% (67/67), 26.33 KiB, done.Total 67 (delta 5), reused 0 (delta 0)

Github Repo Heroku

Local Repo

Pull / PushDevelopment Changes

Push DeploymentsMonitor Application

Page 91: Sao Paolo Workshop

HEROKU DEMO

Page 92: Sao Paolo Workshop

Double-click to enter title

Double-click to enter text

The Wrap Up

Page 93: Sao Paolo Workshop

http://bit.ly/brasildevweeksp

Page 94: Sao Paolo Workshop

Double-click to enter title

Double-click to enter text

@forcedotcom@joshbirk

@reidcarlberg@larimaryprairie

#askforce

Page 95: Sao Paolo Workshop

Double-click to enter title

Double-click to enter text

http://www.meetup.com/Sao-Paulo-Salesforce-Developer-User-

Group/

Page 96: Sao Paolo Workshop

Double-click to enter title

Double-click to enter text

http://developer.force.comhttp://youtube.com

http://appexchange.com

Page 97: Sao Paolo Workshop

simplicityis the ultimate form ofsophistication

Da Vinci