SlideShare a Scribd company logo
1 of 55
Download to read offline
Design Patterns Every ISV Needs to Know 
Andrey Volosevich 
Senior ISV Technical Evangelist 
salesforce.com 
@andreyvol 
Mac Anderson 
CTO, Fonteva 
@macscloud 
Ross Belmont 
Chief of UX, Appiphony 
@rossbelmont
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 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.
Agenda: Design Patterns Every ISV Needs to Know 
• Top Pattern in 2014: Enforcing Data Access in Apex 
• Configuration Patterns for Testing and Flexibility 
• Architecting Large Apps using Dependency Injection Principles 
• Q & A
“I wish we had done this earlier…”
Top Pattern in 2014 
Enforcing Data Access in Apex 
Andrey Volosevich, salesforce.com 
Senior ISV Technical Evangelist
CRUD/FLS Enforcement: Example 
[Select Name, Net_Worth__c from Investor__c Where Id = :xxx];
CRUD/FLS Enforcement: Example
CRUD/FLS Enforcement: Example 
[Select Name, Net_Worth__c from Investor__c Where Id = :xxx]; 
Your app is not respecting my 
Data Security Policy???!!! 
What?!
CRUD/FLS Enforcement 
FLS 
Field Level Access 
CRUD 
Object Level Access 
Record 
Sharing
CRUD/FLS Enforcement 
FLS 
Field Level Access 
CRUD 
Object Level Access 
Record 
Sharing
CRUD/FLS Enforcement 
FLS 
Field Level Access 
CRUD 
Object Level Access 
Record 
Sharing 
Apex does not enforce Object and Field level access. 
Visualforce does enforce but only for Concrete SObject Bindings 
FLS Enforced: <apex:outputField value=”{!Investor__c.NetWorth__c}”/> 
FLS Not Enforced: <apex:outputText value=”{!getNetWorth}”/>
CRUD/FLS Enforcement: Schema Reflection 
• Use Reflection 
C 
R 
U 
D 
Field access implicitly checks for object access, no need to check both
CRUD/FLS Enforcement: Checking at Runtime 
• Checking access for multiple fields dynamically 
Keep mind, there are no more limits on # of Schema describe statements
CRUD/FLS Enforcement – Encapsulate, Use Libraries 
• Don’t Repeat Yourself!! Abstract away complexity, avoid duplication, keep business logic clean 
force-dot-com-esapi also does input validation and output encoding http://p.force.com/esapi
CRUD/FLS Enforcement 
• Write unit tests for different User Profiles – runAs()
CRUD/FLS Enforcement 
• Write unit tests for different User Profiles – runAs() 
• Build secure coding and good design practices in your team’s DNA
CRUD/FLS Enforcement 
• Write unit tests for different User Profiles – runAs() 
• Build secure coding and good design practices in your team’s DNA 
• Platform gives your customer control – do not take it away.
CRUD/FLS Enforcement 
• Write unit tests for different User Profiles – runAs() 
• Build secure coding and good design practices in your team’s DNA 
• Platform gives your customer control – do not take it away. 
• Be kind to your future self!
OK, this is helpful. But I have a 
complex app, what else you got?
Beyond CRUD/FLS: Community Lib fflib-apex-common 
• Example: QueryFactory 
Other Enterprise Patterns: Service Layer, Selector Layer, Domain Layer, Apex Mocks 
https://github.com/financialforcedev/fflib-apex-common
Ross Belmont 
Design Patterns for Flexibility 
Chief of UX, Appiphony 
@rossbelmont
Two Examples 
• Secure testing of external web services 
• Importing a diverse data set while architecting for flexibility
First Example
Different Endpoint for Testing
How Will the App Know the “Right” Endpoint?
Custom Code Populates a Protected Custom Setting
“Testing Flag” Alters the Custom Code’s Behavior
Benefits of This Approach 
• The app references the correct endpoint at the correct time 
• Only you (as the ISV) can specify the external endpoint 
– If customers configured it themselves, there would be a support burden 
– No one can set the endpoint maliciously for a “man in the middle” attack 
• Swapping the endpoints is simple (just install the extension package) 
• The extra “testing flag” object doesn’t pollute customer environments
Importing a Diverse Data Set 
Architecting for flexibility to serve a broader customer base
External Web Service Creates a “Dossier”
• Creates different marketing 
campaigns targeted at alumni of 
specific universities 
Different Types of Customers 
• Drives marketing based on traditional 
demographic segmentation 
– Age 
– Gender
Contact and Dossier: Objects in the Org
Contact Looks Up to Dossier
Subscriber A Can Report on Age, Gender
Subscriber B Can Focus on Alumni Instead
Benefits of This Approach 
• Customers can add exactly what they want to the Contact record and layout, 
and nothing more 
• Reporting is simplified by flattening down to the Contact record 
• A Dossier can be attached to Leads, etc. in the future 
• Easy to serve new marketing initiatives in the future 
– Recent grads vs. 20 year alumni, for example (incorporating Age)
Mac Anderson 
CTO, Fonteva
The Challenges of Building Software in the Cloud 
• Upgrading customers 
• Compatibility with customer environment configurations 
– Other managed packages 
– Salesforce.com features (Person Accounts, State + Country Picklists, etc…) 
– Misc. customer built workflows and triggers 
• Package Bloat 
• Force.com Governor Limit compliance
3 Common Pitfalls to Avoid 
• Don’t build a killer demo app unless you like big balls of mud 
• Never say “Our customer’s won’t do that…” with your code 
• Solve the same problem the same way all the time
Loosely Coupled Systems Put ISV’s in the Driver Seat 
• Organized as a web of modular, interacting objects 
• Cohesive with little to no dependencies 
• Flexible 
• Consistent
A simple concrete example 
Feature: “Allow customers to process credit card 
payments online for orders managed in our app.”
A simple, but flawed approach 
public class PaymentService {! 
! 
public PaymentResult processPayment(CustomerOrder order) {! 
PaypalService paypal = new PaypalService();! 
PaymentResult = paypal.processPayment(order);! 
return result;! 
}! 
! 
}!
Success! You can process payments… 
But what happens when… 
• You sell your app to a customer in the UK where PayPal does not support Direct 
Debits? 
• Your biggest prospect is Stripe : ) 
• Your customers are demanding support for another vendor where they get a better 
rate?
The implementation re-factored 
! 
public class PaymentService {! 
! 
public PaymentResult processPayment(CustomerOrder order, PaymentProcessor vendor) {! 
PaymentResult result = new PaymentResult();! 
if (vendor.name == 'PayPal') {! 
PaypalService paypal = new PaypalService();! 
return paypal.processPayment(order);! 
} else if (vendor.name == 'Stripe') {! 
StripeService stripe = new StripeService();! 
return stripe.processPayment(order);! 
} else {! 
// refuse to take money! 
}! 
}! 
}! 
!
Multiple vendors now supported but… 
But with each new vendor you add… 
• Dependencies to customers who don’t use the vendor 
• Multiple if/else statements 
• Multiple Service implementations that achieve the same result 
• RISK when adding new vendors…
Take Control of Your App 
“Don’t call me, I’ll call you…”
Dependency Injection Explained 
Dependency Injection is a technique to separate the creation of dependencies from 
the main class under consideration. 
Typically dependencies are injected in class construction or through interfaces.
Best Practice Implementation 
public class PaymentService {! 
! 
private PaymentServiceProvider serviceProvider;! 
! 
// Constructor injection! 
public PaymentService(PaymentServiceProvider serviceProvider) {! 
this.serviceProvider = serviceProvider;! 
}! 
! 
public PaymentResult processPayment(CustomerOrder order) {! 
return this.serviceProvider.processPayment(order);! 
}! 
! 
// Interface for stub! 
public interface PaymentServiceProvider {! 
PaymentResult processPayment(CustomerOrder order);! 
}! 
! 
}!
The benefits of DI with Custom Metadata 
Apex Type + Custom Metadata + Dependency Injection = LIKE! 
Customer environment configurations can completely change the behavior of logic 
driven from compiled code in a managed package leaving… 
– Your customers more flexible and in control of their process (good thing) 
– Your R&D busy innovating not re-factoring (good thing) 
– Your app sustainable for years to come (good thing)
How to get started today? 
http://fonteva.io 
Learn how to build a Twitter Integration WITHOUT WRITING A SINGLE LINE OF 
CODE using our Framework DI/IoC container. 
Join me and Aaron Slettehaugh (Product Manager, Custom Platform, 
Salesforce.com) 
TODAY, 12:15 PM @ Moscone Center West 2011 
Learn how you can use Custom Platform, a brand new Force.com feature, 
along with our Framework, to build killer apps that last!
Check out the new Partner Community 
https://partners.salesforce.com/
Connect with Partners in the Partner Zone 
The Westin Hotel, Market Street 
2nd Floor – Metropolitan Ballroom 
INNOVATE with the leading technology 
• Demos of new Salesforce technology 
CONNECT with members of the partner community 
• Partner Community Theater 
• Networking areas 
• Welcome reception and daily lunch service 
GROW your business with resources 
• 70+ partner-specific sessions 
• ‘Ask the Experts’ consultation stations
AppBash 2014 on Wednesday Night!
Suggested Sessions and New Partner Community Page 
• Build Your Own Platform on Force.com - Wednesday, 12:15 PM - 12:55 PM, Moscone Center West 2011 
• Advanced Apex Enterprise Patterns - Thursday, 11:30 AM - 12:10 PM, Moscone Center West 2006 
http://p.force.com/designpatterns 
• Session slides 
• Session recording (available in a few weeks) 
• Pattern libraries links 
Please take the session survey it really helps us

