SlideShare a Scribd company logo
A Miscellany of Things 
Force.com 
Peter Chittum 
@pchittum 
github.com/pchittum 
slideshare.com/chittum
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.
What’s On? 
 Javascript on Visualforce 
 Remote Objects 
 RevealJS
JS Options for Visualforce 
 Tag: apex:actionFunction 
 API Calls 
 @RemoteAction Apex Methods 
 Remote Object
The Old Way 
 actionFunction Pros 
– Easy and Declarative 
 API Pros 
– Use of idiomatic JS 
– No ViewState Overhead 
– Higher data size limits 
– Simple REST access via 
ForceTK 
 actionFunction Cons 
– ViewState and VF 
Postback overhead 
 API Cons 
– Burning API limit usage
The Newer Way 
 @RemoteAction Apex Method 
– Stateless 
– More idiomatic (uses callback) 
– Simplified on client side with RemoteTK library
The New Way 
 Remote Object 
– Like Standard Controller and Remote methods got together and 
had a baby 
– Declared via markup 
– No Apex, no required tests, just Javascript code 
– Support for basic CRUD operations
The Three Musketeers 
 Remote Object 
– First choice for basic CRUD 
 @RemoteAction Apex Method 
– Move complexity to server and transaction control 
 API 
– Larger data (binary files)
What’s On? 
 Javascript on Visualforce 
 Remote Objects 
 RevealJS
More on Remote Object 
 GA in Winter 15! 
 CRUD: Create, Retrieve, Update, Upsert, Delete 
 Optional page-specific JS namespace 
 Maps long Salesforce field names to JS-friendly names
Remote Object: Declaration 
<apex:remoteObjects > 
<apex:remoteObjectModel name="pcprerel__Damage_Report__c” 
fields="Id,Name" jsShorthand="DamageReport"> 
<apex:remoteObjectField name="pcprerel__Merchandise__c" 
jsShorthand="merchId"/> 
<apex:remoteObjectField name="pcprerel__Type__c" 
jsShorthand="type"/> 
... 
</apex:remoteObjectModel> 
</apex:remoteObjects>
Remote Object: Create JS Object 
var dr = new SObjectModel.DamageReport({ 
"merchId" : "{!Merchandise__c.Id}", 
"type" : "Accident", 
"description" : $('#ta-description').val() 
});
Remote Object: Invoke DML 
dr.create(function(err, result, event){ 
//debug with event to find out transaction status 
if (err) { 
console.log(err); 
//do stuff with err 
} else { 
//use result 
$('#test-display').text('Damage Report Id: '+result[0] ); 
} 
});
Demo
Other Features 
 Overriding of CRUD calls 
 Own set of limits (i.e. max 100 rows for retrieve) 
 Use rendered VF attribute to block generation of JS
What’s On? 
 Javascript on Visualforce 
 Remote Objects 
 RevealJS
RevealJS 
 Javascript library 
 Creating pure HTML presentations 
 Opensource at https://github.com/hakimel/reveal.js/ 
 Cloud hosted at http://slid.es
Demo 
Watch this play list to see RevealJS on Force.com 
http://www.youtube.com/playlist?list=PLkZK3G49sP2xE-yzEMvVJhbHmGMMDOkLz
Thank You

More Related Content

PDF
Javascript Security and Lightning Locker Service
PPTX
Unleash the Power of Apex Realtime Debugger
PDF
Create a Hybrid Mobile App With the Salesforce Mobile SDK
PPTX
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
PDF
Advanced Lightning Components
PDF
Lightning Components - Advanced Features
PPTX
Modeling and Querying Data and Relationships in Salesforce
PDF
Lightning Data Service: Eliminate Your Need to Load Records Through Controllers
Javascript Security and Lightning Locker Service
Unleash the Power of Apex Realtime Debugger
Create a Hybrid Mobile App With the Salesforce Mobile SDK
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Advanced Lightning Components
Lightning Components - Advanced Features
Modeling and Querying Data and Relationships in Salesforce
Lightning Data Service: Eliminate Your Need to Load Records Through Controllers

What's hot (18)

