Development with the Force.com Platform: Building Business Applications in the Cloud, 3rd edition
Published by Addison-Wesley Professional (December 3, 2013) © 2014
- Jason Ouellette
eTextbook
- Available for purchase from all major ebook resellers, including InformIT.com.
- To request a review copy, click on the "Request a Review Copy" button.
- A print text (hardcover or paperback)Â
- Free shipping
- Also available for purchase as an ebook from all major ebook resellers, including InformIT.com
Master Force.com, Today’s Fastest, Most Flexible Cloud Development Platform
With Salesforce.com’s Force.com platform, you can build and deploy powerful cloud-based enterprise applications faster than ever before. Now, Jason Ouellette gives you all the practical, technical guidance you need to make the most of the newest Force.com releases in your own custom cloud applications.
Throughout, he adds new code and updated best practices for rapidly prototyping, building, and testing production-quality Force.com solutions. This edition’s extensive new coverage includes Developer Console, JSON, Streaming and Tooling APIs, Bulk API, Force.com Canvas, REST integration, support for Web MVC frameworks, Dynamic Apex and Visualforce, and an all-new chapter on mobile user interfaces.
Ouellette covers the entire platform: UIs, database design, analytics, security, and many other topics. His code examples emphasize maintainability, flexibility, and seamless integration—and you can run and adapt all of them with a free Force.com Developer Edition account. Coverage includes:
- Leveraging Force.com’s customizable infrastructure to deliver advanced Platform-as-a-Service (PaaS) solutions
- Understanding Force.com’s unique processes, tools, and architecture
- Developing a complete application, from requirements and use cases through deployment
- Using the Force.com database as a framework for highly flexible, maintainable applications
- Applying Force.com’s baked-in security, including user identity, data ownership, and fine-grained access control
- Constructing powerful business logic with Apex, SOQL, and SOSL
- Adopting asynchronous actions, Single Page Applications, and other advanced features in Web user interfaces
- Building intuitive user interfaces with Visualforce, and extending them to public-facing websites and mobile devices
- Creating smartphone/tablet-friendly apps with HTML5 and Visualforce
- Performing massive data-intensive tasks offline with Batch Apex
- Using Force.com integration options, including REST, SOAP, Canvas, and the Streaming, Bulk, Tooling, and Metadata APIs
- Developing internal social applications with Force.com’s Chatter collaboration tools
If you’re already building Web or mobile applications, take your next giant step into enterprise cloud development—with Development with the Force.com Platform, Third Edition.
All code examples in this book are available on Github at http://goo.gl/fjRqMX, and as a Force.com IDE project on Github at https://github.com/jmouel/dev-with-force-3e.
This edition has been extensively revised to reflect all six major Force.com releases since the Second Edition. Its massive updates include all this, and more:
- REST integration (instead of SOAP)
- All-new chapter on mobile user interface development (hybrid)
- Expanded Chatter coverage to reflect new features and better integration with external social platforms
- Many new security and sharing options, including Criteria-Based Sharing, Permission Sets (Org-Wide permission sets, separate Org-Wide sharing for external users), and User Sharing
- Database improvements: Database.com, new lookup relationship behaviors, geolocation custom field, State and Country picklists, improved rich text editor, and more
- New and upgraded tools, including Force.com Developer Console, Schema Builder, Force.com System Overview, Force.com Quick Start, Force.com Workbench, and Site.com
- APEX enhancements, including: JSON support, async testing, reflection, and much more
- Visualforce enhancements, including: JavaScript Remoting, Field Sets, Dynamic VF Components, Dynamic VF Bindings, Canvas, and Charting
- Streaming and Bulk Data APIs
- Batch Apex and Governor Limits
In addition, Ouelette has carefully removed content on marginalized or esoteric features such as Adobe Flex, Offline, SAML, and refocused his "Clicks Not Code" coverage on topics of more direct interest to application developers.
The full text downloaded to your computer
With eBooks you can:
- search for key concepts, words and phrases
- make highlights and notes as you study
- share your notes with friends
eBooks are downloaded to your computer and accessible either offline through the Bookshelf (available as a free download), available online and also via the iPad and Android apps.
Upon purchase, you'll gain instant access to this eBook.
1  Introducing Force.com   1
Force.com in the Cloud Computing Landscape   1
Platform as a Service (PaaS)Â Â Â 2
Force.com as a Platform   4
Force.com Services   7
Inside a Force.com Project   9
Project Selection   9
Team Selection   11
Lifecycle   12
Tools and Resources   15
Sample Application: Services Manager   17
Background   17
User Roles   18
Development Plan   19
Summary   19
2  Database Essentials   21
Overview of Force.com’s Database   21
Objects   22
Fields   23
Relationships   25
Query Language   26
Data Integration   29
Working with Custom Objects   32
Force.com Developer Edition   32
Tools for Custom Objects   33
Object Creation   35
Field Creation   38
Entering and Browsing Data   41
Additional Database Features   43
Sample Application: Data Model   49
Data Model Design Goals   49
Data Model Specification   50
Implementing the Data Model   58
Importing Data   64
Summary   69
3  Database Security   71
Overview of Database Security   71
Object-Level Security   74
Profiles   74
Permission Sets   76
Field-Level Security   77
Record-Level Security   79
Record Ownership   79
User Groups   80
Sharing Model   80
Sample Application: Securing Data   84
Designing the Security Model   85
Implementing the Security Model   88
Testing the Security Model   94
Summary   98
4  Business Logic   99
Introduction to Apex   100
Introducing the Force.com IDEÂ Â Â 101
Installation   101
Force.com Perspective   101
Force.com Projects   103
Problems View   103
Schema Explorer   103
Apex Test Runner View   103
Execute Anonymous View   104
Apex Language Basics   105
Variables   105
Operators   109
Arrays and Collections   110
Control Logic   113
Object-Oriented Apex   117
Understanding Governor Limits   120
Database Integration in Apex   120
Database Records as Objects   121
Database Queries   122
Persisting Database Records   128
Database Triggers   130
Database Security in Apex   133
Debugging Apex Using Developer Console   133
Checkpoints   133
Execution Logs   134
Unit Tests in Apex   136
Test Methods   136
Test Data   136
Running Tests   137
Sample Application: Validating Timecards   138
Force.com IDE Setup   138
Creating the Trigger   138
Unit Testing   140
Summary   142
5  Advanced Business Logic   143
Aggregate SOQL Queries   144
Aggregate Functions   144
Grouping Records   145
Grouping Records with Subtotals   146
Additional SOQL Features   148
Inner Join and Outer Join   148
Semi-Join and Anti-Join   150
Multi-Select Picklists   154
Salesforce Object Search Language (SOSL)Â Â Â 154
SOSL Basics   155
SOSL in Apex   155
Transaction Processing   156
Data Manipulation Language (DML) Database
Methods   157
Savepoints   159
Record Locking   161
Apex Managed Sharing   162
Sharing Objects   162
Creating Sharing Rules in Apex   163
Sending and Receiving Email   168
Sending Email   168
Receiving Email   172
Dynamic Apex   174
Dynamic Database Queries   175
Schema Metadata   177
Dynamic Instance Creation   179
Custom Settings in Apex   180
Sample Application: Adding Email Notifications   181
Summary   183
6  User Interfaces   185
Introduction to Visualforce   186
Overview of Visualforce   186
Getting Started with Visualforce   188
Visualforce Controllers   191
Standard Controllers   191
Custom Controllers   193
Controller Extensions   197
View Components   198
View Component Basics   198
Data Components   200
Action Components   203
Primitive Components   204
Force.com-Styled Components   205
Force.com User Interface Components   208
Visualforce and the Native User Interface   209
Standard Pages   210
Standard Buttons   213
Page Layouts   213
Custom Buttons and Links   215
Custom Tabs   215
Visualforce in Production   215
Debugging and Tuning   215
Security   218
Error Handling   220
Governor Limits   221
Unit Tests   222
Sample Application: Skills Matrix   222
Basic Implementation   224
Full Implementation   224
Implementation Walk-Through   225
Summary   232
7  Advanced User Interfaces   233
Asynchronous Actions   233
Partial Page Refresh   234
Action as JavaScript Function   235
Action as Timed Event   237
Action as JavaScript Event   237
Indicating Action Status   238
Modular Visualforce   240
Static Resources   241
Inclusion   242
Composition   242
Custom Visualforce Components   244
Dynamic Visualforce   246
Dynamic Field References   246
Component Generation   248
Single-Page Applications in Force.com   250
JavaScript Remoting   250
Force.com with AngularJSÂ Â Â 251
Introduction to Force.com Sites   254
Enabling and Creating a Site   254
Security Configuration   255
Adding Pages to a Site   256
Authenticating Users   257
Sample Application: Enhanced Skills Matrix   258
Summary   262
8  Mobile User Interfaces   263
Overview of Salesforce Mobile Technology   263
Salesforce Applications   264
Custom Applications   265
Getting Started with Mobile Web Applications   267
Frameworks   268
Data Access   269
Deployment   270
Sample Application: Mobile Timecard Entry   272
Summary   279
9  Batch Processing   281
Introduction to Batch Apex   282
Batch Apex Concepts   282
Understanding the Batchable Interface   283
Applications of Batch Apex   284
Getting Started with Batch Apex   285
Developing a Batch Apex Class   285
Working with Batch Apex Jobs   286
Using Stateful Batch Apex   289
Using an Iterable Batch Scope   290
Limits of Batch Apex   292
Testing Batch Apex   293
Scheduling Batch Apex   293
Developing Schedulable Code   293
Scheduling Batch Apex Jobs   294
Sample Application: Missing Timecard Report   296
Creating the Custom Object   297
Developing the Batch Apex Class   298
Testing the Missing Timecard Feature   299
Summary   300
10  Integration with Force.com   301
Apex Callouts   301
Calling RESTful Services from Apex   302
Calling SOAP Services from Apex   304
Calling into Force.com Using RESTÂ Â Â 306
Getting Started with Force.com REST APIÂ Â Â 306
Force.com REST API Walk-Through   308
Creating Custom Apex REST Web Services   312
Calling into Force.com Using SOAPÂ Â Â 314
Understanding Force.com SOAP APIÂ Â Â 314
Using the Enterprise APIÂ Â Â 322
Creating Custom Apex SOAP Web Services   326
Sample Application: Anonymous Benchmarking   329
Visualforce Page Design   330
Visualforce Controller Design   331
Integrating the SOAP Web Service   333
Sample Implementation   335
Summary   338
11  Advanced Integration   339
Introduction to the Force.com Streaming APIÂ Â Â 340
Overview   340
Getting Started with Force.com Streaming APIÂ Â Â 341
Working with the Force.com Bulk APIÂ Â Â 344
Overview   345
Importing Records   346
Exporting Records   347
Getting Started with Force.com Canvas   349
Overview   349
Getting Started with Force.com Canvas   350
Introduction to the Force.com Tooling APIÂ Â Â 354
Overview   355
Getting Started with Force.com Tooling APIÂ Â Â 355
Understanding the Force.com Metadata APIÂ Â Â 360
Overview   360
Getting Started with the Metadata APIÂ Â Â 361
Sample Application: Database Integration   363
Integration Scenario   363
Implementation Strategy   363
Sample Implementation   364
Summary   366
12  Social Applications   369
Overview of the Chatter Data Model   370
Chatter Posts   370
Chatter Comments   374
Feed-Tracked Changes   376
Followed Records   376
Using Chatter in Apex   378
Introduction to the Chatter REST APIÂ Â Â 379
Working with Chatter Visualforce Components   380
Sample Application: Follow Project Team   382
Summary   386
Index   387
Â
Â
Need help? Get in touch