• No results found

About the Authors

Jeff Douglas is a highly sought-after and award-winning technologist with more than 15 years of leadership experience crafting technology solutions for companies of all sizes. His technology skills were honed during the fast and furious “dot com era,” when he provided SAP development services for Fortune 500 companies including Coca-Cola, Anheuser-Busch, Disney Imagineering, Moen, and Ericsson. After years of being a lowly Java developer, in 2006 he ascended into cloud computing. He periodically writes for developer.force.com and actively tries to work the word “automagical” into functional documentation. He speaks at industry conferences, developer meetups and enthusiastically blogs about cloud computing (especially Force.com) at http://blog.jeffdouglas.com.

Jeff works for Appirio, a cloud solution provider that offers both products and professional services to help enterprises accelerate their adoption of the cloud. With over 2,500 customers, Appirio has a proven track record of implementing mission-critical solutions and developing innovative products on cloud platforms such as salesforce.com, Google Apps, Workday and Amazon Web Services. From offices in the U.S. and Japan, Appirio serves a wide range of companies including Thompson Reuters, Japan Post Network, Ltd, Brady Corporation, BMC, RehabCare, Starbucks and Qualcomm. Appirio was founded in 2006, is the fastest growing partner of salesforce.com and Google, and is backed by Sequoia Capital and GGV Capital.

Jeff resides in Sarasota, FL, with his wife Cathy and four children Scott, Tyler, Brittany, and Kira (adopted). He and his wife have been medical foster parents for over 12 years, caring for more than 75 children.

Wes Nolte has a long history of love for all things technology-based, with experience spanning the entire Information Technology spectrum across two continents. A relative newcomer to the cloud-computing scene he has nonetheless won several international accolades including the auspicious Force.com Developer Hero award; he also holds the much coveted title of Force.com Developer Challenge Winner.

A prevalent member in a number of development communities, his highly acclaimed input on cloud computing matters is often sought across the US, Europe, Asia and Africa.

Wes is seen as a champion of salesforce.com and the Force.com Platform, and his blog on the subject is regarded as one of the most influential in the world. From this soapbox he inspires the community by implementing and combining groundbreaking technologies in all manner of ingenious ways. His trail-blazing employment of the Force.com platform has been hugely advantageous to many of his peers in the Salesforce arena.

As the head of Cloud Computing at Telegraph Media Group, one of the most renowned media companies in the world, Wes has access to cutting edge tools long before they’re accessible in the mainstream allowing him to dabble to his heart’s delight.

Wes spent 27 years living in South Africa but now resides in North London where he feeds the ducks to relax and cycles in appropriately skinny jeans.

Acknowledgements

W

riting this book was a great experience for both Wes and myself. As this was my second and Wes’ first printed publication, we had a lot to learn about the process. Even though we live on different continents and have never met in person, the magic of the Internet allowed us to work together smoothly and (semi) efficiently. What a great time we live in.

We wanted to write a book that provides a high-level overview of salesforce.com and the Force.com platform that is both easy to understand and highly informative. Hopefully the information we present will provide you with a good starting point and allow you to drill down into portions of the platform that interests you. As with most endeavors, we couldn’t do it alone and would like to thank some of the key people that made this book possible.

First and foremost, we’d like to thank our friends and family that spent countless weekend and evening hours helping us put this book together.

Thanks to my wife, Cathy, for putting up with my crazy working hours and not killing me in the process. Even though she resists any type of new technology, she went so far as to proofread every chapter before we sent the book to print. She’s a keeper. And thanks to Wes’ fiancée Gerosha who (even as a developer in the hectic finance sector) played the role of muse, photographer and editor without even sighing a complaint.

Next, we’d like to thank everyone in the salesforce.com community for reviewing our book, providing feedback and supporting us through our blogs, Twitter and various message boards. It’s a great community of passionate and supportive people and one of the things that makes salesforce.com so special.

Also, thanks to Appirio and Telegraph Media Group for not only paying us a descent wage in return for our services, but for providing an environment where we have the opportunity to expand our boundaries and write this type of book. We’d especially like to thank Ryan Nichols, VP Product Management & Marketing for Appirio, who wrote the fantastic Foreword for our book. Ryan is a thought leader in the cloud computing space and we’re honored to have him take an interest in our book.

And lastly, a big thanks goes to salesforce.com for making such a great product. Without their efforts we’d probably be doing something less sexy right now, like working for Oracle. We know many of the salesforce.com evangelists, engineers, product managers, professional service consultants, marketing and support reps personally and they are all a great bunch that are really passionate about their product and their customers’ success. Without their brilliance, dedication and countless hours of hard work, our jobs wouldn’t be possible.

A very, special thanks goes out to all of the evangelists and especially Dave Carroll, Jon Mountjoy, Quinton Wall and Ron Hess for all their assistance and friendship over the years.

Jeff Douglas Wes Nolte

Introduction

T

his book is not intended to be a deep-dive on security, programming, reporting, configuration, etc. but more of a high-level overview on salesforce.com, Force.com development, tools, methodology and other resources. We will not cover all aspects of salesforce.com. This is not the

