WIFI
BGI.SEA
BGI2003cb4g!
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.
public class HelloWorld {
public string getEmail() {
return 'joshua.birk@salesforce.com';
}
public string getTwitter() {
return ’@joshbirk';
}
public string getGithub() {
return 'https://github.com/joshbirk';
Canvas
Framework for using third party apps within Salesforce
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
http://workbench.developerforce.com
http://workbench.developerforce.com
Signed Request
Encrypted authentication message to client
Decoding
//In Canvas via SignedRequest/POST, the authentication should be passed via the
signed_request header
$signedRequest = $_REQUEST['signed_request'];
$consumer_secret = $_ENV['consumer_secret'];
if ($signedRequest == null || $consumer_secret == null) {
echo "Error: Signed Request or Consumer Secret not found";
}
//decode the signedRequest
$sep = strpos($signedRequest, '.');
$encodedSig = substr($signedRequest, 0, $sep);
$encodedEnv = substr($signedRequest, $sep + 1);
$calcedSig = base64_encode(hash_hmac("sha256", $encodedEnv,
$consumer_secret, true));
if ($calcedSig != $encodedSig) {
echo "Error: Signed Request Failed. Is the app in Canvas?";
https://github.com/joshbirk/Canvas-PHP
Apex Endpoints
Exposing Apex methods via SOAP and REST
Apex SOAP
global class MyWebService {
webService static Id makeContact(String lastName, Account a) {
Contact c = new Contact(lastName = 'Weissman',
AccountId = a.Id);
insert c;
return c.id;
}
}
Apex REST
@RestResource(urlMapping='/CaseManagement/v1/*')
global with sharing class CaseMgmtService
{
@HttpPost
global static String attachPic(){
RestRequest req = RestContext.request;
RestResponse res = Restcontext.response;
Id caseId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
Blob picture = req.requestBody;
Attachment a = new Attachment (ParentId = caseId,
Body = picture,
ContentType = 'image/
http://bit.ly/gist_apex_cfprest
Apex JSON
Methods to serialize and deserialize JSON Objects
Serialization
Datetime dt = Datetime.newInstance(
Date.newInstance(
2011, 3, 22),
Time.newInstance(
1, 15, 18, 0));
String str = JSON.serialize(dt);
System.assertEquals(
'"2011-03-22T08:15:18.000Z"',
str);
Deserializatio
n
Decimal n = (Decimal)JSON.deserialize(
'100.1', Decimal.class);
System.assertEquals(n, 100.1);
Car c = (Car)JSON.deserializeStrict(
'{"make":"SFDC","year":"2020"}',
Car.class);
System.assertEquals(c.make, 'SFDC');
System.assertEquals(c.year, '2020');
Map<String, Object> m =
(Map<String, Object>)
JSON.deserializeUntyped(jsonInput);
http://bit.ly/gist_apex_flickr
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
Double-click to enter title
Double-click to enter text
http://developer.force.com

Seattle Dev Garage

  • 1.
  • 2.
    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.
  • 3.
    public class HelloWorld{ public string getEmail() { return 'joshua.birk@salesforce.com'; } public string getTwitter() { return ’@joshbirk'; } public string getGithub() { return 'https://github.com/joshbirk';
  • 4.
    Canvas Framework for usingthird party apps within Salesforce
  • 6.
    OAuth Industry standard methodof user authentication
  • 7.
    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
  • 8.
  • 9.
  • 10.
  • 11.
    Decoding //In Canvas viaSignedRequest/POST, the authentication should be passed via the signed_request header $signedRequest = $_REQUEST['signed_request']; $consumer_secret = $_ENV['consumer_secret']; if ($signedRequest == null || $consumer_secret == null) { echo "Error: Signed Request or Consumer Secret not found"; } //decode the signedRequest $sep = strpos($signedRequest, '.'); $encodedSig = substr($signedRequest, 0, $sep); $encodedEnv = substr($signedRequest, $sep + 1); $calcedSig = base64_encode(hash_hmac("sha256", $encodedEnv, $consumer_secret, true)); if ($calcedSig != $encodedSig) { echo "Error: Signed Request Failed. Is the app in Canvas?";
  • 12.
  • 13.
    Apex Endpoints Exposing Apexmethods via SOAP and REST
  • 14.
    Apex SOAP global classMyWebService { webService static Id makeContact(String lastName, Account a) { Contact c = new Contact(lastName = 'Weissman', AccountId = a.Id); insert c; return c.id; } }
  • 15.
    Apex REST @RestResource(urlMapping='/CaseManagement/v1/*') global withsharing class CaseMgmtService { @HttpPost global static String attachPic(){ RestRequest req = RestContext.request; RestResponse res = Restcontext.response; Id caseId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1); Blob picture = req.requestBody; Attachment a = new Attachment (ParentId = caseId, Body = picture, ContentType = 'image/
  • 16.
  • 17.
    Apex JSON Methods toserialize and deserialize JSON Objects
  • 18.
    Serialization Datetime dt =Datetime.newInstance( Date.newInstance( 2011, 3, 22), Time.newInstance( 1, 15, 18, 0)); String str = JSON.serialize(dt); System.assertEquals( '"2011-03-22T08:15:18.000Z"', str);
  • 19.
    Deserializatio n Decimal n =(Decimal)JSON.deserialize( '100.1', Decimal.class); System.assertEquals(n, 100.1); Car c = (Car)JSON.deserializeStrict( '{"make":"SFDC","year":"2020"}', Car.class); System.assertEquals(c.make, 'SFDC'); System.assertEquals(c.year, '2020'); Map<String, Object> m = (Map<String, Object>) JSON.deserializeUntyped(jsonInput);
  • 20.
  • 22.
    Polyglot Framework PaaS allowingfor the deployment of multiple languages
  • 24.
    $ 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
  • 25.
    Double-click to entertitle Double-click to enter text http://developer.force.com

Editor's Notes

  • #5 It’s actually using Canvas, which allows me to easily put third part applications into Salesforce in a secure manner.
  • #6 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.
  • #13 How does privacy work with Chatter? Can you accidentally share a record I’m not supposed to see?
  • #16 How does privacy work with Chatter? Can you accidentally share a record I’m not supposed to see?
  • #17 How does privacy work with Chatter? Can you accidentally share a record I’m not supposed to see?
  • #20 How does privacy work with Chatter? Can you accidentally share a record I’m not supposed to see?
  • #21 How does privacy work with Chatter? Can you accidentally share a record I’m not supposed to see?
  • #27 It’s actually using Canvas, which allows me to easily put third part applications into Salesforce in a secure manner.
  • #28 How does privacy work with Chatter? Can you accidentally share a record I’m not supposed to see?