More Related Content

What's hot

Tests supporting multiple mobile platforms
Tests supporting multiple mobile platformsTests supporting multiple mobile platforms
Tests supporting multiple mobile platformsvodqancr
 
Application Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentApplication Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentChris O'Brien
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 Fabio Franzini
 
SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...
SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...
SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...NCCOMMS
 
Salesforce Coding techniques that keep your admins happy (DF13)
Salesforce Coding techniques that keep your admins happy (DF13)Salesforce Coding techniques that keep your admins happy (DF13)
Salesforce Coding techniques that keep your admins happy (DF13)Roy Gilad
 
Sviluppare app per office
Sviluppare app per officeSviluppare app per office
Sviluppare app per officeFabio Franzini
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsFabio Franzini
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsSalesforce Developers
 
API Testing with Open Source Code and Cucumber
API Testing with Open Source Code and CucumberAPI Testing with Open Source Code and Cucumber
API Testing with Open Source Code and CucumberSmartBear
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 
Salesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any PlatformSalesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any Platformandyinthecloud
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Peyman Fakharian
 
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Vivek Chawla
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Mike Melusky
 
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...Sencha
 
Application innovation & Developer Productivity
Application innovation & Developer ProductivityApplication innovation & Developer Productivity
Application innovation & Developer ProductivityKushan Lahiru Perera
 
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianAPI Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianVahid Rahimian
 