“salesforce.com Bible”. We wrote this book to (hopefully) become an invaluable resource for anyone new or inexperienced with the Force.com platform. This book contains the information that we wish we had when we started developing applications on Force.com.

For new administrators and developers coming on to the platform, we see a gaping hole in existing reference books. If you are an end user you can pick up a copy of Salesforce.com for Dummies. For advanced developers that need a deep-dive into the platform, there is Development with the Force.com Platform: Building Business Applications in the Cloud by Jason Ouellette of Appirio. Our book is for people somewhere in the middle; let’s say a business analyst or a new Java or .NET developer. We would like this to be the first book you pick up after your boss walks in and says, “Let’s take a look at salesforce.com and see if we can build some applications in the cloud”. Hopefully this book will get you up and running faster and make your transition into the cloud smoother.

Target Audience

This book aims to strike a balance with information for both administrators (point-n-click development) and developers (Apex and Visualforce development). We tried to construct the later “programming” sections of the book in such a way that would be beneficial not only to developers but also provide administrators with an overview of the development process without making their eyes glaze over. Our goal was to make writing code

“not so scary” for administrators.

The programming sections of the book were relatively easy to write since this is our bailiwick. However, it was a struggle writing the declarative portions of the book. Declarative development on the Force.com platform is where the real power lies. However, it’s very hard to provide an overview of most declarative functionality without simply rewriting the salesforce.com Help sections. We trust that we provide some value without skipping around from topic to topic too often.

The announcement of VMforce was also a major driver for this book. With the possibility of 6M+ Java developers moving to the Force.com platform we wanted to provide a way to transition them easily. We wrote the more advanced developer sections with these developers in mind.

Salesforce.com is the Final Word

Throughout the book we’ll provide features explanations, code samples, tips from the trenches and links to resources for more information.

One of the great things about salesforce.com is that they release new features and updates three times per year. The bad thing about salesforce.com is that they release new features and updates three times per year. This makes it hard to be right 100% of the time regarding how the platform “currently” works. If you find a contradiction in this book it’s probably due to a recent release or update. The best source of information is http://developer.force.com and salesforce.com Help and documentation, so always check there for the final word.

Next Steps

After you are finished reading this book cover to cover, what are your next steps? Since we only provide a cursory overview of most topics we invite you to drill into aspects of the platform that interest you. The first website that you should bookmark is http://developer.force.com. This site contains the latest information regarding the Force.com platform. There are many hidden gems at developer.force.com so make sure you really explore the site.

For advanced developers that need a deep-dive into the platform, Apex, Visualforce and strategies for working with governors and limits, pick up a copy of Development with the Force.com Platform: Building Business Applications in the Cloud by Jason Ouellette. The book covers a surprisingly large number of development topics and is a great reference for both salesforce.com administrators and developers. It’s a logical extension to this book as it expands on topics that we cover at a high level.

Conventions Used in this Book

Terminology Conventions Org

An instance in which the salesforce.com and Force.com applications are developed, tested and used.

Salesforce.com

Not only the actual company, salesforce.com, but also collectively the software and its user interface.

Typographic Conventions

Italic

URLs, email address Constant Width

Used for program listings, as well as within paragraphs to refer to program elemetns such as variable or method names, data types, keywords and statements.

Constant Width Bold

Shows commands or other directives such as clicking a button.

Iconic Conventions

An icon to indicate a "Tip from the trenches" or some other type of important note or sidebar.

An icon to indicate a "Common Pitfall" or issue that we have come across in the past.

An icon to indicate an important link to a website with a demo or more information.

There is so much great salesforce.com content on the web that we didn’t want to leave it out. Therefore we’ve set up a delicious.com account for quick access to all of the links that we’ve either referenced or have found useful with more information. We’ve categorized these links with delicious tags that you can find in the footnotes of each section.

You can access the delicious bookmarks at: http://www.delicious.com/salesforcehandbook

Introduction to Salesforce.com

Salesforce.com Overview

Salesforce.com is software as a service (SaaS), meaning that there is simply no software to install or servers to maintain. You simply sign up for an account and salesforce.com spins up an instance of their software that you can use to run your business right away. Salesforce.com offers a 30 trial and since there is no contract, you can cancel at any time and walk away if it’s not a fit for your business. Again there is not software to install;

everything is accessible from your browser so it’s easy for users to get started. Even though salesforce.com is a pre-configured system you are not locked into their processes. You can tweak salesforce.com per your company’s specifications, develop custom functionality and even install free and low cost applications from the AppExchange.

Founded in 1999 by Marc Benioff (Oracle), Parker Harris (Left Coast Software), Dave Moellenhoff, and Frank Dominguez (both from Clarify), salesforce.com started out as a Customer Relationship Management (CRM) product but over the years has evolved into much, much more. From a high level, salesforce.com consists of several products: Sales, Service & Support, Partner Relationship Management, Marketing, Content, Ideas, Analytics, and Chatter. Developers can extend the system by writing applications on the Force.com platform using salesforce.com’s proprietary languages Apex and Visualforce.

