our api evolution: from metadata to tooling api for building incredible apps
TRANSCRIPT
Building Incredible Apps: Our API Evolution to Support Amazing User Experiences
John Vogt Director, Product Management Salesforce App Cloud
How Salesforce APIs have evolved to support the Lightning Experience and what to expect in our upcoming releases
Peter Wisnovsky Architect, R&D Salesforce App Cloud
Federico Recio Lead Engineer, Tooling API Salesforce App Cloud
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
• How many people in the room have programmatically worked with either Metadata or Tooling API? I will not count programming with Ant
• How many of you are working on building integrations for your Org?
• How many of you are partners that build on our API?
Getting to Know You
Our API Evolution To Build Amazing User Experiences How Salesforce APIs have evolved to support Lightning Experience
Setting the Vision…. Industry Best Cloud Platform
• If our Partners are successful, then we are successful
• Empower customers and partners to Build Amazing Experiences
• Great APIs enable Developers to be agile and successful
• IDE • Open Source Salesforce IDE Platform • Access to all Metadata contracts
• Developer Console • Reference implementation to help define our API
• Build a Cloud-based IDE
• Issues: • Needed to use MDAPI interactively
• Large File-Based API Types mean big retrieves and more difficult updates
The initiatives and drivers for our API Requirements.
Setting an initial Goal: IDE & Developer Console
• Industry Standards • REST and SOAP
• Salesforce Standards • SOQL & SOSL
• For the IDE and the Developer Console • Support SObject Row Update
• Container for Saving multple Metadata Types
Our Requirements drove us to building a New API Enter the Tooling API!
• Need to call describe*() a lot • Monolithic data structures - Describe results are too big to retrieve via 3G
• Describe Calls are Brittle • Consumers tied to 3 releases/year
• Need Admin Access to info about Metadata Types • Describe information not sufficient
Need APIs for Interactive Experiences
Delivering the Lightning Experience
A long, long time ago...
• We had SOAP API
• Verbs like query(), upsert(), describe*()
• Business Types based on sObject
• Query Results shaped by SOQL
• Configuration results fixed
In later episodes...
• Configuration returned by Metadata API
• Metadata results returned by name/wildcard
• Contracts designed for file system and text editing
• Configuration results now editable, but still Fixed
Plot complication!
• Needed to call describe*() a lot
• Describe results big to retrieve via 3G
• Needed to use MDAPI interactively
• Big types mean big updates with no OCC
• Needed admin access to info about types
• Describe information not sufficient
A New Hope… Salesforce System Catalogs
• Based on new integration technology
• Squeeze system configuration into sObjects
• Fine grained update
• Filter via SOQL WHERE
• Result shaped by SOQL target list
• RDBMS system catalog for SFDC
Like a lot of sequels… seems like a bit of a rehash
• Verbs like query(), upsert()
• Types based on sObject, MDAPI contracts
• Query Results shaped by SOQL
• User access via Data API
• Org access via Tooling API
• System/R design pattern from the 70s
A coherent, joinable schema for metadata
Comparison
conn.query(“ SELECT (SELECT QualifiedApiName FROM Fields) FROM EntityDefinition WHERE QualifiedApiName = ‘Account’ ”);
-- load picklists on combo hover -- Safe Harbor – coming in Spring ‘16 – in some form
conn.query(“ SELECT Value, isDefault FROM PicklistValueInfo WHERE FieldDefinitionId = ‘Account.Industry’ ”);
Metadata Catalog - Retrieves only desired
Salesforce System Catalogs
• Derived information accessible to SOQL
• Supports both User and Org visibility
• Unions custom and standard structures
Analogous to RDBMS System Catalogs
Building effective UIs
• Describe* replaced by SOQL queries
• Heavy use of aggregate relationships to reduce the number of API calls
• Only retrieve what is needed to render the UI
• Admin vs. User Access
EntityDefinition
• Includes information about standard and custom entities
• Useful relationships to retrieve data from related entities. For example: Fields, ValidationRules, Limits, LookupFilters, etc.
Object Manager object list
SELECT Label, QualifiedApiName, Publisher.IsSalesforce, ... FROM EntityDefinition
Instead of doing a DescribeGlobal call the page is rendered with a simple SOQL query
Object Manager object detail page
SELECT QualifiedApiName, Label, (SELECT ... FROM Fields), (SELECT ... FROM LookupFilters), … FROM EntityDefinition WHERE ...
Instead of doing a DescribeGlobal call the page is rendered with a simple SOQL query
Why its important
API First approach to building UI means using describe, need a way to get only the information I want about the entities I want, for new admin and end-user-facing UI, without having to revise Describe shape
• Metadata API • Release Management and Package Deployment
• Continuous Integration/Delivery
• Tooling API • Org Access
• External Integrations and Application Development
• SOAP & Partner API
• User Access, Including FLS
• Integrations and Application Development
Your use case will drive your choice. How do I choose an API?