Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Web Development

An Introduction to Force.com

Jason Ouellette is the Chief Architect for Appirio and author of Development with the Force.com Platform on which this article is based. Courtesy Addison-Wesley Professional. Copyright 2010 Pearson Education, Inc.

Phrases like "cloud computing" and "Platform as a Service" have many meanings put forth by many vendors. Cloud computing as a general concept spans every conceivable configuration of infrastructure. The potential benefits are reduced complexity and cost versus a traditional approach.The traditional approach is to invest in infrastructure by acquiring new infrastructure assets and staff or redeploying or optimizing existing investments. Cloud computing provides an alternative.

PaaS is a category within the umbrella of cloud computing. Cloud computing is a phrase to describe the movement of computing resources away from physical data centers or servers in a closet in your company and into the network, where they can be provisioned, accessed, and deprovisioned instantly.

Force.com is different from other PaaS solutions in its focus on business applications. Force.com is a part of Salesforce.com, which started as a SaaS Customer Relationship Management (CRM) vendor. But Force.com is unrelated to CRM. It provides the infrastructure commonly needed for any business application, customizable for the unique requirements of each business through a combination of code and configuration. This infrastructure is delivered to you as a service on the Internet.

Companies like Amazon, Microsoft, and Google provide PaaS products. In this article I introduce the mainstream PaaS products and include brief descriptions of their functionality. Consult the Web sites of each company for further information.

Amazon Web Services

Amazon Web Services refers to a family of cloud computing products.The most relevant to PaaS is Elastic Compute Cloud (EC2). EC2 is a general-purpose computing platform. You can provision virtual instances of Windows or Linux machines at will, loading them with your own custom operating-system image or one prebuilt by Amazon or the community. These instances run until you shut them down, and you are billed for usage of resources such as CPU, disk, and network.

A raw machine with an OS on it is a great start, but to build a business application requires you to install, manage access to, maintain, monitor, patch and upgrade, back up, plan to scale, and generally care and feed in perpetuity an application platform on the EC2 instance. If your organization has the skills to build on .NET, J2EE, LAMP, or other application stacks, plus the OS, database administration, and IT operations experience, EC2's virtual servers in the cloud could be a strong alternative to running your own servers in-house.

Amazon provides various other products that compliment EC2.These include Simple Queue Service (SQS) for publish-and-subscribe-style integration between applications, Simple DB for managing schemaless data, and Simple Storage Service (S3), a content repository.

Microsoft Azure Services Platform

At this writing, Microsoft's Windows Azure is not yet commercially available. Microsoft's entrance into the PaaS world will likely offer some unique value, particularly for companies seeking to leverage the cost savings of cloud computing but preserve their existing investments in .NET, SQL Server, SharePoint, and other Microsoft products. Azure is marketed as a blend of on-premise software and services in the cloud. It consists of two parts. The first part is Windows Azure, a new operating system that can utilize Microsoft's data centers for general computation and storage.The second part encompasses three categories of cloud services: .NET Services, SQL Services, and SharePoint Services. These services map to existing Microsoft products for computing, database, and collaboration.The intent is presumably to enable Microsoft's existing development community to pick and choose how their applications are partitioned between local and hosted resources without costly rewrites or redeployment. Pricing is not yet available, but Microsoft says it will charge for resource consumption, defined as some combination of CPU, network bandwidth, storage, and number of transactions.

Google App Engine

Google's App Engine is a platform designed for hosting Web applications. App Engine is like having an unlimited number of EC2 instances working for you, preconfigured with a distributed data store and Python or Java-based application server, but without the IT operations effort required by EC2. App Engine includes tools for managing the data store, monitoring your site and its resource consumption, and debugging and logging.

App Engine is free for up to 500MB of storage and 5 million page views per month.Applications requiring more storage or bandwidth can purchase it by setting a maximum daily dollar amount they're willing to spend, divided into five buckets: CPU time, bandwidth in, bandwidth out, storage, and email.


Force.com is targeted toward corporate application developers and independent software vendors. Unlike the other PaaS offerings, it does not expose developers directly to its own infrastructure. Developers do not provision CPU time, disk, or instances of running operating systems. Instead, Force.com provides a custom application platform centered around the relational database, one resembling an application server stack you might be familiar with from working with .NET, J2EE, or LAMP.

Although it integrates with other technologies using open standards such as SOAP and REST, the programming languages and metadata representations used to build applications are proprietary to Force.com. This is unique among the PaaS products but not unreasonable when examined in depth. Force.com operates at a significantly higher level of abstraction than the other PaaS products, promising dramatically higher productivity to developers in return for their investment and trust in a single-vendor solution.

Force.com is free for developers. Production applications are priced primarily by storage used and number of unique users.


Facebook is a Web site for connecting with your friends, but it also provides developers with ways to build their own socially aware applications.These applications leverage the Facebook service to create new ways for users to interact while online.The Facebook platform is also accessible to applications not built inside Facebook, exposing the "social graph" (the network of relationships between users) where permitted.

Much of the value of Facebook as a platform stems from its large user base and consistent -- yet extensible -- user experience. It is a set of services for adding social context to applications. Unlike Force.com and App Engine, for example, Facebook has no facility to host custom applications.