Salesforce.com provides these services “in the cloud”. By now, you’ve probably heard about cloud computing. It’s gone from a forward-looking concept, initially adopted by smaller, nimble companies to a serious requirement for a growing number of larger businesses. Before we dive into salesforce.com let’s take a step back and talk about Cloud Computing, a concept that salesforce.com is championing.

Salesforce.com IS Cloud Computing

A number of vendors are making claims to offer “cloud” solutions. However, simply moving your server to another company’s data center does not make it a cloud solution. In most development communities and the enterprise computing space in general, salesforce.com, Google and Amazon.com are leading the march towards enterprise adoption of cloud computing services1. The three commonly accepted levels of cloud computing offerings include Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (Saas). Each has its own unique, but sometimes overlapping place in the cloud computing space with their own unique features and benefits. However they do share some common attributes inherent to the space itself.

The key characteristic of a cloud computing offering is that, above all, it should be multitenant. The opposite of multitenancy, single tenancy, is how most systems are currently designed today. Each customer gets their own server, database, application layer and user interface to do with what they please. With a multitenant application architecture there is a single instance of the server, database, application layer and user interface that is shared by all users but partitioned for each client’s data programmatically. All IaaS, PaaS and SaaS share this same core multitenant trait.

At the lowest level, IaaS offers a physical or virtualized infrastructure to tenants on a subscription basis allowing them to pay for what they need in terms of computing power. Instead of purchasing servers, software, and physical location, a tenant of an IaaS offering can pay for these components as needed. Consider B2C companies whose do most of their business during Christmas. Gone are the days when they would have to purchase the servers and software to handle their peak Christmas demand and then let them stand idle when not needed. With leading IaaS vendors like Amazon.com offering “pay per CPU hour” pricing for Linux and Windows platforms these companies can simply spin up new server instances to handle anticipated demand.

At the other end of the ladder, SaaS, much like IaaS, offers solutions to the customer on a per-usage model. The major difference is that SaaS offerings completely abstract the physical and application layers from the end user and/or developer. Salesforce.com, widely considered the leading SaaS application, provides its own customizable user interface and proprietary Apex programming language but doesn’t expose hardware or software layers to the end user. One of the major benefits of SaaS offerings is that when salesforce.com releases a new feature, fixes a bug or applies a patch, it’s immediately available to all customers. Customers may log into salesforce.com one morning and find out they have bright, shiny new features that dramatically impact their business with no effort or extra money spent to develop them.

PaaS lies between IaaS and SaaS and abstracts a bit more of the low level architecture but still without providing an actual end user product.

PaaS typically provides solutions stacks or building blocks that you can use to build your own solutions. Google App Engine is a prime example of a PaaS offering, currently supporting both a Java and a Python runtime allow you to build scalable web applications without the need for complex underlying hardware and software layers. Google abstracts those layers and lets you concentrate fully on business functionality. The Force.com platform is also considered a PaaS offering however it’s positioned a bit higher in the cloud quadrant than App Engine for a number of reasons.

Like some other platform vendors, Force.com encapsulates the runtime environment using its own proprietary language. Apex, the language for Force.com development, looks and feels like Java in many ways but doesn’t support the full implementation of any JRE.

Building solutions on a PaaS platform is quick and somewhat easy but does come with its own set of challenges. With PaaS offerings like Force.com and App Engine, a governor process, applications limits or application quotas restrict you. PaaS governors and limits protect the shared layers of the multitenant platform from being monopolized by one heavy application or runaway code. Application quotas define the daily-allotted amount of computing power, space, or bandwidth that any one application is allowed to utilize. This becomes a challenge as developers must develop solutions to operate both efficiently and with in application and/or platform restrictions.

Take a look at where the major players sit in relation to the types of cloud offerings we’ve discussed so far as well as in comparison to each other. You can quickly see that the major offerings seem to build on each other. Amazon Web Services, in the bottom-left section, offers the least customization. It simply removes your need to build out a physical infrastructure, leaving all the management and support to your IT staff. Shifting to the right, you see that App Engine offers just slightly more abstraction, now covering the platform and infrastructure while salesforce.com abstracts the application, platform and infrastructure layers.

It’s important to note that the placement of the offerings on this diagram does not indicate preference or correlate with value in any way. Each of these offerings has its own unique value and place in the market and we’ve used a combination of them to build the best solution for our customers. Each offering does provide companies with the following benefits.

Save Money and Time

Consider a basic Java application running on WebSphere and assume that it meets the requirements for an application that could be run in the cloud. With Amazon’s Elastic Computing Cloud (EC2) you can quickly build the Linux stack with a preconfigured Apache server and your

Consider a basic Java application running on WebSphere and assume that it meets the requirements for an application that could be run in the cloud. With Amazon’s Elastic Computing Cloud (EC2) you can quickly build the Linux stack with a preconfigured Apache server and your

Related documents