jsForce in Action
​ Gordon Bockus
​ Principle Software Engineer
​ Spanning by EMC
​ @gordonk66
​ Safe harbor statement under the Private Securities Litigation Reform Act of 1995:
​ This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties
materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed
or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-
looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any
statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new,
planned, or upgraded services or technology developments and customer contracts or use of our services.
​ The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new
functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our
operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any
litigation, risks associated with completed and any 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 year and in our quarterly report on Form 10-Q for the most recent fiscal quarter.
These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section
of our Web site.
​ Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available
and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features
that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Safe Harbor
•  Building web applications in JavaScript for over 10 years, around
2 years experience using Node
•  One of the original developers of the Spanning Backup for
Salesforce Application
•  Competitor in various Topcoder Lightning competitions
Gordon Bockus @gordonk66
Who am I?
•  What is jsForce and how can you use it?
•  Overview of Salesforce Explorer
•  Node server best practices
•  Third Party Module Integration
•  How to Test your code when using jsForce
What will we be discussing?
Outline
​ $ npm install jsforce
​ Used as a node module in
server side JavaScript code.
​ Authenticate using OAuth2 or
with hard coded credentials.
​ $ npm install -g jsforce
​ Used to directly interact with
the library on the command
line.
​ Great for quickly interacting
with SF.com in code.
​ Authenticate interactively using
username/password.
​ Script tag in the html header
​ 
Most valid use case is in a
Canvas application.
​ All interaction with SF.com
directly in the browser.
Node Module Command Line Web Browser
jsForce – What is it?
​ https://jsforce.github.io/
jsForce
​ Command Line Demo
​ Client side
​  Angular
​  Sass
​  Angular ui-router
​ Server side
​  Node
​  Express
​  jsForce
​  Bluebird
Salesforce Explorer
​ https://github.com/gbockus/jsForceInAction
Salesforce Explorer Demo
​ Demo in the browser
​ Built Using:
•  Yeoman
•  Angular full stack Generator
​ Features:
•  Authenticate with Salesforce.
•  View/Search all object types in
organization.
•  See attributes for each object type.
•  See recently updated objects of the
selected type.
Salesforce Explorer
​ How did it get started?
•  Separate web tier from business logic
•  Drive authentication scheme through configuration
•  Use a build tool
•  Promises make logic simpler to understand asynchronous flow
•  Use the same Promise module across the application
•  Test your code
Code organization and beyond
Best Practices
•  Provides common Promise behavior
•  Enabled use by getting developers familiar with utility Promise functions that are available
•  Results in similarly organized code throughout application
Ok, mostly the bluebird Promise module in this example.
Third Party module Integration
•  At minimum unit test code to verify functionality and provided example usage.
•  Don’t interact with third parties (like Salesforce) in unit test.
•  Use Mock objects: Node is great at this
•  Useful libraries: Chai, Sinon
•  Test Framework: Mocha
Do it!
Testing
Salesforce Service Test Demo
​ Show the tests being executed in both intellij and on the command line
​ Show the test file
​ Discuss how to mock jsForce functions
•  Top Level (like auth)
•  Second Level (like conn.sobject)
Other places to ask questions:
•  http://salesforce.stackexchange.com/
•  http://stackoverflow.com/
There are no silly questions..
Questions?
•  https://github.com/gbockus/jsForceInAction
•  https://jsforce.github.io/
•  https://github.com/petkaantonov/bluebird
•  http://yeoman.io/
•  https://github.com/DaftMonk/generator-angular-fullstack
•  https://mochajs.org/
•  http://chaijs.com/
Now go build something
Thanks!

More Related Content

PPTX
Testing Microservices
PDF
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
PPTX
Introduction to ELK
PDF
Getting started with Site Reliability Engineering (SRE)
PPTX
Azure Infrastructure as Code and Hashicorp Terraform
PDF
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...
PDF
Data Discoverability at SpotHero
PDF
Steve Litras [Cribl] | The Power of Infinite Choice | InfluxDays Virtual Expe...
Testing Microservices
[네이버오픈소스세미나] Pinpoint를 이용해서 서버리스 플랫폼 Apache Openwhisk 트레이싱하기 - 오승현
Introduction to ELK
Getting started with Site Reliability Engineering (SRE)
Azure Infrastructure as Code and Hashicorp Terraform
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...
Data Discoverability at SpotHero
Steve Litras [Cribl] | The Power of Infinite Choice | InfluxDays Virtual Expe...

What's hot (20)