What's hot (20)

Tests supporting multiple mobile platforms
Tests supporting multiple mobile platformsTests supporting multiple mobile platforms
Tests supporting multiple mobile platforms
 
Application Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentApplication Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 development
 
tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365 tTecniche di sviluppo mobile per share point 2013 e office 365
tTecniche di sviluppo mobile per share point 2013 e office 365
 
SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...
SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...
SPCA2013 - It’s Me, and Here’s My ProofIdentity & Authentication in SharePoin...
 
Salesforce Coding techniques that keep your admins happy (DF13)
Salesforce Coding techniques that keep your admins happy (DF13)Salesforce Coding techniques that keep your admins happy (DF13)
Salesforce Coding techniques that keep your admins happy (DF13)
 
Sviluppare app per office
Sviluppare app per officeSviluppare app per office
Sviluppare app per office
 
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjsCodemotion 2013 - Designing complex applications using html5 and knockoutjs
Codemotion 2013 - Designing complex applications using html5 and knockoutjs
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
 
API Testing with Open Source Code and Cucumber
API Testing with Open Source Code and CucumberAPI Testing with Open Source Code and Cucumber
API Testing with Open Source Code and Cucumber
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
Salesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any PlatformSalesforce World Tour 2016 : Lightning Out : Components on any Platform
Salesforce World Tour 2016 : Lightning Out : Components on any Platform
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
 
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
Five Enterprise Best Practices That EVERY Salesforce Org Can Use (DF15 Session)
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
 
PHP Framework Battle
PHP Framework BattlePHP Framework Battle
PHP Framework Battle
 
Widgets neil
Widgets neilWidgets neil
Widgets neil
 
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
SenchaCon 2016: Cross-Platform Mobile App Development with Cordova and Visual...
 
Application innovation & Developer Productivity
Application innovation & Developer ProductivityApplication innovation & Developer Productivity
Application innovation & Developer Productivity
 
Cross Platform Mobile Development
Cross Platform Mobile DevelopmentCross Platform Mobile Development
Cross Platform Mobile Development
 
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid RahimianAPI Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
API Design, A Quick Guide to REST, SOAP, gRPC, and GraphQL, By Vahid Rahimian
 