Force.com as a Platform

Force.com is different from other PaaS solutions in its focus on business applications. Force.com is a part of Salesforce.com, which started as a SaaS Customer Relationship Management (CRM) vendor. But Force.com is unrelated to CRM. It provides the infrastructure commonly needed for any business application, customizable for the unique requirements of each business through a combination of code and configuration.This infrastructure is delivered to you as a service on the Internet.

Since you are reading this article, you have probably developed a few business applications in your time. Consider the features you implemented and reimplemented in multiple applications, the unglamorous plumbing, wiring, and foundation work. Some examples are security, user identity, logging, profiling, integration, data storage, transactions, workflow, and reporting.This infrastructure is essential to your applications but expensive to develop and maintain. Business application developers do not code their own relational database kernels, windowing systems, or operating systems.This is basic infrastructure, acquired from software vendors or the open-source community and then configured to meet user requirements.What if you could do the same for your application infrastructure? This is the premise of the Force.com.

The following subsections list differentiating architectural features of Force.com with brief descriptions.


Multitenancy is an abstract concept, an implementation detail of Force.com, but one with tangible benefits for developers. Figure 1 shows a conceptual view of multitenancy. Customers access shared infrastructure, with metadata and data stored in the same logical database.

Figure 1: Multitenant architecture.

The multitenant architecture of Force.com consists of the following features:

  • Shared infrastructure. Every customer (or tenant) of Force.com shares the same infrastructure.You are assigned a logical environment within the Force.com infrastructure.

    At first some might be uncomfortable with the thought of handing their data to a third-party where it is co-mingled with that of competitors. Salesforce's whitepaper on its multitenant technology includes the technical details of how it works and why your data is safe from loss or spontaneous appearance to unauthorized parties.

  • Single version There is only one version of the Force.com platform in production. The same platform is used to deliver applications of all sizes and shapes, used by 1 to 100,000 users, running everything from dog-grooming businesses to the Japanese national post office.
  • Continuous, zero-cost improvements. When Force.com is upgraded to include new features or bug fixes, the upgrade is enabled in every customer's logical environment with zero to minimal effort required.

Salesforce can roll out new releases with confidence because it maintains a single version of its infrastructure and can achieve broad test coverage by leveraging tests, code, and configurations from their production environment.You, the customer, are helping maintain and improve Force.com in a systematic, measurable way as a side effect of simply using it. This deep feedback loop between the Force.com and its users is something impractical to achieve with on-premise software.

Relational Database. The heart of Force.com is the relational database provided as a service.The relational database is the most well-understood and widely used way to store and manage business data. Business applications typically require reporting, transactional integrity, summarization, and structured search, and implementing those on nonrelational data stores requires significant effort. Force.com provides a relational database to each tenant, one that is tightly integrated with every other feature of the platform. There are no Oracle licenses to purchase, no tablespaces to configure, no JDBC drivers to install, no ORM to wrangle, no DDL to write, no queries to optimize, and no replication and backup strategies to implement. Force.com takes care of all of this for you.

Application Services. Force.com provides many of the common services needed for modern business application development.These are the services you might have built or integrated repeatedly in your past development projects.They include logging, transaction processing, validation, workflow, email, integration, testing, reporting, and user interface.

These services are highly customizable with and without writing code.Although each service can be valued as an individual unit of functionality, there is tremendous value from their unification. All the features of Force.com are designed, built, and maintained by a single responsible party, Salesforce. Salesforce provides documentation for these features as well as support staff on-call, training and certification classes, and accountability to its customers for keeping things running smoothly.This is in contrast to many software projects that end up as a patchwork of open-source, best-of-breed tools and libraries glued together by you, the developer, asked to do more with fewer people, shorter timelines, and cheaper, often unsupported tools.

Declarative Metadata. Almost every customization configured or coded within Force.com is readily available as simple XML with a documented schema.At any point in time, you can ask Force.com for this metadata via a set of Web services.The metadata can be used to configure an identical environment or integrate with a source control system. It is also helpful for troubleshooting, allowing you to visually compare the state of two environments. Although there are a few features of Force.com not available in this declarative metadata form, Salesforce's stated product direction is to provide full coverage.

Programming Language. Force.com has its own programming language, called Apex. It allows developers to script interactions with other platform features, including the user interface. Its syntax is a blend of Java and database stored procedure languages like T/SQL and can be written using a Web browser or a plug-in to the Eclipse IDE.

Other platforms take a different approach. Google's App Engine simultaneously restricts and extends existing languages such as Python so that they play nicely in a PaaS sandbox. There are obvious benefits, such as leveraging the development community, ease of migration, and skills preservation. One way to understand Apex is as a domain-specific language. Force.com is not a general-purpose computing platform to run any Java or C# program you want to run. Apex is kept intentionally minimalistic, designed with only the needs of Force.com developers in mind, built within the controlled environment of Salesforce R&D. Although it won't solve every programming problem, Apex's specialized nature leads to some advantages in learning curve, code conciseness, ease of refactoring, and ongoing maintenance costs.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.