Development with the Force.com Platform Building Business Applications in the Cloud

  • ISBN13:


  • ISBN10:


  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2011-07-01
  • Publisher: Addison-Wesley Professional
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $49.99 Save up to $2.00
  • eBook
    Add to Cart


Supplemental Materials

What is included with this book?

  • The eBook copy of this book is not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.


Build Cloud-Based Enterprise Applications Fast-and Drive More Value at Lower Cost! Using the Force.com platform, enterprise developers can build and deploy powerful applications far more rapidly than traditional J2EE, Microsoft .NET, or LAMP technology stacks permit. With a free subscription to the Force.com platform, developers can build apps that solve virtually any enterprise challenge with remarkable value, scalability, and reliability. This is the first book that brings together all the practical, technical guidance you need to make the most of Force.com in your own custom enterprise applications. Leading Force.com developer Jason Ouellette helps you identify suitable uses for Force.com and provides all the insights and sample code needed to rapidly prototype, deploy, and integrate with production-quality Force.com applications. Ouellette provides realistic code examples at every step, emphasizing maintainability, flexibility, and interoperability throughout. Writing for developers, architects, and analysts, he shows how to Create custom enterprise apps on Force.com in days or weeks, not months or years Leverage Force.com's extensive capabilities for storing, managing, and securing data Quickly create sophisticated business logic with the Apex programming language Use Visualforce to construct custom user interfaces Establish automated or semiautomated workflows Implement Ajax behaviors without writing JavaScript code or learning new JavaScript libraries Integrate Force.com-based data and processes with other applications, inside and outside the platform Display reports as state-of-the-art dashboards Integrate Force.com applications with existing Single Sign-On systems NOTE: This Safari Rough Cut is an early version of the manuscript currently being written by the author. New chapters and content will be posted here as the author completes them. Feedback that will help the author improve upon the content is welcome.

Author Biography

Jason Ouellette led the development of popular AppExchange applications such as Appirio Cloud Sync, CloudWorks, and Professional Services Enterprise. He is an independent technology consultant with deep experience in cloud and enterprise integration. He has been inventing cutting-edge enterprise software for more than 15 years at Appirio, Composite Software, and webMethods. He was recognized by Salesforce as a Force.com MVP in 2011 and Force.com Developer Hero in 2009.


He lives with his wife and two geriatric cats in San Francisco, California.

Table of Contents

Preface     xvi

Foreword     xxi

Chapter 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     13

Tools and Resources     16

Sample Application: Services Manager     18

Background    18

User Roles    19

Development Plan    19

Summary     20

Chapter 2: Database Essentials    23

Overview of Force.com’s Database     23

Objects     23

Fields     25

Relationships     27

Query Language    28

Data Integration     31

Working with Custom Objects    33

Force.com Developer Edition    33

Tools for Custom Objects     35

Object Creation     36

Field Creation     39

Entering and Browsing Data     42

Sample Application: Data Model     45

Logical Data Model     45

Force.com Data Model    50

Implementing the Data Model    52

Importing Data    58

Summary     64

Chapter 3: Database Security    65

Overview of Database Security     65

Object-Level Security     67

Profiles     68

Field-Level Security     70

Record-Level Security    71

Record Ownership     72

User Groups     72

Sharing Model     73

Sample Application: Securing Data    77

Designing the Security Model     78

Implementing the Security Model     81

Testing the Security Model     86

Summary     91

Chapter 4: Additional Database Features     93

Dependent Fields    94

Record Types    95

Defining Record Types    95

Securing Record Types    97

Using Record Types    99

Roll-Up Summary Fields     100

Field History Tracking    102

Tags     104

Enabling Tags    104

Using Tags    104

Force.com Connect Offline    104

Administration of Force.com Connect Offline     105

Using Force.com Connect Offline    106

Custom Settings    107

Using List Custom Settings    108

Using Hierarchy Custom Settings    109

Sample Application: Applying the Features    110

Dependent Fields for Skill Types    111

Roll-Up Summary Fields for Project Reporting    113

Force.com Connect Offline for Staffing    114

Summary    116

Chapter 5: Business Logic     119

Introduction to Apex     120

Introducing the Force.com IDE     121

Installation     121

Force.com Perspective    121

Force.com Projects    122

Problems View     123

Schema Explorer     123

Apex Test Runner View     124

Execute Anonymous View    124

Apex Language Basics    124

Variables     125

Operators     129

Arrays and Collections    130

Control Logic     132

Understanding Governor Limits    136

Database Integration in Apex     137

Database Records as Objects     137

Database Queries    139

Persisting Database Records     144

Database Triggers    146

Database Security in Apex    149

Object-Oriented Apex     149

Encapsulation     150

Information Hiding    154

Modularity    155

Inheritance    155

Polymorphism     157

Debugging and Testing    158

Debugging    158

Testing    161

Sample Application: Validating Timecards     162

Force.com IDE Setup    163

Creating the Trigger    163

Unit Testing    164

Summary     166

Chapter 6: Advanced Business Logic     169

Aggregate SOQL Queries    170