Similar to Design Patterns Every ISV Needs to Know (October 15, 2014)

Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Salesforce Partners
 
Force.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.comForce.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.comSalesforce Developers
 
Designing custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.comDesigning custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.comSteven Herod
 
Spring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSpring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSalesforce Developers
 
Salesforce Campus Tour - Declarative
Salesforce Campus Tour - DeclarativeSalesforce Campus Tour - Declarative
Salesforce Campus Tour - DeclarativeJames Ward
 
Designing Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comDesigning Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comSalesforce Developers
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsOur API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsDreamforce
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforceMark Adcock
 
Salesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer IntroSalesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer IntroJames Ward
 
[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter Chittum[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter ChittumBeMyApp
 
Process Automation Showdown Session 1
Process Automation Showdown Session 1Process Automation Showdown Session 1
Process Automation Showdown Session 1Michael Gill
 
Process Automation Showdown Session 2
Process Automation Showdown Session 2Process Automation Showdown Session 2
Process Automation Showdown Session 2Michael Gill
 
Dreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use casesDreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use casesVincent Spehner
 
Get ready for your platform developer i certification webinar
Get ready for your platform developer i certification   webinarGet ready for your platform developer i certification   webinar
Get ready for your platform developer i certification webinarJackGuo20
 
CloudOps evening presentation from Salesforce.com
CloudOps evening presentation from Salesforce.comCloudOps evening presentation from Salesforce.com
CloudOps evening presentation from Salesforce.comAlistair Croll
 
Building Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIBuilding Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIJeff Douglas
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackCarolEnLaNube
 
Lightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE EvolvedLightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE EvolvedSalesforce Developers
 

Similar to Design Patterns Every ISV Needs to Know (October 15, 2014) (20)

Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)Design Patterns: ISV Recipes for Success (Dreamforce 2015)
Design Patterns: ISV Recipes for Success (Dreamforce 2015)
 
Force.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.comForce.com Friday: Intro to Force.com
Force.com Friday: Intro to Force.com
 
Designing custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.comDesigning custom REST and SOAP interfaces on Force.com
Designing custom REST and SOAP interfaces on Force.com
 
Spring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview WebinarSpring '14 Release Developer Preview Webinar
Spring '14 Release Developer Preview Webinar
 
Using the Google SOAP API
Using the Google SOAP APIUsing the Google SOAP API
Using the Google SOAP API
 
Salesforce Campus Tour - Declarative
Salesforce Campus Tour - DeclarativeSalesforce Campus Tour - Declarative
Salesforce Campus Tour - Declarative
 
Designing Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.comDesigning Custom REST and SOAP Interfaces on Force.com
Designing Custom REST and SOAP Interfaces on Force.com
 
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible AppsOur API Evolution: From Metadata to Tooling API for Building Incredible Apps
Our API Evolution: From Metadata to Tooling API for Building Incredible Apps
 
Integrating with salesforce
Integrating with salesforceIntegrating with salesforce
Integrating with salesforce
 
Salesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer IntroSalesforce Campus Tour - Developer Intro
Salesforce Campus Tour - Developer Intro
 
[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter Chittum[MBF2] Plate-forme Salesforce par Peter Chittum
[MBF2] Plate-forme Salesforce par Peter Chittum
 
Process Automation Showdown Session 1
Process Automation Showdown Session 1Process Automation Showdown Session 1
Process Automation Showdown Session 1
 
Process Automation Showdown Session 2
Process Automation Showdown Session 2Process Automation Showdown Session 2
Process Automation Showdown Session 2
 
Dreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use casesDreamforce 2013 - Heroku 5 use cases
Dreamforce 2013 - Heroku 5 use cases
 
Get ready for your platform developer i certification webinar
Get ready for your platform developer i certification   webinarGet ready for your platform developer i certification   webinar
Get ready for your platform developer i certification webinar
 
Force.com Friday - Intro to Visualforce
Force.com Friday - Intro to VisualforceForce.com Friday - Intro to Visualforce
Force.com Friday - Intro to Visualforce
 
CloudOps evening presentation from Salesforce.com
CloudOps evening presentation from Salesforce.comCloudOps evening presentation from Salesforce.com
CloudOps evening presentation from Salesforce.com
 
Building Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling APIBuilding Command-line Tools with the Tooling API
Building Command-line Tools with the Tooling API
 
Elevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance TrackElevate Madrid Essentials - Advance Track
Elevate Madrid Essentials - Advance Track
 
Lightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE EvolvedLightning Developer Experience, Eclipse IDE Evolved
Lightning Developer Experience, Eclipse IDE Evolved
 

More from Salesforce Partners

ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)Salesforce Partners
 
Partner Roadmap Webinar (August 3, 2017)
Partner Roadmap Webinar (August 3, 2017)Partner Roadmap Webinar (August 3, 2017)
Partner Roadmap Webinar (August 3, 2017)Salesforce Partners
 
Lightning Now for Consulting Partners
Lightning Now for Consulting PartnersLightning Now for Consulting Partners
Lightning Now for Consulting PartnersSalesforce Partners
 
ISV Monthly Tech Enablement (July 2017)
ISV Monthly Tech Enablement (July 2017)ISV Monthly Tech Enablement (July 2017)
ISV Monthly Tech Enablement (July 2017)Salesforce Partners
 
Salesforce University - Guide to Certification Paths
Salesforce University - Guide to Certification PathsSalesforce University - Guide to Certification Paths
Salesforce University - Guide to Certification PathsSalesforce Partners
 
Salesforce Proficiency Pack for Administrators
Salesforce Proficiency Pack for AdministratorsSalesforce Proficiency Pack for Administrators
Salesforce Proficiency Pack for AdministratorsSalesforce Partners
 
Partner Roadmap Webinar (July 6, 2017)
Partner Roadmap Webinar (July 6, 2017)Partner Roadmap Webinar (July 6, 2017)
Partner Roadmap Webinar (July 6, 2017)Salesforce Partners
 
Environment Hub Fundamentals (Salesforce Partners)
Environment Hub Fundamentals (Salesforce Partners)Environment Hub Fundamentals (Salesforce Partners)
Environment Hub Fundamentals (Salesforce Partners)Salesforce Partners
 
Demo Environment Best Practices (Salesforce Partners)
Demo Environment Best Practices (Salesforce Partners)Demo Environment Best Practices (Salesforce Partners)
Demo Environment Best Practices (Salesforce Partners)Salesforce Partners
 
Choosing the Right Demo Environment (Salesforce Partners)
Choosing the Right Demo Environment (Salesforce Partners)Choosing the Right Demo Environment (Salesforce Partners)
Choosing the Right Demo Environment (Salesforce Partners)Salesforce Partners
 
Salesforce Sales Professional Exam Prep
Salesforce Sales Professional Exam PrepSalesforce Sales Professional Exam Prep
Salesforce Sales Professional Exam PrepSalesforce Partners
 
Sales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best PracticesSales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best PracticesSalesforce Partners
 
AppExchange Tech Enablement June 2017
AppExchange Tech Enablement June 2017AppExchange Tech Enablement June 2017
AppExchange Tech Enablement June 2017Salesforce Partners
 
Roadmap Webinar Summer '17 (June 1, 2017)
Roadmap Webinar Summer '17 (June 1, 2017)Roadmap Webinar Summer '17 (June 1, 2017)
Roadmap Webinar Summer '17 (June 1, 2017)Salesforce Partners
 
FSL Implementation Guidance Part 1 (May 10, 2017)
FSL Implementation Guidance Part 1 (May 10, 2017)FSL Implementation Guidance Part 1 (May 10, 2017)
FSL Implementation Guidance Part 1 (May 10, 2017)Salesforce Partners
 
ISV Monthly Tech Enablement (May 18, 2017)
ISV Monthly Tech Enablement (May 18, 2017)ISV Monthly Tech Enablement (May 18, 2017)
ISV Monthly Tech Enablement (May 18, 2017)Salesforce Partners
 
Sales Cloud Lightning Migration Best Practices (May 12, 2017)
Sales Cloud Lightning Migration Best Practices (May 12, 2017)Sales Cloud Lightning Migration Best Practices (May 12, 2017)
Sales Cloud Lightning Migration Best Practices (May 12, 2017)Salesforce Partners
 
FSL Implementation Guidance Part 1
FSL Implementation Guidance Part 1FSL Implementation Guidance Part 1
FSL Implementation Guidance Part 1Salesforce Partners
 

More from Salesforce Partners (20)

ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)
 
