Coding the Salesforce1 Platform with ApexMay 22, 2014
What is Apex?
Programming language of the Salesforce1 Platform– Java style syntax
– Object orientated
– Strongly typed
– Billions of lines
Why use Apex?
Runs in the Cloud
Automatically Integrated to Your Data
In-Built Testing Framework
Backwardly Compatibility
You’re Never Alone in the Cloud
The Salesforce1 Platform is a Multi-Tenant Environment
What Can You Do With Apex?
Extend when configuration isn’t enough
Visualforce controllers
Database triggers
Custom web services
Email Services
Scheduled and batched tasks
Example Use Case
Keep the Contact address the same as the Account
BUT– Only in some circumstances
Example Trigger
Example Test Class
Quick Recap
Apex is a really powerful tool– Once we’ve tried “clicks” rather than code
– Is constrained by governor limits
Common programming paradigms– Object orientated
– Strongly typed
– Loops, Collections, Conditions
– Data Model awareness
What Next?
Try It!
Sign up for a developer org– developer.salesforce.com
Follow the apex workbook– Bit.ly/apexworkbook
Get help– developer.salesforce.com/forums