Beginner Developer Workshop
Nick Drost
Solution Architect
ndrost@salesforce.com
Sid Bansal
Solution Architect
sbansal@salesforce.com
welcome
Internet Username / Password
SF13 / SF13
http://bit.ly/workbook_2013
Interactive
Questions? Current projects? Feedback?
http://developer.force.com/join
Check Your Developer Edition
Environment
http://developer.force.com/join
Online Workbook
http://bit.ly/workbook_2013
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 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.
Steve Sasson
Engineered the first digital camera prototype
Eastman Kodak
Filed for bankruptcy in 2012
Steve Sasson
Worked for Eastman Kodak in 1975
We are witnessing the Post PC Revolution
456 Million
Tablets at Work
782 Million
Smartphones at Work
2009 2010 2011 2012
2013(E) 2014(E)
2015(E) 2016(E)
“By 2015, one of every seven dollars spent on
packaged software, server, and storage offerings
will be through the public cloud model.”
http://www.idc.com/prodserv/idc_cloud.jsp
Salesforce Platform
Cloud based, multi-tenant, enterprise class PaaS
1,000,000
Salesforce Platform Developers
9 Billion
API calls last month
2.5x
Increased demand for Force.com developers
YOU
are the makers
Use Case: Mobile Development
Cloud-Based Data
Authentication Services
REST API
Native + HTML5 Support
Reports + Analytics
Secure Offline Storage
The Salesforce Platform
Infrastructure
Services
Network
Storage
Operating System
Database
App Server
Web Server
Data Center
Disaster Recovery
Operations
Services
Authentication
Availability
Monitoring
Patch Management
Upgrades
Backup
NOC
Troubleshooting
Your
Innovative
App
Application
Services
Security/Sharing
Integration
Customization
Web Services
Multi-Language
Workflow
Built-in Services
Touch
Services
Native iOS SDK
Native Android SDK
HTML5
Xcode wizards
PIN code support
Custom APEX REST
Geo-location Mobile
APIs
Social
Services
Feeds
Profiles
Status updates
Groups
File sharing
Approvals
Messenger
Presence
Platform
Services
Globalization
APIs
Security
Analytics
Search
Identity
Mobile Social Identity Data Marketplace
The Salesforce Platform
Now it’s your turn
Building a cloud based application
Data Modeling
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 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.
Spreadsheet Versus Application
Relational Data
Validated data
Process driven workflows
Approval System
Field Auditing
Users, Profiles and Permissions
Enterprise Collaboration
OR
With the same amount of programming…
Let’s Build an App
Validation Rules
Formulas which block data entry if evaluated as true
WHEN THENIF
Record is
being
inserted or
updated
Formula
evaluates to
true
Return error
message
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
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
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
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
Chatter
Social framework for the enterprise
Tutorial 100
Optional: Tutorial 110
DECLARATIVE LOGIC
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 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.
Declarative Apps
Creating business applications with clicks not code
Spreadsheet Versus Application
Formula Fields
Operations for performing common logic
Excel style formulas
Support for commons functions
Math
Text
Date & Time
Logical
Can chain functions together:
AND ( OR (
ISPICKVAL(StageName, "Closed Won"),
ISPICKVAL(StageName, "Negotiation/Review")),
ISBLANK(Delivery_Date__c) )
Roll-Up Fields
Field type calculating on rows of child data
Child of Master-Detail
Count or Aggregate
Workflows
Event based business logic
When this happens
Meets this Criteria?
Perform These Actions
Task
Outbound
Message
Update
Field
Email
Approvals
System to route approvals through an organization
Track Approval History
Define Criteria
Define Actions
Single/Multi/Skip step processes
Route based on roles, or queues
Approval via emails or Chatter
Security
Identity, data security and user services
User Profiles
Groups, Queues and Hierarchies
Permission Sets
SSO, SAML, OAuth 2.0
Connected Apps
TUTORIAL 120
OPTIONAL: TUTORIAL 150
LUNCH:
Downstairs
APEX
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 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.
Apex
Cloud based programming language
public with sharing class myControllerExtension implements Util {
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;
}
}
Class and Interface based
Scoped Variables
Inline SOQL
Inline DML




Apex Anatomy
DEVELOPER CONSOLE DEMO
Controllers Inbound/Outbound
Email Services
Custom API and
HTTP Callouts
TriggersScheduled and Batched Tasks
Common Use Cases
trigger MerchandiseTrigger on Merchandise__c (before
insert, before update) {
Merchandise__c[] merch = Trigger.new;
if(Trigger.isInsert) {
MerchandiseUtil.checkMerchandise(merch);
}
}
Object Definition
Event Definition
Trigger.old and new
Bulkify code