Aggregate Functions    170

Grouping Records    171

Grouping Records with Subtotals     172

Additional SOQL Features     174

Inner Join and Outer Join     174

Semi-Join and Anti-Join     176

Multi-Select Picklists     179

Salesforce Object Search Language (SOSL)     180

SOSL Basics    180

SOSL in Apex     181

Transaction Processing     182

Data Manipulation Language (DML) Database Methods    183

Savepoints    184

Record Locking     185

Apex Managed Sharing     187

Sharing Objects     187

Creating Sharing Rules in Apex    188

Sending and Receiving Email    192

Sending Email    193

Receiving Email     197

Dynamic Apex    200

Dynamic Database Queries    200

Schema Metadata     202

Custom Settings in Apex    204

Sample Application: Adding Email Notifications    206

Summary    207

Chapter 7: User Interfaces    209

Introduction to Visualforce     210

Overview of Visualforce     210

Getting Started with Visualforce     212

Visualforce Controllers    215

Standard Controllers    215

Custom Controllers     217

Controller Extensions    221

View Components     222

View Component Basics    222

Data Components    224

Action Components     227

Primitive Components    228

Force.com-Styled Components    229

Force.com User Interface Components    232

Visualforce and the Native User Interface    236

Standard Pages    237

Standard Buttons    240

Page Layouts     240

Custom Buttons and Links    240

Custom Tabs     242

Visualforce in Production    242

Debugging and Tuning    243

Security     245

Error Handling    247

Governor Limits     248

Unit Tests    249

Sample Application: Skills Matrix    250

Basic Implementation     251

Full Implementation    252

Implementation Walkthrough     252

Summary     259

Chapter 8: Advanced User Interfaces    261

Asynchronous Actions     261

Partial Page Refresh    262

Action as JavaScript Function    263

Action as Timed Event     264

Action as JavaScript Event    265

Indicating Action Status    266

Modular Visualforce     268

Static Resources    268

Inclusion     269

Composition     269

Custom Visualforce Components     271

Extending Visualforce     273

Using JavaScript Libraries    273

Adobe Flex and Visualforce    274

Force.com Sites     281

Sample Application: Enhanced Skills Matrix     285

Summary     288

Chapter 9: Batch Processing     291

Introduction to Batch Apex     292

Batch Apex Concepts     292

Understanding the Batchable Interface    293

Applications of Batch Apex     294

Getting Started with Batch Apex     295

Developing a Batch Apex Class     295

Working with Batch Apex Jobs     296

Using Stateful Batch Apex     299

Using an Iterable Batch Scope     300

Limits of Batch Apex     302

Testing Batch Apex     303

Scheduling Batch Apex    303

Developing Schedulable Code    304

Scheduling Batch Apex Jobs     304

Sample Application: Missing Timecard Report    306

Creating the Custom Object    307

Developing the Batch Apex Class    308

Testing the Missing Timecard Feature    310

Summary    310

Chapter 10: Integration    313

Force.com Integration Solutions    313

Outbound Messaging     314

Salesforce-to-Salesforce (S2S)     319

Developing Custom Integrations     329

Calling Web Services from Apex Code    329

Using HTTP Integration    331

Sample Application: Anonymous Benchmarking    334

Visualforce Page Design     334

Visualforce Controller Design    336

Integrating the Web Service    337

Sample Implementation     339

Summary     342

Chapter 11: Advanced Integration    345

Understanding Force.com Web Services    346

Basics of Force.com Web Services    346

Generating Stub Code    349

Logging In     351

Force.com Data Types in SOAP     355

Error Handling     356

Using the Enterprise API     357

Retrieving Records    357

Writing Records    359

Building Custom Web Services in Apex    362

Understanding Custom Web Services     362

Service Definition     363

Calling a Custom Web Service     364

Introduction to the Metadata API     365

Overview     366

Getting Started with the Metadata API     366

Using the Force.com REST API     368

Overview of Force.com REST API     368

Authentication     369

API Walkthrough     369

Sample Application: Database Integration     373

Integration Scenario     373

Implementation Strategy     373

Sample Implementation     374

Summary     377

Chapter 12: Additional Platform Features    379

Workflow and Approvals     379

Introduction to Workflow     380

Getting Started with Approval Processes     382

Introduction to Analytics     388

Working with Reports     389

Configuring Dashboards     392

Using Analytic Snapshots     393

Force.com for International Organizations     395

Multilingual Support     395

Using Multiple Currencies     398

Advanced Currency Management (ACM)      400

Using Single Sign-On     402

Federated Single Sign-On     402

Delegated Single Sign-On     407

Sample Application: Project Map Dashboard     410

Summary     416

Chapter 13: Social Applications     417

Overview of Chatter     418

Chatter Concepts     418

Configuring Chatter     419

Understanding the Chatter Data Model     424

Chatter Posts     425

Chatter Comments     429

Feed-Tracked Changes     430

Followed Records     431

Chatter in Visualforce     432

Sample Application: Follow Project Team     434

Summary     437

Index     439

Rewards Program

Write a Review