Partner Roadmap Webinar (August 3, 2017)
Partner Roadmap Webinar (August 3, 2017)Partner Roadmap Webinar (August 3, 2017)
Partner Roadmap Webinar (August 3, 2017)
 
Lightning Now for Consulting Partners
Lightning Now for Consulting PartnersLightning Now for Consulting Partners
Lightning Now for Consulting Partners
 
ISV Monthly Tech Enablement (July 2017)
ISV Monthly Tech Enablement (July 2017)ISV Monthly Tech Enablement (July 2017)
ISV Monthly Tech Enablement (July 2017)
 
Salesforce University - Guide to Certification Paths
Salesforce University - Guide to Certification PathsSalesforce University - Guide to Certification Paths
Salesforce University - Guide to Certification Paths
 
Salesforce Proficiency Pack for Administrators
Salesforce Proficiency Pack for AdministratorsSalesforce Proficiency Pack for Administrators
Salesforce Proficiency Pack for Administrators
 
Partner Roadmap Webinar (July 6, 2017)
Partner Roadmap Webinar (July 6, 2017)Partner Roadmap Webinar (July 6, 2017)
Partner Roadmap Webinar (July 6, 2017)
 
Environment Hub Fundamentals (Salesforce Partners)
Environment Hub Fundamentals (Salesforce Partners)Environment Hub Fundamentals (Salesforce Partners)
Environment Hub Fundamentals (Salesforce Partners)
 
Demo Environment Best Practices (Salesforce Partners)
Demo Environment Best Practices (Salesforce Partners)Demo Environment Best Practices (Salesforce Partners)
Demo Environment Best Practices (Salesforce Partners)
 
Choosing the Right Demo Environment (Salesforce Partners)
Choosing the Right Demo Environment (Salesforce Partners)Choosing the Right Demo Environment (Salesforce Partners)
Choosing the Right Demo Environment (Salesforce Partners)
 
Salesforce Sales Professional Exam Prep
Salesforce Sales Professional Exam PrepSalesforce Sales Professional Exam Prep
Salesforce Sales Professional Exam Prep
 
Einstein Analytics for Partners
Einstein Analytics for PartnersEinstein Analytics for Partners
Einstein Analytics for Partners
 
Sales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best PracticesSales Cloud Lightning Migration Best Practices
Sales Cloud Lightning Migration Best Practices
 
AppExchange Tech Enablement June 2017
AppExchange Tech Enablement June 2017AppExchange Tech Enablement June 2017
AppExchange Tech Enablement June 2017
 
Roadmap Webinar Summer '17 (June 1, 2017)
Roadmap Webinar Summer '17 (June 1, 2017)Roadmap Webinar Summer '17 (June 1, 2017)
Roadmap Webinar Summer '17 (June 1, 2017)
 
FSL Implementation Guidance Part 1 (May 10, 2017)
FSL Implementation Guidance Part 1 (May 10, 2017)FSL Implementation Guidance Part 1 (May 10, 2017)
FSL Implementation Guidance Part 1 (May 10, 2017)
 
AMP Fall & Winter '17 Packages
AMP Fall & Winter '17 Packages AMP Fall & Winter '17 Packages
AMP Fall & Winter '17 Packages
 
ISV Monthly Tech Enablement (May 18, 2017)
ISV Monthly Tech Enablement (May 18, 2017)ISV Monthly Tech Enablement (May 18, 2017)
ISV Monthly Tech Enablement (May 18, 2017)
 
Sales Cloud Lightning Migration Best Practices (May 12, 2017)
Sales Cloud Lightning Migration Best Practices (May 12, 2017)Sales Cloud Lightning Migration Best Practices (May 12, 2017)
Sales Cloud Lightning Migration Best Practices (May 12, 2017)
 
FSL Implementation Guidance Part 1
FSL Implementation Guidance Part 1FSL Implementation Guidance Part 1
FSL Implementation Guidance Part 1
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 