PPTX
Prometheus and Grafana
PDF
Go Observability (in practice)
PDF
Getting Started With Apex REST Services
PPT
ERP Implementation Using Agile Project Management with Scrum
PPTX
Lessons learned on the Azure API Stewardship Journey.pptx
PDF
How We Optimize Spark SQL Jobs With parallel and sync IO
PDF
How to monitor your micro-service with Prometheus?
PDF
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...
PDF
Software Bots as Superheroes in the SPACE of Developer Productivity
PPTX
Log management with ELK
PDF
Apex Testing Best Practices
PPTX
Salesforce Org Health Check & Performance Testing
ODP
Presto
PPTX
Microsoft Power Platform in 2025_Piyush Gupta_.pptx
PPTX
Real Time Integration with Salesforce Platform Events
PDF
Building a Real-Time Feature Store at iFood
PPTX
Docker networking Tutorial 101
PDF
API Security Best Practices & Guidelines
PDF
OpenTelemetry Introduction
PDF
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Prometheus and Grafana
Go Observability (in practice)
Getting Started With Apex REST Services
ERP Implementation Using Agile Project Management with Scrum
Lessons learned on the Azure API Stewardship Journey.pptx
How We Optimize Spark SQL Jobs With parallel and sync IO
How to monitor your micro-service with Prometheus?
Dynamic DDL: Adding Structure to Streaming Data on the Fly with David Winters...
Software Bots as Superheroes in the SPACE of Developer Productivity
Log management with ELK
Apex Testing Best Practices
Salesforce Org Health Check & Performance Testing
Presto
Microsoft Power Platform in 2025_Piyush Gupta_.pptx
Real Time Integration with Salesforce Platform Events
Building a Real-Time Feature Store at iFood
Docker networking Tutorial 101
API Security Best Practices & Guidelines
OpenTelemetry Introduction
Choosing Between Microsoft Fabric, Azure Synapse Analytics and Azure Data Fac...
Ad

Similar to jsForce in Action (20)

PDF
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
PPTX
Lightning Developer Experience, Eclipse IDE Evolved
PPTX
Enterprise-grade UI with open source Lightning Web Components
PPTX
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
PDF
Intro to the Salesforce Mobile SDK: Building Android Apps
PDF
API Design for Your Packaged App
PDF
Get Started with Lightning Web Components Open Source
PDF
Five Developer Tips Every Admin Needs To Know
PPTX
S1 Tour Paris Developpeurs
PPTX
Force.com Friday : Intro to Apex
PDF
Force.com Friday: Intro to Force.com
PDF
Tour of Heroku + Salesforce Integration Methods
PPTX
ISV Tech Talk: Distributing Lightning Components
PDF
Lightning web components - Episode 4 : Security and Testing
PPTX
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
PPTX
Build and Package Lightning Components for Lightning Exchange
PDF
Sharing APIs at Scale for a Great Developer Experience
PPTX
Crossbrowser Testing at Salesforce Analytics
PPTX
Unleash the Power of Apex Realtime Debugger
PPTX
Sandboxes: The Future of App Development by Evan Barnet & Pam Barnet
NgForce: A JS Library For Quickly Building Salesforce Apps Using AngularJS
Lightning Developer Experience, Eclipse IDE Evolved
Enterprise-grade UI with open source Lightning Web Components
Dreamforce 2014 - Salesforce Python SDK for REST/SOAP APIs
Intro to the Salesforce Mobile SDK: Building Android Apps
API Design for Your Packaged App
Get Started with Lightning Web Components Open Source
Five Developer Tips Every Admin Needs To Know
S1 Tour Paris Developpeurs
Force.com Friday : Intro to Apex
Force.com Friday: Intro to Force.com
Tour of Heroku + Salesforce Integration Methods
ISV Tech Talk: Distributing Lightning Components
Lightning web components - Episode 4 : Security and Testing
Using Python on Heroku and Force.com Canvas to Enhance Salesforce.com
Build and Package Lightning Components for Lightning Exchange
Sharing APIs at Scale for a Great Developer Experience
Crossbrowser Testing at Salesforce Analytics
Unleash the Power of Apex Realtime Debugger
Sandboxes: The Future of App Development by Evan Barnet & Pam Barnet
Ad

More from Salesforce Developers (20)

PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
PDF
Local development with Open Source Base Components
PPTX
TrailheaDX India : Developer Highlights
PDF
Why developers shouldn’t miss TrailheaDX India
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
PPTX
CodeLive: Converting Aura Components to Lightning Web Components
PPTX
TrailheaDX and Summer '19: Developer Highlights
PDF
Live coding with LWC
PDF
LWC Episode 3- Component Communication and Aura Interoperability
PDF
Lightning web components episode 2- work with salesforce data
PDF
Lightning web components - Episode 1 - An Introduction
PDF
Migrating CPQ to Advanced Calculator and JSQCP
PDF
Scale with Large Data Volumes and Big Objects in Salesforce
PDF
Replicate Salesforce Data in Real Time with Change Data Capture
PDF
Modern Development with Salesforce DX
PDF
Get Into Lightning Flow Development
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
PDF
Introduction to MuleSoft
PDF
Modern App Dev: Modular Development Strategies
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Local development with Open Source Base Components
TrailheaDX India : Developer Highlights
Why developers shouldn’t miss TrailheaDX India
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Converting Aura Components to Lightning Web Components
TrailheaDX and Summer '19: Developer Highlights
Live coding with LWC
LWC Episode 3- Component Communication and Aura Interoperability
Lightning web components episode 2- work with salesforce data
Lightning web components - Episode 1 - An Introduction
Migrating CPQ to Advanced Calculator and JSQCP
Scale with Large Data Volumes and Big Objects in Salesforce
Replicate Salesforce Data in Real Time with Change Data Capture
Modern Development with Salesforce DX
Get Into Lightning Flow Development
Integrate CMS Content Into Lightning Communities with CMS Connect
Introduction to MuleSoft
Modern App Dev: Modular Development Strategies