PDF
Streaming API with Java
PDF
Salesforce Mobile DevWeek 21-28 April: Introduction to Native & Hybrid Develo...
PDF
Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mo...
PDF
Durable Streaming and Enterprise Messaging
PPTX
Custom Metadata Data Types
PPT
Advanced Platform Series - OAuth and Social Authentication
PPTX
Build custom user interfaces for your Salesforce data with the UI API
PPTX
Mastering Force.com: Advanced Visualforce
PDF
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
PPT
The Salesforce Einstein Product Team: Ask Us Anything!
PDF
SLDS and Lightning Components
PPTX
Build Better Communities with Lightning
PPTX
Secure Development on the Salesforce Platform - Part 3
PDF
All Aboard the Lightning Components Action Service
PPTX
Diving Into Heroku Private Spaces
PPT
Building Visualforce Custom Events Handlers
PPT
Mobilising your salesforce applications using j query mobile
PDF
Streaming api with generic and durable streaming
Streaming API with Java
Salesforce Mobile DevWeek 21-28 April: Introduction to Native & Hybrid Develo...
Dreamforce 2014 Mobile Theatre Session - Automated Testing for Salesforce1 Mo...
Durable Streaming and Enterprise Messaging
Custom Metadata Data Types
Advanced Platform Series - OAuth and Social Authentication
Build custom user interfaces for your Salesforce data with the UI API
Mastering Force.com: Advanced Visualforce
ここまでできる!Salesforce Connect 最新機能 (Winter'17) のご紹介
The Salesforce Einstein Product Team: Ask Us Anything!
SLDS and Lightning Components
Build Better Communities with Lightning
Secure Development on the Salesforce Platform - Part 3
All Aboard the Lightning Components Action Service
Diving Into Heroku Private Spaces
Building Visualforce Custom Events Handlers
Mobilising your salesforce applications using j query mobile
Streaming api with generic and durable streaming
Ad

Similar to Javascript and Remote Objects on Force.com Winter 15 (20)

PPTX
S1 and Visualforce Publisher Actions
PDF
Visualforce: Using ActionFunction vs. RemoteAction
PPTX
The Power of Salesforce APIs World Tour Edition
PDF
IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜
PDF
Tour of Heroku + Salesforce Integration Methods
PDF
Visualforce Hack for Junction Objects
PPTX
Hca advanced developer workshop
PDF
Winter 14 Release Developer Preview
PPTX
Lightning Component Framework from 0 to App
PDF
Salesforce platform session 2
PDF
Cutting Edge Mobile Development in the App Cloud
PPTX
Force.com Friday : Intro to Apex
PPTX
CCT London 2013 Theatre Intro to Apex
PDF
Boxcars and Cabooses: When One More XHR Is Too Much
PPTX
Lightning components performance best practices
PPTX
Building Apps Faster with Lightning and Winter '17
PPTX
Building apps faster with lightning and winter '17
PDF
Turbo-charge Your Skuid Page with Apex
PDF
Force.com Friday: Intro to Force.com
PDF
Introduction to Apex Triggers
S1 and Visualforce Publisher Actions
Visualforce: Using ActionFunction vs. RemoteAction
The Power of Salesforce APIs World Tour Edition
IoTで成功を収めるための製品と戦略 〜 Salesforce IoT 〜
Tour of Heroku + Salesforce Integration Methods
Visualforce Hack for Junction Objects
Hca advanced developer workshop
Winter 14 Release Developer Preview
Lightning Component Framework from 0 to App
Salesforce platform session 2
Cutting Edge Mobile Development in the App Cloud
Force.com Friday : Intro to Apex
CCT London 2013 Theatre Intro to Apex
Boxcars and Cabooses: When One More XHR Is Too Much
Lightning components performance best practices
Building Apps Faster with Lightning and Winter '17
Building apps faster with lightning and winter '17
Turbo-charge Your Skuid Page with Apex
Force.com Friday: Intro to Force.com
Introduction to Apex Triggers
Ad

More from Peter Chittum (20)

PPTX
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
PDF
Winter 21 Developer Highlights for Salesforce
PPTX
LMS Lightning Message Service
PPTX
Apply the Salesforce CLI To Everyday Problems
PDF
If You Can Write a Salesforce Formula, You Can Use the Command Line
PDF
If you can write a Salesforce Formula you can use the command line
PDF
Do Not Fear the Command Line
PPTX
Don't Fear the Command Line
PPTX
Maths Week - About Computers, for Kids
PPTX
Best api features of 2016
PDF
Spring '16 Release Overview - Bilbao Feb 2016
PDF
Salesforce Platform Encryption Developer Strategy
PDF
Dreamforce 15 - Platform Encryption for Developers
PPTX
Platform Encryption World Tour Admin Zone
PDF
Salesforce Lightning Components and App Builder EMEA World Tour 2015
PPTX
Building Applications on the Salesforce1 Platform for Imperial College London
PDF
Elevate london dec 2014.pptx
PPTX
AngularJS App In Two Weeks
PPTX
Df14 Salesforce Advanced Developer Certification
PPTX
S1 Tour Paris Developpeurs
Dreamforce 2013 - Enhancing the Chatter Feed with Topics and Apex
Winter 21 Developer Highlights for Salesforce
LMS Lightning Message Service
Apply the Salesforce CLI To Everyday Problems
If You Can Write a Salesforce Formula, You Can Use the Command Line
If you can write a Salesforce Formula you can use the command line
Do Not Fear the Command Line
Don't Fear the Command Line
Maths Week - About Computers, for Kids
Best api features of 2016
Spring '16 Release Overview - Bilbao Feb 2016
Salesforce Platform Encryption Developer Strategy
Dreamforce 15 - Platform Encryption for Developers
Platform Encryption World Tour Admin Zone
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Building Applications on the Salesforce1 Platform for Imperial College London
Elevate london dec 2014.pptx
AngularJS App In Two Weeks
Df14 Salesforce Advanced Developer Certification
S1 Tour Paris Developpeurs

Recently uploaded (20)

PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
Machine Learning_overview_presentation.pptx
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
A comparative analysis of optical character recognition models for extracting...
Machine Learning_overview_presentation.pptx
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Assigned Numbers - 2025 - Bluetooth® Document
NewMind AI Weekly Chronicles - August'25-Week II
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
sap open course for s4hana steps from ECC to s4
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
Electronic commerce courselecture one. Pdf
Encapsulation_ Review paper, used for researhc scholars
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Javascript and Remote Objects on Force.com Winter 15

  • 1. A Miscellany of Things Force.com Peter Chittum @pchittum github.com/pchittum slideshare.com/chittum
  • 2. 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.
  • 3. What’s On?  Javascript on Visualforce  Remote Objects  RevealJS
  • 4. JS Options for Visualforce  Tag: apex:actionFunction  API Calls  @RemoteAction Apex Methods  Remote Object
  • 5. The Old Way  actionFunction Pros – Easy and Declarative  API Pros – Use of idiomatic JS – No ViewState Overhead – Higher data size limits – Simple REST access via ForceTK  actionFunction Cons – ViewState and VF Postback overhead  API Cons – Burning API limit usage
  • 6. The Newer Way  @RemoteAction Apex Method – Stateless – More idiomatic (uses callback) – Simplified on client side with RemoteTK library
  • 7. The New Way  Remote Object – Like Standard Controller and Remote methods got together and had a baby – Declared via markup – No Apex, no required tests, just Javascript code – Support for basic CRUD operations
  • 8. The Three Musketeers  Remote Object – First choice for basic CRUD  @RemoteAction Apex Method – Move complexity to server and transaction control  API – Larger data (binary files)
  • 9. What’s On?  Javascript on Visualforce  Remote Objects  RevealJS
  • 10. More on Remote Object  GA in Winter 15!  CRUD: Create, Retrieve, Update, Upsert, Delete  Optional page-specific JS namespace  Maps long Salesforce field names to JS-friendly names
  • 11. Remote Object: Declaration <apex:remoteObjects > <apex:remoteObjectModel name="pcprerel__Damage_Report__c” fields="Id,Name" jsShorthand="DamageReport"> <apex:remoteObjectField name="pcprerel__Merchandise__c" jsShorthand="merchId"/> <apex:remoteObjectField name="pcprerel__Type__c" jsShorthand="type"/> ... </apex:remoteObjectModel> </apex:remoteObjects>
  • 12. Remote Object: Create JS Object var dr = new SObjectModel.DamageReport({ "merchId" : "{!Merchandise__c.Id}", "type" : "Accident", "description" : $('#ta-description').val() });
  • 13. Remote Object: Invoke DML dr.create(function(err, result, event){ //debug with event to find out transaction status if (err) { console.log(err); //do stuff with err } else { //use result $('#test-display').text('Damage Report Id: '+result[0] ); } });
  • 14. Demo
  • 15. Other Features  Overriding of CRUD calls  Own set of limits (i.e. max 100 rows for retrieve)  Use rendered VF attribute to block generation of JS
  • 16. What’s On?  Javascript on Visualforce  Remote Objects  RevealJS
  • 17. RevealJS  Javascript library  Creating pure HTML presentations  Opensource at https://github.com/hakimel/reveal.js/  Cloud hosted at http://slid.es
  • 18. Demo Watch this play list to see RevealJS on Force.com http://www.youtube.com/playlist?list=PLkZK3G49sP2xE-yzEMvVJhbHmGMMDOkLz

Editor's Notes

  • #12: Also an optional namespace attribute that I’m not using here, to avoid JS Namespace conflicts.