Trigger Anatomy
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);
}
CHATTER TRIGGER DEMO
@isTest
static public void testRequiredFields() {
Merchandise__c m = new Merchandise__c(Name = 'Test');
//assertion: Merchandise requires Price and Quantity
try {
insert m;
} catch (DMLException e) {
System.assert(e.getMessage().length() > 0);
}
m.Quantity__c = 0;
m.Price__c = 9.99;
//assertion: Merchandise requires Price and Quantity
try {
Unit Testing
public WarehouseCSVController() {
Boolean beRandom =
ApexPages.currentPage().getParameters().get('random') != null;
if(beRandom) {
allMerchandise = new List<Merchandise__c>();
for(Integer x = 0; x < 1500; x++) {
Merchandise__c m = new
Merchandise__c(Name='Widget '+String.valueOf(x),
Quantity__c=100, Price__c=49.99);
allMerchandise.add(m);
}
} else {
allMerchandise =
WarehouseDataQuery.getAllMerchandise();
}
Unit Testing
TUTORIAL 300
Code Custom App Logic
http://bit.ly/workbook_2013
VISUALFORCE
Model View Controller
Application design paradigm to divide data, logic and UI
Visualforce
Cloud based component framework for interfaces
Standard Controllers
Custom Controllers
Custom Extensions
Data bound components
Controller Callbacks



Visualforce Anatomy
<apex:page StandardController="Contact"
extensions="duplicateUtility"
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:page>
STANDARD CONTROLLER DEMO
@RemoteAction
public static String updateMerchandiseItem(String productId, Integer newInventory) {
List<Merchandise__c> m = [SELECT Id, Total_Inventory__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 Remoting Access 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
<apex:component controller="WarehouseAccountsController">
<apex:attribute name="lat" type="Decimal" description="Latitude for
geolocation query" assignTo="{!lat}”
/>
<apex:attribute name="long" type="Decimal" description="Longitude for
geolocation query" assignTo="{!lng}”
/>
<c:GeoComponent lat=”8.9991" long=”10.00119" />
Custom Components
<apex:page >
<apex:insert name="detail" />
<div style="position:relative; clear:all;">
<apex:insert name="footer" />
</div>
</apex:page>
<apex:page StandardController="Invoice__c" >
<apex:composition template="WarehouseTemplate">
<apex:define name="detail">
<apex:detail subject="{!Invoice__c.Id}" />
</apex:define>
Page Templates
chatter:follow
chatter:newsfeed
chatter:feed
chatter:followers
chatter:feedAndFollowers
Chatter Components
Email Templates Generate PDFsEmbed in Page Layouts
Mobile Interfaces Page Overrides
Common Use Cases
TUTORIAL 330
Create a Visualforce Mobile App
http://bit.ly/workbook_2013
MOBILE VF DEMO
INTEGRATION
INTEGRATION
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 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.
OAuth
Industry standard method of user authentication
Remote
Application
Salesforce
Platform
Sends App Credentials
User logs in,
Token sent to callback
Confirms token
Send access token
Maintain session with
refresh token
OAuth2 Flow
WORKBENCH LOGIN DEMO
REST API
API leveraging industry standard HTTP
Mobile
Application
Salesforce
Platform
login.salesforce.com
REST API
1. Authenticate
/services/data/query?
SELECT ID FROM ACCOUNT
2. Access API
{“sObject”: “Account”,
“id” : “oax02fdr756aFdad”}
3. Get JSON or XML
WORKBENCH REST DEMO
SOAP API
XML messaging and WSDL based API
Java Web
Server
Salesforce
Platform
login.salesforce.com
SOAP API
1. Authenticate
<QUERY><SOQL>
SELECT Id from Account
</SOQL></QUERY>
2. Access API
<RECORDS>
<RECORD type=“Account”>
<id>oax02fdr756aFdad</id>
</RECORD>
</RECORDS>
3. Get XML
Bulk API
Asynchronous API for handling large datasets
ETL
Tool
Salesforce
Platform
BULK API
2. Push Updates
TITLE: AppCo
STREET: 1 Market Street
REF:0001
1. Pull Recent Records
Legacy
Database
NAME: AppCo
MailingStreet: 1 Market Street
ExternalID:0001
Streaming API
Bayeux implementation for real-time delivery of data
Java
Web Server
Salesforce
Platform
STREAMING API
1. Handshake
2. Subscribe to Topic
3. Get Updates
WORKBENCH PUSHTOPICS
DEMO
TUTORIAL 370
INTEGRATE SYSTEMS
http://bit.ly/workbook_2013
Fundamentals for the Enterprise
Mobile Social Identity Data Marketplace
Mobile SDK
iOS and Android SDK for developing with Force.com
Mobile SDK: Accelerate App Development
API Wrappers
Interact with Salesforce REST APIs with
popular mobile platform languages
Secure Offline Storage
Store business data on a device with enterprise-
class encryption
Push Notifications
Dispatch real-time alerts directly to mobile
devices
Tools for building native, hybrid, and HTML5 apps on iOS and Android
OAuth2
Secure authentication and refresh token
management
App Container
Embed HTML5 apps inside a container to
access powerful native device functionality
http://developer.force.com/mobilesdk
Canvas
Framework for using third party apps within Salesforce
Any Language, Any Platform
• Only has to be accessible from the user’s browser
• Authentication via OAuth or Signed Response
• JavaScript based SDK can be associated with any language
• Within Canvas, the App can make API calls as the current user
• apex:CanvasApp allows embedding via Visualforce
Canvas Anatomy
Polyglot Framework
PaaS allowing for the deployment of multiple languages
$ git push heroku master
Counting 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 / Push
Development Changes
Push Deployments
Monitor Application
HEROKU DEMO
AppExchange
Application Market for the Salesforce Platform
1,700+ Apps 20k+ Reviews 1.4m+ Installs
http://appexchange.com
Double-click to enter title
Double-click to enter text
The Wrap Up
WIN a JamBox!
Complete the Detroit ELEVATE Survey
 Please look at your inboxes/spam folder for the
Detroit ELEVATE survey email with subject line:
“WIN a JamBox! Complete the Salesforce Developer ELEVATE Detroit Workshop
Survey”
 Please take a moment to fill out the survey. Your
feedback is valuable to us!
 Find the resources to continue the next step of your
journey
 If you cannot find the survey, please email to
kpatel@salesforce.com
check inbox
http://bit.ly/[SURVEY LINK]
Double-click to enter title
Double-click to enter text
@forcedotcom
#forcedotcom
#askforce
Double-click to enter title
Double-click to enter text
Join A
Developer User Group
http://bit.ly/fdc-dugs
Double-click to enter title
Double-click to enter text
Become A
Developer User Group Leader
Email:
April Nassi
<anassi@salesforce.com>
Double-click to enter title
Double-click to enter texthttp://developer.force.com
simplicity
is the ultimate
form of
sophistication
Da Vinci
THANK YOU

Detroit ELEVATE Track 1

  • 1.
    Beginner Developer Workshop NickDrost Solution Architect ndrost@salesforce.com Sid Bansal Solution Architect sbansal@salesforce.com
  • 2.
  • 3.
    Internet Username /Password SF13 / SF13 http://bit.ly/workbook_2013
  • 4.
  • 5.
  • 6.
    Check Your DeveloperEdition Environment http://developer.force.com/join
  • 7.
  • 9.
    Safe Harbor Safe harborstatement 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.
  • 10.
    Steve Sasson Engineered thefirst digital camera prototype
  • 11.
    Eastman Kodak Filed forbankruptcy in 2012
  • 12.
    Steve Sasson Worked forEastman Kodak in 1975
  • 13.
    We are witnessingthe Post PC Revolution 456 Million Tablets at Work 782 Million Smartphones at Work 2009 2010 2011 2012 2013(E) 2014(E) 2015(E) 2016(E)
  • 14.
    “By 2015, oneof every seven dollars spent on packaged software, server, and storage offerings will be through the public cloud model.” http://www.idc.com/prodserv/idc_cloud.jsp
  • 15.
    Salesforce Platform Cloud based,multi-tenant, enterprise class PaaS
  • 16.
  • 17.
  • 18.
    2.5x Increased demand forForce.com developers
  • 19.
  • 20.
    Use Case: MobileDevelopment Cloud-Based Data Authentication Services REST API Native + HTML5 Support Reports + Analytics Secure Offline Storage
  • 21.
    The Salesforce Platform Infrastructure Services Network Storage OperatingSystem Database App Server Web Server Data Center Disaster Recovery Operations Services Authentication Availability Monitoring Patch Management Upgrades Backup NOC Troubleshooting Your Innovative App Application Services Security/Sharing Integration Customization Web Services Multi-Language Workflow Built-in Services Touch Services Native iOS SDK Native Android SDK HTML5 Xcode wizards PIN code support Custom APEX REST Geo-location Mobile APIs Social Services Feeds Profiles Status updates Groups File sharing Approvals Messenger Presence Platform Services Globalization APIs Security Analytics Search Identity
  • 22.
    Mobile Social IdentityData Marketplace The Salesforce Platform
  • 23.
    Now it’s yourturn Building a cloud based application
  • 24.
  • 25.
    Safe Harbor Safe harborstatement 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.
  • 26.
    Spreadsheet Versus Application RelationalData Validated data Process driven workflows Approval System Field Auditing Users, Profiles and Permissions Enterprise Collaboration OR With the same amount of programming…
  • 27.
  • 28.
    Validation Rules Formulas whichblock data entry if evaluated as true
  • 29.
    WHEN THENIF Record is being insertedor updated Formula evaluates to true Return error message
  • 30.
    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
  • 31.
    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
  • 32.
    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
  • 33.
    Warehouse Data Model Merchandise NamePrice 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
  • 34.
  • 35.
  • 36.
  • 37.
    Safe Harbor Safe harborstatement 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.
  • 38.
    Declarative Apps Creating businessapplications with clicks not code
  • 39.
  • 40.
    Formula Fields Operations forperforming common logic
  • 41.
    Excel style formulas Supportfor commons functions Math Text Date & Time Logical Can chain functions together: AND ( OR ( ISPICKVAL(StageName, "Closed Won"), ISPICKVAL(StageName, "Negotiation/Review")), ISBLANK(Delivery_Date__c) )
  • 42.
    Roll-Up Fields Field typecalculating on rows of child data
  • 43.
  • 44.
  • 45.
    When this happens Meetsthis Criteria? Perform These Actions
  • 46.
  • 47.
    Approvals System to routeapprovals through an organization
  • 48.
    Track Approval History DefineCriteria Define Actions
  • 49.
    Single/Multi/Skip step processes Routebased on roles, or queues Approval via emails or Chatter
  • 50.
  • 51.
    User Profiles Groups, Queuesand Hierarchies Permission Sets SSO, SAML, OAuth 2.0 Connected Apps
  • 52.
  • 53.
  • 54.
  • 55.
    Safe Harbor Safe harborstatement 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.
  • 56.
  • 57.
    public with sharingclass myControllerExtension implements Util { 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; } } Class and Interface based Scoped Variables Inline SOQL Inline DML     Apex Anatomy
  • 58.
  • 59.
    Controllers Inbound/Outbound Email Services CustomAPI and HTTP Callouts TriggersScheduled and Batched Tasks Common Use Cases
  • 60.
    trigger MerchandiseTrigger onMerchandise__c (before insert, before update) { Merchandise__c[] merch = Trigger.new; if(Trigger.isInsert) { MerchandiseUtil.checkMerchandise(merch); } } Object Definition Event Definition Trigger.old and new Bulkify code     Trigger Anatomy
  • 61.
    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); }
  • 62.
  • 63.
    @isTest static public voidtestRequiredFields() { Merchandise__c m = new Merchandise__c(Name = 'Test'); //assertion: Merchandise requires Price and Quantity try { insert m; } catch (DMLException e) { System.assert(e.getMessage().length() > 0); } m.Quantity__c = 0; m.Price__c = 9.99; //assertion: Merchandise requires Price and Quantity try { Unit Testing
  • 64.
    public WarehouseCSVController() { BooleanbeRandom = ApexPages.currentPage().getParameters().get('random') != null; if(beRandom) { allMerchandise = new List<Merchandise__c>(); for(Integer x = 0; x < 1500; x++) { Merchandise__c m = new Merchandise__c(Name='Widget '+String.valueOf(x), Quantity__c=100, Price__c=49.99); allMerchandise.add(m); } } else { allMerchandise = WarehouseDataQuery.getAllMerchandise(); } Unit Testing
  • 65.
    TUTORIAL 300 Code CustomApp Logic http://bit.ly/workbook_2013
  • 66.
  • 67.
    Model View Controller Applicationdesign paradigm to divide data, logic and UI
  • 68.
    Visualforce Cloud based componentframework for interfaces
  • 69.
    Standard Controllers Custom Controllers CustomExtensions Data bound components Controller Callbacks    Visualforce Anatomy <apex:page StandardController="Contact" extensions="duplicateUtility" 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:page>
  • 70.
  • 71.
    @RemoteAction public static StringupdateMerchandiseItem(String productId, Integer newInventory) { List<Merchandise__c> m = [SELECT Id, Total_Inventory__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 Remoting Access 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
  • 72.
    <apex:component controller="WarehouseAccountsController"> <apex:attribute name="lat"type="Decimal" description="Latitude for geolocation query" assignTo="{!lat}” /> <apex:attribute name="long" type="Decimal" description="Longitude for geolocation query" assignTo="{!lng}” /> <c:GeoComponent lat=”8.9991" long=”10.00119" /> Custom Components
  • 73.
    <apex:page > <apex:insert name="detail"/> <div style="position:relative; clear:all;"> <apex:insert name="footer" /> </div> </apex:page> <apex:page StandardController="Invoice__c" > <apex:composition template="WarehouseTemplate"> <apex:define name="detail"> <apex:detail subject="{!Invoice__c.Id}" /> </apex:define> Page Templates
  • 74.
  • 75.
    Email Templates GeneratePDFsEmbed in Page Layouts Mobile Interfaces Page Overrides Common Use Cases
  • 76.
    TUTORIAL 330 Create aVisualforce Mobile App http://bit.ly/workbook_2013
  • 77.
  • 78.
  • 79.
  • 80.
    Safe Harbor Safe harborstatement 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.
  • 81.
    OAuth Industry standard methodof user authentication
  • 82.
    Remote Application Salesforce Platform Sends App Credentials Userlogs in, Token sent to callback Confirms token Send access token Maintain session with refresh token OAuth2 Flow
  • 83.
  • 84.
    REST API API leveragingindustry standard HTTP
  • 85.
    Mobile Application Salesforce Platform login.salesforce.com REST API 1. Authenticate /services/data/query? SELECTID FROM ACCOUNT 2. Access API {“sObject”: “Account”, “id” : “oax02fdr756aFdad”} 3. Get JSON or XML
  • 86.
  • 87.
    SOAP API XML messagingand WSDL based API
  • 88.
    Java Web Server Salesforce Platform login.salesforce.com SOAP API 1.Authenticate <QUERY><SOQL> SELECT Id from Account </SOQL></QUERY> 2. Access API <RECORDS> <RECORD type=“Account”> <id>oax02fdr756aFdad</id> </RECORD> </RECORDS> 3. Get XML
  • 89.
    Bulk API Asynchronous APIfor handling large datasets
  • 90.
    ETL Tool Salesforce Platform BULK API 2. PushUpdates TITLE: AppCo STREET: 1 Market Street REF:0001 1. Pull Recent Records Legacy Database NAME: AppCo MailingStreet: 1 Market Street ExternalID:0001
  • 91.
    Streaming API Bayeux implementationfor real-time delivery of data
  • 92.
    Java Web Server Salesforce Platform STREAMING API 1.Handshake 2. Subscribe to Topic 3. Get Updates
  • 93.
  • 94.
  • 96.
    Fundamentals for theEnterprise Mobile Social Identity Data Marketplace
  • 97.
    Mobile SDK iOS andAndroid SDK for developing with Force.com
  • 98.
    Mobile SDK: AccelerateApp Development API Wrappers Interact with Salesforce REST APIs with popular mobile platform languages Secure Offline Storage Store business data on a device with enterprise- class encryption Push Notifications Dispatch real-time alerts directly to mobile devices Tools for building native, hybrid, and HTML5 apps on iOS and Android OAuth2 Secure authentication and refresh token management App Container Embed HTML5 apps inside a container to access powerful native device functionality http://developer.force.com/mobilesdk
  • 99.
    Canvas Framework for usingthird party apps within Salesforce
  • 101.
    Any Language, AnyPlatform • Only has to be accessible from the user’s browser • Authentication via OAuth or Signed Response • JavaScript based SDK can be associated with any language • Within Canvas, the App can make API calls as the current user • apex:CanvasApp allows embedding via Visualforce Canvas Anatomy
  • 103.
    Polyglot Framework PaaS allowingfor the deployment of multiple languages
  • 105.
    $ git pushheroku master Counting 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 / Push Development Changes Push Deployments Monitor Application
  • 106.
  • 107.
    AppExchange Application Market forthe Salesforce Platform
  • 108.
    1,700+ Apps 20k+Reviews 1.4m+ Installs http://appexchange.com
  • 109.
    Double-click to entertitle Double-click to enter text The Wrap Up
  • 110.
    WIN a JamBox! Completethe Detroit ELEVATE Survey  Please look at your inboxes/spam folder for the Detroit ELEVATE survey email with subject line: “WIN a JamBox! Complete the Salesforce Developer ELEVATE Detroit Workshop Survey”  Please take a moment to fill out the survey. Your feedback is valuable to us!  Find the resources to continue the next step of your journey  If you cannot find the survey, please email to kpatel@salesforce.com
  • 111.
  • 112.
    Double-click to entertitle Double-click to enter text @forcedotcom #forcedotcom #askforce
  • 113.
    Double-click to entertitle Double-click to enter text Join A Developer User Group http://bit.ly/fdc-dugs
  • 114.
    Double-click to entertitle Double-click to enter text Become A Developer User Group Leader Email: April Nassi <anassi@salesforce.com>
  • 115.
    Double-click to entertitle Double-click to enter texthttp://developer.force.com
  • 116.
    simplicity is the ultimate formof sophistication Da Vinci
  • 117.

Editor's Notes

  • #2 This is the deck for the Private Salesforce Developer Workshops as well as the Beginner’s Track of the ELEVATE program.For the private workshops, use the blue platform bumper slides. For ELEVATE, use the darker ELEVATE ones. The font included in the zip is for the ELEVATE slides.The speaker notes are provided as a guide, not necessarily specific speeches. These notes will not insist on demos, presenters should prep their presentations with the demos they are comfortable with.The recommended agenda can be found here: https://docs.google.com/a/salesforce.com/spreadsheet/ccc?key=0Akr6pvkAv8X5dGFEN2ZWNUxWbS1SVFBoRS1oZU5kQWc#gid=6Errors, comments, suggestions in either the deck or the workbook can be mentioned on Josh Birk’s Chatter feed, or written up in Google Docs and shared with Josh Birk and Mario Korf.
  • #4 Good time to introduce yourself
  • #5 Change this slide to match the local internet requirements.The bit.ly link points to the latest HTML draft of the new workbook. This is different than the official workbook on developer.force.com and there are schema differences, so attendees cannot mix and match.
  • #6 Highlight that this is not just a day of talking to them, this is a dialogue and they should ask questions as they like – even ones that don’t pertain to the current “section”. Projects they’re working on, features they have heard about, etc.
  • #7 Walk them through signing up for a new DE org. Insist they should get a new one, they should not be using a company sandbox, etc.
  • #8 Show them in a developer org that you can compile new Apex. If they don’t see that new button, they are definitely not
  • #9 Highlight that this is still a draft of a new workbook, and not to use the official on on DFC.
  • #10 Now we are going to give a quick intro into our platform itself.
  • #11 Safe Harbor
  • #12 Highlight the differences in technology between that massive box Steve is holding and the digital cameras in our phones today.Some background on this:On November 17, 2009, U.S. President Barack Obama awarded Sasson the National Medal of Technology and Innovation at a ceremony in the East Room of the White House.[3] This is the highest honor awarded by the US government to scientists, engineers, and inventors.[4] On 6 September 2012 The Royal Photographic Society awarded Sasson its Progress medal and Honorary Fellowship in recognition of any invention, research, publication or other contribution which has resulted in an important advance in the scientific or technological development of photography or imaging in the widest sense
  • #13 Eastman Kodak was effectively synonymous with photography, and yet they filed bankruptcy in 2012. The rise of digital photography is often cited as the main reason, as the core of Kodak’s business was in paper and chemical processing. Highlight this as an example of disruptive technology.
  • #14 The connection? Back in ‘54, Sasson was an Eastman employee. This is a classic example of disruptive technology – changes to business which can occur as technology evolves that can lead to unexpected results. If Kodak can be caught off guard by disruptions in photography, anyone can be caught by surprise by disruptive technology.
  • #15 Disruptive changes require fast and agile development – we are now seeing the business results of being in a Post-PC world, as Steve Jobs called it. Our users, your users, your employees, your potential customers – they are all becoming more mobile, more social – they are more engaged with each other, with business process and with corporate branding than ever before. How are companies keeping ahead of this?
  • #16 Enterprises are responding to this demand by going to the cloud.
  • #17 This is whySalesforce offers the Salesforce Platform. Now, we are known as a CRM company – as a SaaS company. But we are also one of the oldest Platform as a Service company as well. The same infrastructure we use to create a multi-tenant, cloud-based solution for CRM can be used to create innovative new
  • #18 We are strong, vibrant and large developer community. We are in small companies and large companies. We are in cities from San Francisco to Bangalore.
  • #19 If you are still thinking about us as a CRM company, think about the number of API calls we handle. And remember, we continue to handle a greater number of transactions while offering a platform that is as fast or sometimes even faster than it was before. That’s one of the great things about developing on our platform, you don’t need to worry about these infrastructure upgrades and all of the optimizations our engineers have put into the system.
  • #20 Not only are we seeing our community grow, our platform grow – but demand for both is increasing as well. Recruiters are looking to fill positions in companies from small to large enterprise, and a wide range of experience level as well.
  • #21 But the really important part of our platform is you – you guys are the makers. You are the ones out the building the enterprise apps, the customer-facing apps, the apps to empower your users, employees, your potential customers.
  • #22 Let’s take a quick, specific look at what we mean by features of our platform that make development easier. Let’s look at mobile development. Everything on this list is part and parcel of the platform, making it easier to get to production with your mobile deployment.
  • #23 This is a wider view. Everything you see below here are features that you as a developer don’t need to worry about creating or maintaining yourself. When we say platform, that’s what we mean – it’s what you get to stand on to start building your application.
  • #25 That’s the pitch – but let’s see this platform in action.(Take questions)
  • #26 We’re going to start the day by talking about data modeling. Without data, you don’t have much of an app – and how that data is created and maintained is very important to the lifecycle of your app.
  • #28 Safe Harbor
  • #29 So when you are first asked to start tracking data, it might be very tempting to just open up a spreadsheet and start adding rows. But why do that when for the same amount of programming you can get all these features on the right side?
  • #30 Demo building a quick app. This can mirror the first steps of the warehouse, build a random app, walk through an existing one, etc. Main point here is that people 100% new to the platform aren’t lost in the interface, that they understand what Custom Objects are and that they get how easy it is to make relational data structures.
  • #32 What’s more important than data? Clean data. Validation rules allow you to block bad data before it even gets into the system.
  • #33 Validation rules are applied anytime data is being inserted or updated. If your formula evaluates to true, the user will get an error instead of the system being updated.This is true no matter what, through the browser, through an API, through a mobile app. These are rules baked right into your data layer.
  • #34 Let’s have an exercise in requirements gathering. Here is some of the core needs for our Warehouse application. What nouns here should we be looking at to model our data with?
  • #35 Let’s have an exercise in requirements gathering. Here is some of the core needs for our Warehouse application. What nouns here should we be looking at to model our data with?
  • #36 Let’s have an exercise in requirements gathering. Here is some of the core needs for our Warehouse application. What nouns here should we be looking at to model our data with?
  • #37 Here is an overview of what our data model will look like.
  • #38 We also have another thing built right into your data model: Chatter. Chatter is a collaboration engine for your users, and it can interact directly with your data.
  • #39 OK, now it is your turn.
  • #41 OK, so you’ve created a basic data model, you added some validation to it – and if you had some time, enabled Chatter and changed the UI around. But what about building more advanced logic into your app?
  • #43 Safe Harbor
  • #44 When we say declarative, we might also refer to the as “clicks not code”. Or citizen development. This is development without needing to use programmatic logic, and it is a very powerful way to build and maintain your applications.
  • #45 Let’s revisit that spreadsheet idea. You can already see how custom objects and validation rules make for a more robust system. But we can take it even farther, even without coding a single line.
  • #46 You used a formula to define your validation rule – but what if you could define a field itself this way? This gives you data which is calculated in real time, but can be treated like a normal custom field.
  • #47 Formula fields work like formulas work in Excel spreadsheets.The formula here insists that a delivery date is needed for these stages.
  • #48 Roll-up fields are similar to formula fields, but they play off that master-child relationship you created in the first tutorial. Here, you can do calculations on the fly based on that relationship.
  • #49 A simple roll-up field might simply count the number of children that are in the relationship. In terms of your invoice, you could count how many line items are related. Or, if you wanted, you could aggregate a child field like value – and get the full value of that invoice.
  • #50 Workflows are where we start to see specific business rules being replicated in the system. They allow you to perform actions on your data based on specific conditions.
  • #51 They are broken up like this: When you insert or update a record, and that record meets specific criteria you have set – the system allows you to perform various actions.
  • #52 The system could send an email, create a task, update a field, or even send a message to an external endpoint.These actions could occur immediately, or they could be time-based and occur at a specific point down the road.
  • #53 Approvals are where we can put a real human element to controlling your data. This is another example of a feature we have created because we know enterprise apps will need this. Instead of having you create your own approval app, just use our.
  • #54 Similar to workflows, records can be submitted to approval if they meet certain criteria. You can then perform actions based on if the record was submitted, approved or denied. For instance, you might want to change the status of the record so that you can easily track the progress.You can also track the whole approval history on the record layout.
  • #55 Approvals have lots of options.
  • #56 Security is another aspect of our platform we take very seriously. Yes, we want you to be able to create a robust data structure. Your app should have the ability to perform complex business rules. But on top of all that, we need to keep it secure.
  • #57 The Salesforce Platform is a robust family of Identity and security features. You can assign users profiles, and even define users within groups, queues and hierarches. Permission sets allow you to group specific privileges across profiles, making it easier to maintain exactly who can do what. We also have multiple options for how people sign in: we’re an Identity Provider ourself, we support SAML and have implemented OAuth 2.0. For mobile, we have defined connected apps specifically so that admins can maintain who can use what out in the field.
  • #60 Update to let them know where lunch is
  • #61 Transition into the more programmatic side of things. Recap the declarative side, pointing out how they’ve extended their basic app and now they’ll see how little effort it is to leverage that new data model.
  • #63 Safe Harbor
  • #64 For when declarative logic is not enough, we provide Apex. Apex is a cloud-based programming language, very similar to Java – except that you can code, compile and deploy all right from your Salesforce instance. You’ll see how we can create robust programmatic functions right from your browser.
  • #65 For those unfamiliar with OO, here’s what a simple class structure looks like. NOTE: If you’re using this slide deck for a very technical audience, breeze through this section and get to meatier features of Apex, otherwise go into a basic discussion about how Apex is divided into classes, refers to information with variables, etc.Now note however, the big difference – we can access and manipulate data with just a few lines of code, no additional configuration required. Apex will automatically know everything you’ve done declaratively for your application.
  • #66 Let’s take a closer look. Go through some examples of querying, creating and deleting data from the Developer Console. Describe some of the debugging functions, but don’t go into too much detail.
  • #68 So what can you use Apex? In the next tutorial, we’ll talk about Controllers – which is how you primarily use Apex without our custom page framework. However, you can also use Apex to both extend some our existing API’s, and also to call out to others. It has a full HTTP request and response library. You can also communicate via email, both outbound – send out emails to recipients … and inbound. With inbound email you setup an Apex class, get a email address associated with it, and then you can have Apex react programmatically to it.Scheduled and Batched Apex allows you to run tasks in the background. A scheduled Apex job will run at a specific time, perform some logic and be done. With a batch job, it will also run at a specific time – but it will run against a set of records defined by SOQL until it is done all those records. Scheduled jobs are great for checking against your data and send out updates or alerts, while batched jobs can provide functions like data archiving and clean up.Finally, we triggers. Let’s take a closer look at those.
  • #69 A trigger looks a lot like a class, and behaves in a very similar way – but part of the definition is specifically defining what object it should act on, and when. Unlike an Apex class, triggers are called when events occur on specific object types. For instance, here we will call a utility method any time Merchandise is updated.
  • #70 Want to make Chatter smarter? You can extend it with Apex Triggers to associate highly custom behaviors. Here if someone adds a hash tag “promote”, Apex will automatically add it to the promotion and even update the record to let everyone know it just did that. We’ll also be doing a deeper dive into Apex and triggers today as well.
  • #71 Let’s look at an example of that. (I usually use Chatter Blacklist here, but will be adding a Merchandise specific example)https://appexchange.salesforce.com/results?keywords=Chatter%20Blacklist
  • #72 Unit testing is code to test your code. There are three basic parts to a good unit test – creating test data which simulates a scenario, and in a unit test all the data is transient … it never actually goes into the system. Next you will want to execute as much of your code as possible. We call that code coverage. To go from sandbox to production, you’ll need 75% coverage. But 75% probably shouldn’t be your target. Actually, 100% should probably be your target. The last bit is assertions, which prove that the outcome is what you expected.And we take this seriously on our side. Anyone want to guess how many of your unit tests Salesforce runs while testing our releases? It’s what you’d want – it’s 100%. So by writing good unit tests, you’re helping us not break your code.
  • #73 Here is an example of code coverage. In thise case, we’re not testing for the beRandom scenario.
  • #79 If you aren’t familiar with the MVC paradigm: Model View Controller, here is an easy way to think about. Think about how your arm moves. It’s not just one slab of jelly. You start with bones – and the defines the basic structure of the arm. That’s your Model, or Data section. You’ve worked with this already, using the declarative process. Now how do those bones perform actions? Muscle. You’ve already added a little muscle with workflows and validation rules, and we’ll see more later with Apex. But for now, we want to talk about the skin – adding a cosmetic interface to the app.
  • #80 This is where Visualforce comes into play. Visualforce is our user interface framework in the cloud, allowing you to create custom pages quickly and easy via components.
  • #81 What do we mean by components? Well you’d start with a page component, and that will define how the whole page is going to be rendered. And then you can add things like a form and fields for the form. Now everything you see here will be HTML when it gets outputted. So you’d have and HTML form, HTML input tages, etc. To the browser, it is just standard HTML.But how are we binding data here? We define a controller, which gets access to server-side logic. Whenever you see these brackets and that exclamation point, you’re looking at dynamically bound data which will effect how the component is rendered.However, the server-side logic here is a little interesting. Do Standard Controller demo, then go back to describe custom controllers and extensions.
  • #84 Now that you’ve seen how controllers normally look, let’s look at a different trick Visualforce has. You can also access server-side code directly via JavaScript. The Apex code is specified with the @RemoteAction annotation, and then we can call it from JavaScript easily. This is a very lightweight approach to communicating with data. You’ll see an example of this as part of the tutorial.
  • #85 You can also create completely custom components with your own logic that utilize attributes you define. This makes your Visualforce portable and easy to maintain.
  • #86 On the flip side, Visualforce also has template support, you can define a page and which sections can be utilized, and then another page can define those sections for the template.
  • #87 Visualforce also has components specifically for duplicating the Chatter interface, if you want to use that with your pages.
  • #88 Other uses for Visualforce include creating custom email templates, embedding Visualforce into existing layouts, rendering PDF instead of HTML, creating custom Mobile interfaces and also completely overriding a page.
  • #96 Before we get into specifics about API integration – let’s talk a bit about Identity. Identity services, being able to authenticate your users securely – is incredibly important, especially once we start accessing the platform from third parties.Now many of you may have existing applications which use our API’s – who here has written a mobile or desktop app that logs into Salesforce, for instance? If you wrote that app with a username and password screen, consider what you are taking on there: you have to handle those credentials with the same care we do on login.salesforce.com, right?
  • #97 What if you didn’t have to? Stupid question time: who has used Facebook? Right, exactly – and if you’ve used Facebook you have probably seen those popups that say things like “Farmville would like to do these three things as you”. You hit confirm, and Farmville has access to some of your Facebook account, but only the parts you let it. And you never gave them your password. And at any time, you can revoke the app.That’s Oauth, and the Salesforce Platform has an excellent implementation of it. It works by having the app send the user to the first party platform, in this case Salesforce, who logs the person in. The application and the plattform essentially confirm each other, and then at the end of it – the app gets a session token with only the permissions you granted.
  • #98 Let’s see that in action. Going to demo Workbench, which is a great PHP application for various developer functions against the platform.
  • #100 Now let’s talk about our specific API’s. We have API’s to fit a wide range of use cases. Our REST API is very versatile, and one of the main use cases is mobile applications.
  • #101 That’s because the REST API is very lightweight. You access it with industry standard HTTP calls. So when you call http://cnn.com, that’s an HTTP GET call. Your browser returns HTML, and you see a web page. This is the same, but authenticated, and you get JSON back. JSON is a very lightweight data type and many languages and frameworks already know how to parse it.
  • #102 Let’s see that in action.
  • #104 Now our old workhorse is our SOAP API.
  • #105 The flow of SOAP is very similar to REST, but the messaging is different. With SOAP, you are sending and receiving an XML message in a specific format. This can get heavy, size-wise, but it is also very stable and predictable. You can create a document called a WSDL (Web Services Definition Language) which defines how those messages look, and a lot of languages like Java and C# can easily consume a WSDL and create classes that talk to the API automatically.
  • #106 Now our Bulk API is meant specifically for loading large datasets. It’s asynchrounous to maximize the the server processing and allow for potentially lengthy load times.
  • #107 ETL (Extract Transform Load) tools can leverage the Bulk API to insert rows, pull data, and even modify the data in between … to say, match up columns with different names.
  • #108 Like the Bulk API – the Streaming API is designed for a very specific problem. What if you need real time updates, but you don’t want the API cost of constantly asking the server is anything has changed?{I usually talk about a Python dev who wrote a script to grab specific accounts, hand them off to a local process and then attach a resulting PDF to the account. It reduced a 45 minute process to a couple of minutes, and it made the system far more responsive. But to make it realtime, he polled the API every millisecond, which killed his API limit. Modified to work with the Streaming API, it now works great}
  • #109 The Streaming API gets a handshake from the platform, and then can subscribe to topics. Topics are mostly defined by SOQL to describe the kind of data the topic is pushing. Then, as long as that handshake is open – the updates get sent down to the client.
  • #110 Let’s look at a demo
  • #116 But now let’s talk about important parts of the platform that we don’t have time to cover today. Like the Mobile SDK, which allows you to easily create iOS and Android applications that run on the Salesforce Platform.
  • #117 Salesforce.com provides a host of Mobile SDK’s – Native, Hybrid, HTML5 – to help streamline your mobile app development efforts.These SDK’s are the fastest way to connect mobile apps on the extended Salesforce platform. In fact, they were designed so you can mobile-enable features from any of the major platforms that Salesforce offers.Mobile SDK’s can be found online at developer.force.com/mobile along with a handy developer workbook.
  • #118 Let’s talk about using Canvas, which allows me to easily put third part applications into Salesforce in a secure manner.
  • #119 For instance, maybe I have a large internal intranet applications. I don’t want to port all that functionality into Salesforce, but I do want to be able to integrate this one interface. Canvas allows you to easily bring that interface into the Salesforce UI, and in a very intelligent way.
  • #122 Heroku supports a polyglot framework: meaning it deploy many different languages.
  • #125 Let’s see an example.
  • #127 Describe AppExchange and packaging in general. If you’ve had the ISV team on hand, you can skip these as they would have already covered the material.
  • #129 Time to wrap things up
  • #131 Check inboxes for the survey link, or go to this link.Eddy Perez should email you this link in advance.
  • #132 You can find us easily on Twitter.
  • #133 Join your local DUG (check to see if there is a local one)
  • #134 Or start one
  • #135 If there is one URL to remember…