Salesforce Platform App Builder Certification Handbook - Sample Chapter
Salesforce Platform App Builder Certification Handbook - Sample Chapter
pl
e
P r o f e s s i o n a l
E x p e r t i s e
D i s t i l l e d
$ 44.99 US
28.99 UK
P U B L I S H I N G
Sa
Siddhesh Kabe
ee
Siddhesh Kabe
P U B L I S H I N G
Preface
This book will assist you in building a strong foundation in Force.com to prepare for
the Platform App Builder Certification Exam. It will help you to design, build, and
implement custom applications using the declarative customization capabilities of
the Force.com platform.
Developer resources
[1]
Just like how tenants in a single building share the resources of electricity
and water, in the multi-tenant system tenants share common resources
and databases.
[2]
Chapter 1
Scalability: The multi-tenant kernel is already tested and runs for many
users simultaneously. If the organization is growing, there is always room
for scaling the application with new users without worrying about load
balancing and data limitation. Force.com provides data storage on a per-user
basis, which means that the data storage increases with the number of users
added to the organization.
All instances hosted on the servers are upgraded with no additional cost.
The Salesforce maintenance outage during a major release is only 5 minutes.
[3]
The sandboxes are upgraded early so there can be testing for compatibility with the
new release. The new releases are backward-compatible with previous releases, thus
the old code will work with new versions. The upgrades are taken care of by Force.
com and the end user gets the latest-version running application.
Force.com platform
Force.com is the world's first cloud application development platform where end
users can build, share, and run an application directly on the cloud. While most
cloud computing systems provide the ability to deploy the code from the local
machine, Force.com lets us directly write the code in the cloud.
The Force.com platform runs in a hosted multi-tenant environment, which gives the
end users freedom to build their custom application without hardware purchases,
database maintenance, and maintaining a software license. Salesforce.com provides
the following main products:
[4]
Chapter 1
Model-View-Controller architecture
The most efficient way to build an enterprise application is to clearly separate out the
model: the data, the code (the controller), and the UI (the View). By separating the
three, we can make sure that each area is handled by an expert. The business logic is
separated from the backend database and the frontend user interface.
[5]
It is also easy to upgrade a part of the system without disturbing the entire structure.
The following diagram illustrates the model-view-controller of Force.com:
[6]
Chapter 1
[7]
Traditional software systems are hosted on a single-tenant system, usually a clientserver-based enterprise application. With the multi-tenant architecture, the end user
does not have to worry about the hardware layer or software upgrades and patches.
The software system deployed over the Internet can be accessed using a browser
from any location possible, even wide ranges of mobile devices.
The multi-tenant architecture also allows the applications to be low-cost, quick to
deploy, and open to innovation. Other examples of software using the multi-tenant
architecture are webmail systems (such as www.gmail.com and www.yahoo.com) and
online storage systems, such as www.dropbox.com, or note-taking applications, such
as Evernote, Springpad, and so on.
Force.com metadata
Force.com is entirely metadata-driven. The metadata is defined in XML and can be
extracted and imported. We will look into metadata in detail later in this chapter.
[8]
Chapter 1
Apex and SOQL together give developers powerful tools to manage data
and processes for their application, leaving the rest of the overhead on the
Force.com platform.
The following screenshot shows the page editor for Visualforce. It is easy to use and
splits a page into two parts: the one at the bottom is for development and the other
shows the output:
[9]
AppExchange
AppExchange is a directory of applications built on the Force.com platform.
Developers can choose to submit their developed applications on AppExchange.
The applications extend the functionality of Force.com beyond CRM with many
ready-made business applications available to download and use.
[ 10 ]
Chapter 1
Force.com sites
Using Force.com sites or site.com, we can build public-facing websites that use the
existing Salesforce data and browser technologies, such as HTML, JavaScript, CSS,
Angular JS, Bootstrap, and so on. The sites can have an external login for sensitive
data or a no-login public portal that can be linked to the corporate website as well.
Site.com helps create websites using drag-and-drop controls. Users with little or no
HTML knowledge can build websites using the site.com editor.
Force.com development
Like any other traditional software development process, the Force.com platform
offers tools used to define data, business processes, logic, and rich UIs for the
business application. Many of these tools are built-in, point-and-click tools
simplified for users without any development skills. Any user with no programming
knowledge can build applications suitable for their business on Force.com.
[ 11 ]
The point-and-click tools are easy to use, but they have limitations. To extend the
platform beyond these limitations, we use Apex and Visualforce.
Let's now compare the tools used for traditional software development
with Force.com:
Java
Dot Net
Force.com
Oracle,
MS-Access,
SQL, or any
third-party
database setup
Salesforce metadata
(now database.com)
Connection to the
database
JDBC
Ado.net
Controlled
environment for
development and
testing
Local servers,
remote test
servers
Force.com real-time
sandboxes
Local servers,
remote test
servers
Force.com metadata
Everything on Force.com such as data models, objects, forms, tabs, and workflows
are defined by metadata. The definitions or metadata are made in XML and can be
extracted and imported. The metadata-driven development also helps users with no
prior development experience to build business applications without any need to
code. We can define the objects, tabs, and forms in the UI using point-and-click.
All changes made to the metadata in App-Setup are tracked. Alternatively,
developers can customize every part of Salesforce using XML files that control
the organization's metadata. The files are downloaded using the Eclipse IDE or
Force.com IDE.
To customize metadata on Salesforce UI, go to Setup | Build:
[ 12 ]
Chapter 1
Metadata API
The metadata API provides easy access to the organization data, business logic, and
the user interface. We can modify the metadata in a controlled test organization
called the sandbox. Finally, the tested changes can be deployed to a live production
environment edition. The production environment is the live environment that is
used by the users and contains live data. The production instance does not allow
developers to code in them directly; this ensures that only debugged and tested code
reaches the live organization.
[ 13 ]
The online page editor splits the screen into two parts with live code in the bottom
half and the final page output in the top half. Force.com also provides an inline
editor for editing the Apex code in the browser itself.
Force.com IDE is an IDE built over Eclipse. It provides an easy environment to write
code and offline saving. It also comes with a schema browser and a query generator,
which helps in generating simple queries (select statements) by selecting fields and
objects. The code is auto-synced with the organization.
Sandboxes
Force.com provides a real-time environment to develop, test, and train people in the
organization. It is a safe and isolated environment where any changes made will not
affect the production data or application. These sandboxes are used to experiment on
new features without disturbing live production in the organization. Separating the
test and dev instances also ensures that only the tested and verified code reaches the
production organization.
[ 14 ]
Chapter 1
Developer sandbox: This environment is specially used to code and test the
environment by a single developer. As with the configuration-only sandbox,
this also copies the entire customization of the production organization,
excluding the data. An added feature of a developer sandbox is that it allows
Apex and Visualforce coding.
Full copy sandbox: This copies the entire production organization and all its
data records, documents, and attachments. This is usually used to develop
and test a new application until it is ready to be shared with users. Full copy
sandbox has the same IDs of the records as that of production only when it
has been freshly created.
[ 15 ]
Declarative development
The declarative type of development is done by point-and-click using a browser.
We use ready-to-use components and modify their configuration to build
applications. We can add new objects, define their standard views, and create
input forms with simple point-and-link with no coding knowledge. The declarative
framework allows the rapid development and deployment of applications.
[ 16 ]
Chapter 1
The declarative development also follows the MVC architecture in development. The
MVC components in the declarative development using Force.com are mentioned in
the following table:
Model
View
Controller
Objects
Applications
Workflow rules
Fields
Tabs
Validation rules
Relationships
Page layouts
Assignment rules
Record types
Programmatic development
Programmatic development requires prior coding knowledge. This method allows us
to extend the Force.com platform beyond declarative capabilities. This method gives
us the control and flexibility over the application we build.
[ 17 ]
The programmatic development also uses the MVC architecture, as shown in the
following table:
Model
View
Controller
Visualforce
component
Sites
Apex controllers
Apex triggers
Web service API
[ 18 ]
Chapter 1
Salesforce editions
In addition to the free developer editions, there are different paid editions that
Salesforce offers. The four common types of edition are as follows:
Enterprise: This is the most commonly used edition. It provides the ability to
extend Salesforce CRM with code.
Authentication on Force.com
We can log in to Force.com from any standard web browser or third-party
application. As a security measure, Salesforce tries to prevent unauthorized access to
your account as it requires verification whenever you log in from a new IP address.
The user is authenticated using the username, password, and the IP address of the
system. The IP address where account is created is automatically white-listed for
the user:
Every time the user logs in from a separate IP address, the application verifies the
IP by sending an e-mail to the registered e-mail address in the personal profile.
Alternatively, the system administrator can enable access by setting the trusted IP
ranges. Users who log in from the white-listed IP ranges are not asked to validate
their IP address or the security token.
The Force.com username is in the format of an e-mail address: xyz@abc.
com; the username is unique across the global organization of Salesforce.
If you already have a developer organization with [email protected],
you won't be able to create another one in with the same username. You
can give a separate username ([email protected]) and a valid
e-mail ([email protected]) in this case.
[ 20 ]
Chapter 1
If you are within a LAN network of your office, university, and so on, the IP address
given by the ipconfig command in DOS will give you the internal network-specific
IP. This IP address is not seen by Force.com; you need the public domain IP address
to whitelist the address. To find your public domain IP address, you can visit
http://www.whatismyip.com.
Whitelisting the IP address has its own pros and cons; the main benefit is that when
logging in via the API, such as with Data Loader or the Force.com IDE, you aren't
challenged to provide the security token. The disadvantage is that the security token
challenge and IP address verification challenge are not enforced, thus lowering the
security threshold of a malicious login attempt.
When you log in to Force.com from a third-party tool, such as the Force.com IDE,
Outlook Edition, Data Loader, or the API, you need an additional security token
along with a username and password. Every login user gets a security token tied to
the password. We need to reset the security token the first time. It is automatically
reset whenever the password is changed.
[ 21 ]
DeveloperForce.com
Along with a developer account, http://developer.Force.com provides additional
resources for developers. The developer website is your one-stop place to learn more
about Salesforce and its features.
[ 22 ]
Chapter 1
Additional documentation
Online forums
Code share
[ 23 ]
All these resources can be accessed free of charge with a single developer account.
Additional community blogs and recourses are available in the final chapter of
this book.
The first place to get help is from the developer forums available at
https://developer.salesforce.com/forums.
If you are on Twitter, additional help can be found using the #AskForce
hashtag with the Salesforce Community. You may also address the Tweet
to @sforceNinja.
Trailhead
One of the coolest new learning resources provided by Salesforce is the Trailhead.
It provides free training, tutorials, and interactive learning paths through the basic
building blocks of the Salesforce1 platform. We can test our knowledge while
earning points and badges to celebrate our achievements.
To begin your learning journey, visit https://developer.salesforce.com/
trailhead:
[ 24 ]
Chapter 1
Summary
In this chapter, we became familiar with the Force.com platform. We have seen
the life cycle of an application build using Force.com. We saw the multi-tenant
architecture and how it is different from the web hosting server.
We have a fresh new developer account, and now in further chapters we will be
using it to build an application on Force.com.
[ 25 ]
Q4 Out of the following, which applications are suitable for Force.com? (Choose)
1. Time card application
2. Word processor
3. Online auction management
4. Inventory management
Q5 Which of the following refer to the data model of Salesforce? (Choose 2)
1. The Force.com API
2. Force.com metadata API
3. Sandbox
4. The Force.com IDE
Q6 What paid Salesforce editions are available?
1. Enterprise edition
2. Unlimited edition
3. Trial edition
4. Developer edition
Q7 Where are Force.com IDs identical?
1. Production and full copy sandbox only
2. Production and dev sandbox only
3. Two developer orgs
4. Two sandbox org
[ 26 ]
www.PacktPub.com
Stay Connected: