Book Image

Salesforce Platform App Builder Certification Handbook

By : Siddhesh Kabe
Book Image

Salesforce Platform App Builder Certification Handbook

By: Siddhesh Kabe

Overview of this book

The Salesforce Certified Platform App Builder exam is for individuals who want to demonstrate their skills and knowledge in designing, building, and implementing custom applications using the declarative customization capabilities of Force.com. This book will build a strong foundation in Force.com to prepare you for the platform app builder certification exam. It will guide you through designing the interface while introducing the Lightning Process Builder. Next, we will implement business logic using various point and click features of Force.com. We will learn to manage data and create reports and dashboards. We will then learn to administer the force.com application by configuring the object-level, field-level, and record-level security. By the end of this book, you will be completely equipped to take the Platform App Builder certification exam.
Table of Contents (17 chapters)
Salesforce Platform App Builder Certification Handbook
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Understanding the new model of the Salesforce1 platform


In the earlier edition of this book, we discussed the Force.com platform in detail. In the last couple of years, Salesforce has introduced a new Salesforce1 platform. It encompasses all the existing features of the Force.com platform but also includes the new powerful tools for mobile development. The new Salesforce1 platform is built mobile-first and all the existing features of cloud development are automatically available for mobiles. From Winter 16, Salesforce has also introduced the lighting experience. The lighting experience is another extension to the existing platform. It provides a brand new set of design and development library that let developers build applications that work on mobiles as well as the Web.

Let's take a detailed look at the services that form the platform offered by Force.com. The following section provides us with an overview of the Force.com platform.

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:

  • Sales force Automation, Sales Cloud

  • Service and Support Center, Service Cloud

  • The Exact Target Marketing Cloud

  • Collaboration Cloud, Chatter

The following screenshot shows the Force.com platform:

The application built on Force.com is automatically hosted on the cloud platform. It can be used separately (without the standard Sales, Service, and Marketing cloud) or can be used in parallel with the existing Salesforce application.

The users can access the application using a browser from any mobile, computer, tablet, and any of the operating system such as Windows, UNIX, Mac, and so on, giving them complete freedom of location.

For a complete list of supported browsers, visit:

https://help.salesforce.com/apex/HTViewHelpDoc?id=getstart_browser_overview.htm

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.

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:

We will be looking in detail at each layer in the MVC architecture in subsequent chapters.

Key technologies behind the Force.com platform

Force.com is a hosted multi-tenant service used to build a custom cloud computing application. It is a 100 percent cloud platform where we pay no extra cost for the hardware and network. Any application built on Force.com is directly hosted on the cloud and can be accessed using a simple browser from a computer or a mobile.

The Force.com platform runs on some basic key technologies.

The multi-tenant kernel

The base of the platform forms a multi-tenant kernel where all users share a common code base and physical infrastructure. The multiple tenants, who are hosted on a shared server, share the resources under governor limits to prevent a single instance monopolizing the resources. The custom code and data are separated by software virtualization and users cannot access each other's code.

The multi-tenant kernel ensures that all the instances are updated to the latest version of the software simultaneously. The updates are applied automatically without any patches or software download.

The multi-tenant architecture is already live for one million users. This helps developers easily scale the applications from one to a million users with little or no modification at all. The following figure illustrates the multi-tenant architecture:

Traditional software systems are hosted on a single-tenant system, usually a client-server-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.

Force.com Webservice API

The data and the metadata stored on the Force.com server can be accessed programmatically through the Webservice API. This enables the developers to extend the functionality to virtually any language, operating system, and platform possible.

The web services are based on open web standards, such as SOAP, XML, and JSON REST, and are directly compatible with other technologies, such as .Net, Java, SAP, and Oracle. We can easily integrate the Force.com application with the current business application without rewriting the entire code.

Apex and Visualforce

Apex is the world's first on-demand language introduced by Salesforce. It is an object-oriented language very similar to C# or Java. Apex is specially designed to process bulk data for business applications. Apex is used to write the controller in the MVC architecture.

Salesforce Object Query Language (SOQL) gives developers an easy and declarative query language that can fetch and process a large amount of data in an easy, human-readable query language. For those who have used other relational database systems, such as Oracle, SQL Server, and so on, it is similar to SQL but does not support advanced capabilities, such as joins.

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:

Visualforce is an easy-to-use, yet powerful framework used to create rich user interfaces, thus extending the standard tabs and forms to any kind of interfaces imaginable. Visualforce ultimately renders into HTML, and hence we can use any HTML code alongside the Visualforce markup to create a powerful and rich UI to manage business applications.

Apart from the UI, Visualforce provides very easy and direct access to the server-side data and metadata from Apex. This powerful combination of a rich UI with access to the Salesforce metadata makes Visualforce the ultimate solution to build powerful business applications on Salesforce.

As the Salesforce.com Certified Force.com Developer Certification does not include Apex and Visualforce, we won't be going into Apex and Visualforce in detail.

The Developer Console

The Developer Console is an Integrated Development Environment (IDE) for tools to help write code, run tests, and debug the system. The developer console provides an editor for writing code. It also provides a UI to monitor and debug Unit test classes, as shown in the following screenshot:

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.

AppExchange is available at http://appexchange.salesforce.com.

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.

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

Building the database

Oracle, MS-Access, SQL, or any third-party database setup

Oracle, MS-Access, SQL, or any third-party database setup

Salesforce metadata (now database.com)

Connection to the database

JDBC

Ado.net

Salesforce metadata API

Developing the IDE

NetBeans, Eclipse, and so on

Visual Studio

Online Page Editor and App Setup, Force.com IDE, Maven's Mate, and Aside.io

Controlled environment for development and testing

Local servers, remote test servers

Local servers, remote test servers

Force.com real-time sandboxes

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:

As Force.com Developer Certification is about using point-and-click, we will explore setup details in upcoming chapters.

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.

Online page editor and the Eclipse Force.com IDE

Force.com provides a built-in online editor that helps edit Visualforce pages in real time. The online editor can be enabled by checking the Development Mode checkbox on the user profile, as shown in the following screenshot:

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.

There are four types of sandbox:

  • 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.

  • Developer pro sandbox: Developer pro sandboxes are similar to developer sandboxes but with larger storage. This sandbox is mostly used to handle more developer and quality-assurance tasks. With a larger sandbox, we can store more data and run more efficient tasks.

  • Partial copy sandbox: This is used as a testing environment. This environment copies the full metadata of the production environment and a subset of production data that can be set using a template.

  • 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.