Design Patterns Every ISV Needs to Know (October 15, 2014)

  • 1. Design Patterns Every ISV Needs to Know Andrey Volosevich Senior ISV Technical Evangelist salesforce.com @andreyvol Mac Anderson CTO, Fonteva @macscloud Ross Belmont Chief of UX, Appiphony @rossbelmont
  • 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 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.
  • 3. Agenda: Design Patterns Every ISV Needs to Know • Top Pattern in 2014: Enforcing Data Access in Apex • Configuration Patterns for Testing and Flexibility • Architecting Large Apps using Dependency Injection Principles • Q & A
  • 4. “I wish we had done this earlier…”
  • 5. Top Pattern in 2014 Enforcing Data Access in Apex Andrey Volosevich, salesforce.com Senior ISV Technical Evangelist
  • 6. CRUD/FLS Enforcement: Example [Select Name, Net_Worth__c from Investor__c Where Id = :xxx];
  • 8. CRUD/FLS Enforcement: Example [Select Name, Net_Worth__c from Investor__c Where Id = :xxx]; Your app is not respecting my Data Security Policy???!!! What?!
  • 9. CRUD/FLS Enforcement FLS Field Level Access CRUD Object Level Access Record Sharing
  • 10. CRUD/FLS Enforcement FLS Field Level Access CRUD Object Level Access Record Sharing
  • 11. CRUD/FLS Enforcement FLS Field Level Access CRUD Object Level Access Record Sharing Apex does not enforce Object and Field level access. Visualforce does enforce but only for Concrete SObject Bindings FLS Enforced: <apex:outputField value=”{!Investor__c.NetWorth__c}”/> FLS Not Enforced: <apex:outputText value=”{!getNetWorth}”/>
  • 12. CRUD/FLS Enforcement: Schema Reflection • Use Reflection C R U D Field access implicitly checks for object access, no need to check both
  • 13. CRUD/FLS Enforcement: Checking at Runtime • Checking access for multiple fields dynamically Keep mind, there are no more limits on # of Schema describe statements
  • 14. CRUD/FLS Enforcement – Encapsulate, Use Libraries • Don’t Repeat Yourself!! Abstract away complexity, avoid duplication, keep business logic clean force-dot-com-esapi also does input validation and output encoding http://p.force.com/esapi
  • 15. CRUD/FLS Enforcement • Write unit tests for different User Profiles – runAs()
  • 16. CRUD/FLS Enforcement • Write unit tests for different User Profiles – runAs() • Build secure coding and good design practices in your team’s DNA
  • 17. CRUD/FLS Enforcement • Write unit tests for different User Profiles – runAs() • Build secure coding and good design practices in your team’s DNA • Platform gives your customer control – do not take it away.
  • 18. CRUD/FLS Enforcement • Write unit tests for different User Profiles – runAs() • Build secure coding and good design practices in your team’s DNA • Platform gives your customer control – do not take it away. • Be kind to your future self!
  • 19. OK, this is helpful. But I have a complex app, what else you got?
  • 20. Beyond CRUD/FLS: Community Lib fflib-apex-common • Example: QueryFactory Other Enterprise Patterns: Service Layer, Selector Layer, Domain Layer, Apex Mocks https://github.com/financialforcedev/fflib-apex-common
  • 21. Ross Belmont Design Patterns for Flexibility Chief of UX, Appiphony @rossbelmont
  • 22. Two Examples • Secure testing of external web services • Importing a diverse data set while architecting for flexibility
  • 25. How Will the App Know the “Right” Endpoint?
  • 26. Custom Code Populates a Protected Custom Setting
  • 27. “Testing Flag” Alters the Custom Code’s Behavior
  • 28. Benefits of This Approach • The app references the correct endpoint at the correct time • Only you (as the ISV) can specify the external endpoint – If customers configured it themselves, there would be a support burden – No one can set the endpoint maliciously for a “man in the middle” attack • Swapping the endpoints is simple (just install the extension package) • The extra “testing flag” object doesn’t pollute customer environments
  • 29. Importing a Diverse Data Set Architecting for flexibility to serve a broader customer base
  • 30. External Web Service Creates a “Dossier”
  • 31. • Creates different marketing campaigns targeted at alumni of specific universities Different Types of Customers • Drives marketing based on traditional demographic segmentation – Age – Gender
  • 32. Contact and Dossier: Objects in the Org
  • 33. Contact Looks Up to Dossier
  • 34. Subscriber A Can Report on Age, Gender
  • 35. Subscriber B Can Focus on Alumni Instead
  • 36. Benefits of This Approach • Customers can add exactly what they want to the Contact record and layout, and nothing more • Reporting is simplified by flattening down to the Contact record • A Dossier can be attached to Leads, etc. in the future • Easy to serve new marketing initiatives in the future – Recent grads vs. 20 year alumni, for example (incorporating Age)
  • 37. Mac Anderson CTO, Fonteva
  • 38. The Challenges of Building Software in the Cloud • Upgrading customers • Compatibility with customer environment configurations – Other managed packages – Salesforce.com features (Person Accounts, State + Country Picklists, etc…) – Misc. customer built workflows and triggers • Package Bloat • Force.com Governor Limit compliance
  • 39. 3 Common Pitfalls to Avoid • Don’t build a killer demo app unless you like big balls of mud • Never say “Our customer’s won’t do that…” with your code • Solve the same problem the same way all the time
  • 40. Loosely Coupled Systems Put ISV’s in the Driver Seat • Organized as a web of modular, interacting objects • Cohesive with little to no dependencies • Flexible • Consistent
  • 41. A simple concrete example Feature: “Allow customers to process credit card payments online for orders managed in our app.”
  • 42. A simple, but flawed approach public class PaymentService {! ! public PaymentResult processPayment(CustomerOrder order) {! PaypalService paypal = new PaypalService();! PaymentResult = paypal.processPayment(order);! return result;! }! ! }!
  • 43. Success! You can process payments… But what happens when… • You sell your app to a customer in the UK where PayPal does not support Direct Debits? • Your biggest prospect is Stripe : ) • Your customers are demanding support for another vendor where they get a better rate?
  • 44. The implementation re-factored ! public class PaymentService {! ! public PaymentResult processPayment(CustomerOrder order, PaymentProcessor vendor) {! PaymentResult result = new PaymentResult();! if (vendor.name == 'PayPal') {! PaypalService paypal = new PaypalService();! return paypal.processPayment(order);! } else if (vendor.name == 'Stripe') {! StripeService stripe = new StripeService();! return stripe.processPayment(order);! } else {! // refuse to take money! }! }! }! !
  • 45. Multiple vendors now supported but… But with each new vendor you add… • Dependencies to customers who don’t use the vendor • Multiple if/else statements • Multiple Service implementations that achieve the same result • RISK when adding new vendors…
  • 46. Take Control of Your App “Don’t call me, I’ll call you…”
  • 47. Dependency Injection Explained Dependency Injection is a technique to separate the creation of dependencies from the main class under consideration. Typically dependencies are injected in class construction or through interfaces.
  • 48. Best Practice Implementation public class PaymentService {! ! private PaymentServiceProvider serviceProvider;! ! // Constructor injection! public PaymentService(PaymentServiceProvider serviceProvider) {! this.serviceProvider = serviceProvider;! }! ! public PaymentResult processPayment(CustomerOrder order) {! return this.serviceProvider.processPayment(order);! }! ! // Interface for stub! public interface PaymentServiceProvider {! PaymentResult processPayment(CustomerOrder order);! }! ! }!
  • 49. The benefits of DI with Custom Metadata Apex Type + Custom Metadata + Dependency Injection = LIKE! Customer environment configurations can completely change the behavior of logic driven from compiled code in a managed package leaving… – Your customers more flexible and in control of their process (good thing) – Your R&D busy innovating not re-factoring (good thing) – Your app sustainable for years to come (good thing)
  • 50. How to get started today? http://fonteva.io Learn how to build a Twitter Integration WITHOUT WRITING A SINGLE LINE OF CODE using our Framework DI/IoC container. Join me and Aaron Slettehaugh (Product Manager, Custom Platform, Salesforce.com) TODAY, 12:15 PM @ Moscone Center West 2011 Learn how you can use Custom Platform, a brand new Force.com feature, along with our Framework, to build killer apps that last!
  • 51.
  • 52. Check out the new Partner Community https://partners.salesforce.com/
  • 53. Connect with Partners in the Partner Zone The Westin Hotel, Market Street 2nd Floor – Metropolitan Ballroom INNOVATE with the leading technology • Demos of new Salesforce technology CONNECT with members of the partner community • Partner Community Theater • Networking areas • Welcome reception and daily lunch service GROW your business with resources • 70+ partner-specific sessions • ‘Ask the Experts’ consultation stations
  • 54. AppBash 2014 on Wednesday Night!
  • 55. Suggested Sessions and New Partner Community Page • Build Your Own Platform on Force.com - Wednesday, 12:15 PM - 12:55 PM, Moscone Center West 2011 • Advanced Apex Enterprise Patterns - Thursday, 11:30 AM - 12:10 PM, Moscone Center West 2006 http://p.force.com/designpatterns • Session slides • Session recording (available in a few weeks) • Pattern libraries links Please take the session survey it really helps us