Recently uploaded (20)

PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
UiPath Agentic Automation session 1: RPA to Agents
PPTX
Chapter 5: Probability Theory and Statistics
DOCX
search engine optimization ppt fir known well about this
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Five Habits of High-Impact Board Members
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PPTX
The various Industrial Revolutions .pptx
PPT
What is a Computer? Input Devices /output devices
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide
Zenith AI: Advanced Artificial Intelligence
Custom Battery Pack Design Considerations for Performance and Safety
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
UiPath Agentic Automation session 1: RPA to Agents
Chapter 5: Probability Theory and Statistics
search engine optimization ppt fir known well about this
Improvisation in detection of pomegranate leaf disease using transfer learni...
Flame analysis and combustion estimation using large language and vision assi...
Taming the Chaos: How to Turn Unstructured Data into Decisions
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Five Habits of High-Impact Board Members
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
sbt 2.0: go big (Scala Days 2025 edition)
The various Industrial Revolutions .pptx
What is a Computer? Input Devices /output devices
Module 1.ppt Iot fundamentals and Architecture
CloudStack 4.21: First Look Webinar slides
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Enhancing plagiarism detection using data pre-processing and machine learning...
How IoT Sensor Integration in 2025 is Transforming Industries Worldwide

jsForce in Action

  • 1. jsForce in Action ​ Gordon Bockus ​ Principle Software Engineer ​ Spanning by EMC ​ @gordonk66
  • 2. ​ Safe harbor statement under the Private Securities Litigation Reform Act of 1995: ​ This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward- looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. ​ The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any 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 year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. ​ Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. Safe Harbor
  • 3. •  Building web applications in JavaScript for over 10 years, around 2 years experience using Node •  One of the original developers of the Spanning Backup for Salesforce Application •  Competitor in various Topcoder Lightning competitions Gordon Bockus @gordonk66 Who am I?
  • 4. •  What is jsForce and how can you use it? •  Overview of Salesforce Explorer •  Node server best practices •  Third Party Module Integration •  How to Test your code when using jsForce What will we be discussing? Outline
  • 5. ​ $ npm install jsforce ​ Used as a node module in server side JavaScript code. ​ Authenticate using OAuth2 or with hard coded credentials. ​ $ npm install -g jsforce ​ Used to directly interact with the library on the command line. ​ Great for quickly interacting with SF.com in code. ​ Authenticate interactively using username/password. ​ Script tag in the html header ​  Most valid use case is in a Canvas application. ​ All interaction with SF.com directly in the browser. Node Module Command Line Web Browser jsForce – What is it? ​ https://jsforce.github.io/
  • 7. ​ Client side ​  Angular ​  Sass ​  Angular ui-router ​ Server side ​  Node ​  Express ​  jsForce ​  Bluebird Salesforce Explorer ​ https://github.com/gbockus/jsForceInAction
  • 9. ​ Built Using: •  Yeoman •  Angular full stack Generator ​ Features: •  Authenticate with Salesforce. •  View/Search all object types in organization. •  See attributes for each object type. •  See recently updated objects of the selected type. Salesforce Explorer ​ How did it get started?
  • 10. •  Separate web tier from business logic •  Drive authentication scheme through configuration •  Use a build tool •  Promises make logic simpler to understand asynchronous flow •  Use the same Promise module across the application •  Test your code Code organization and beyond Best Practices
  • 11. •  Provides common Promise behavior •  Enabled use by getting developers familiar with utility Promise functions that are available •  Results in similarly organized code throughout application Ok, mostly the bluebird Promise module in this example. Third Party module Integration
  • 12. •  At minimum unit test code to verify functionality and provided example usage. •  Don’t interact with third parties (like Salesforce) in unit test. •  Use Mock objects: Node is great at this •  Useful libraries: Chai, Sinon •  Test Framework: Mocha Do it! Testing
  • 13. Salesforce Service Test Demo ​ Show the tests being executed in both intellij and on the command line ​ Show the test file ​ Discuss how to mock jsForce functions •  Top Level (like auth) •  Second Level (like conn.sobject)
  • 14. Other places to ask questions: •  http://salesforce.stackexchange.com/ •  http://stackoverflow.com/ There are no silly questions.. Questions?
  • 15. •  https://github.com/gbockus/jsForceInAction •  https://jsforce.github.io/ •  https://github.com/petkaantonov/bluebird •  http://yeoman.io/ •  https://github.com/DaftMonk/generator-angular-fullstack •  https://mochajs.org/ •  http://chaijs.com/ Now go build something Thanks!