How to build apps on Salesforce's platform

Not only does Salesforce offer easy application development and deployment in the cloud, its Trailhead training site offers self-guided courses to get you there

How to build apps on Salesforce's platform
Thinkstock

In the cloud world, SaaS applications are built from services. As a SaaS application becomes widely adopted, increasing numbers of customers demand features specific to their business that the SaaS provider can’t afford to build. Instead, the SaaS provider decides to expose the underlying services by making them API-accessible -- so developers can customize the application, build their own applications, or incorporate certain services into their own business workflows.

At that inflection point, the application becomes a platform.

Salesforce provides a classic example of this progression. In the beginning, Salesforce was a pure Web play, with a CRM interface built around its own user experience and a bunch of check-box configuration choices. Now Salesforce is a very different beast, with more than half the billions of transactions that run through the service coming from its APIs.

Getting to know the Salesforce platform

Salesforce has attempted more than once to become a platform company, with varying levels of success. Its early launch of its Apex development tools made it easier to customize the Salesforce workflow, adding new steps and new pages to the service. But what really changed how it delivered its platform was the acquisition of the Heroku PaaS, which gave the CRM company an infusion of developer-focused DNA at exactly the right time.

The result has been an explosion of new tools for developers, as well as the self-paced training site Trailhead. Getting developer relations right isn’t easy, with Microsoft’s MSDN often cited as the gold standard of how to build and run a developer outreach program. Trailhead takes a different route, building on the self-service MOOC (massive online open course) model established by Khan Academy and others.

With Trailhead, Salesforce is doing is more than gamifying training -- it’s tying training to Developer Edition platform instances. This approach lets Salesforce track not only what developers are learning, but also lets it see the most popular areas of the service.

Each module is timed, so you can choose what to work on and when, with subtopics you can explore in more detail. At the end of each module, a set of multiple choice questions allow you to review your progress -- and pick up points toward one of many different badges.

Setting up a developer instance of Salesforce is easy enough; all you need is an email address. You get access to all the developer tools, along with a limited version of the Salesforce platform.

Building on Force.com

The main Salesforce developer tool is its Force.com IDE. Based on Eclipse, it’s the preferred development tool for Salesforce’s Apex language. Perhaps best thought of as a data-oriented dialect of Java, Apex is designed to help customize Salesforce workflows and to integrate it with external applications.

If you’ve built stored procedures for a SQL database, many of the principles used in Apex will be familiar. It’s a powerful tool that lets you extend Salesforce well beyond its core CRM functionality, allowing you to build complex, custom business processes.

While it’s a good idea to be familiar with database development if you’re working with Apex, most of the underlying concepts are familiar, as are its programming constructs. You can attach Apex code to Salesforce fields, adding new business logic to a process, so you can, for example, calculate delivery costs and delivery times based on a customer’s address.

Code is launched by triggers and runs as new data is input or when certain actions run. With Salesforce, it's essential to build unit tests for your code: You can’t deploy Apex applications if less than 75 percent of your code is covered by unit tests, and those tests need to pass before code is deployed, with tests automatically part of a deployment.

Closely related to Apex is the Visualforce markup language. This provides developers with the tools they need to build MVC applications on the Salesforce platform, with Salesforce and Apex handling the model, and Visualforce delivering the controller (which can be a standard Salesforce function or custom code written in Apex), and the markup for the view. Visualforce code is delivered as HTML, so it works in standard browsers, and you can embed HTML in your Visualforce applications.

Applications in a hurry

One of the more interesting elements of the current Salesforce platform is its Lightning App Builder, designed to enable users to build their own responsive Salesforce applications that work on desktops and mobile devices. Starting with a basic template, you can quickly link page elements to Salesforce.com services and content, ready for delivery to mobile devices.

Lightning App Builder is a quick and easy tool that gives admins a controlled way of allowing users to build the apps they need. Pages are added to the Salesforce1 mobile application, appearing as extra navigation elements. Salesforce provides a selection of common actions and page components for Lightning Apps, with the option of creating custom components that can be traded with (or sold to) other users on Salesforce’s AppExchange.

Salesforce has gone way beyond the online CRM service of a decade ago. While the CRM data model remains at the heart of the platform, it’s now a tool you can use to build a wider range of customer-focused applications. And like the best platforms, it offers a choice of tools to help you build the applications you and your business need.

Copyright © 2015 IDG Communications, Inc.