Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Get to Know Heroku

Learning Objectives

After completing this unit, you'll be able to:

  • Explain what a platform as a service (PaaS) is and name two existing ones.
  • Understand the difference between PaaS and other services.
  • Describe what a RESTful API is.
  • Name four use cases for Heroku.

Introduction to Heroku

Many Salesforce developers have asked us, "What is this Heroku Platform thing? What can I do with it?" We'll explain that to you in this module, as well as dig deeper into specific use cases and tools. Let’s dive in!

Heroku in the Salesforce Platform

The Heroku Platform is part of the Salesforce Platform, a multi-cloud app platform. That's quite a mouthful! We just mean that the Salesforce Platform ties together many tools and services into a cohesive platform that you can use to build valuable applications. Heroku is part of that toolset. It can enable you to build custom applications to facilitate amazing customer experiences.

You might know that Lightning Platform allows you to build employee-facing apps to customize and extend your Salesforce CRM. With Heroku you can go even further, building pixel-perfect applications for your customers in open-source languages like Java, Ruby, Python, PHP, JavaScript, and Go.

You can go beyond the bounds of the Lightning Platform but stay connected to your data inside Salesforce. It's basically the best of both worlds! Many customers leverage Heroku for powerful web and mobile applications that drive increased customer engagement.

Applications are made up of many different components. A typical modern-day application consists of a back-end management system with a system of record for important data (like the Lightning Platform Data Model layer), internal tracking and reporting tools, and a public web or mobile interface that allows customers to engage with it. Heroku gives you the ability to use open-source languages like the ones mentioned above, and frameworks like Express, Ruby on Rails, Django, or Spring to build that public-facing interface.

Heroku Is a Platform as a Service

We’ve all heard about infrastructure as a service, like Amazon Web Services, and software as a service (SaaS), like Salesforce. Heroku is a PaaS, similar to Lightning Platform, but it's a Express.jsplatform that provides very different capabilities, such as support for many different programming languages and the ability to control and scale resources. We'll get to that good stuff later.

For now, let's start at the beginning. What is a PaaS? How does it relate to SaaS or infrastructure as a service (IaaS) or owning your own on-premises servers? We'll look at each one and compare them using a tailor analogy. You'll also see how they build on top of one another.

We’ll start with SaaS, which manages the most parts of the application for you and is therefore the simplest to use. SaaS is often built on top of a PaaS, which is in turn likely built on an IaaS, which is built with on-premises hardware. On-premises hardware requires the most work to maintain and use, but provides the foundation for all these other cool services.

Software as a Service

SaaS is a methodology for delivering software from the cloud without downloading and installing it on your computer. You've already used SaaS when you log in to Salesforce via the web. To better describe the concept, let's use the analogy of buying a suit. Using SaaS is like going to a department store and buying a suit off the rack. You can find something quite nice that's already made and wear it to a party that night. You could also have a tailor make minor adjustments to get a more customized fit.

As mentioned, this method is the familiar model of Salesforce that we all know and love. Behind the scenes, Salesforce engineers build, manage, and upgrade all the software for you. All you have to do is login and use it. Simple!

Platform as a Service

A PaaS is a way to deliver hardware and software tools to users as a service. You can also use the hardware and tools for application development on top of the platform. So you can build your own SaaS right on top of a PaaS!

Of course, a PaaS provides less for you out of the box, but the trade-off is increased flexibility. In the clothing world, this approach is akin to going to a bespoke store where you pick out the fabric, buttons, and pattern and have the tailor make a suit that is custom fit to you. You want a yellow polka-dotted, three-piece suit? You don't have to wait for Armani to realize it's the next hot look; you can have it made to measure! You won't be able to wear it to a party tonight, but you can believe it'll be a perfect fit when it's done. And no one else will have anything like it.

This is where Heroku fits in. Heroku takes care of the hard parts of operating what lies underneath an application at Internet scale. This allows you to concentrate on creating the perfect app and experience for your customers using the open-source languages, frameworks, and other tools that best suit your needs without thinking about things like operating system patching.

Infrastructure as a Service

IaaS is a model that provides just the hardware or virtualized bare-metal resources to its users, without the additional layer of tooling that would make it a platform. If you were to approach suit-making with the IaaS model, you would have to buy the fabric, buttons, and thread for yourself, dream up the designs for your custom suit, and cut the fabric to the pattern. Then you have to pay the local sewing shop to rent time on a sewing machine and sew the suit yourself. It's a lot of work, but you could be sure that you'll get to use a sewing machine that has those special stitch patterns you prefer.

The Heroku platform itself is actually built on top of a powerful IaaS called Amazon Web Services (AWS). AWS allows you to assemble virtual machines, load balancers, and other low-level resources to build large and complex application clusters. These systems require highly skilled professionals to architect, build, monitor, secure, and maintain, but are more customizable than Platforms.

On-Premises Infrastructure

On-premises or on-prem infrastructure is the foundation of all these other services. On-prem means you own and manage physical servers and other hardware. AWS can offer us its IaaS because it maintains thousand upon thousands of on-prem servers.

To fashion a suit following the on-prem model, you’d have to build and maintain all the pieces you need. To have wool fabric, you need to raise some sheep, shear them, weave the fabric, and dye it to the color you prefer. Then you have to build a sewing machine, imagine a pattern, cut the pieces, and sew them together. And in a couple of years, you'll be able to wear that fancy new suit.

Building your own on-prem data center and racking and stacking servers is a ton of work, but maintaining all the pieces yourself gives you total control. Fortunately, you don’t need to control your infrastructure down to the metal to build amazing apps!

Why Heroku?

A PaaS abstracts away the complexity of building and running infrastructure for applications. Using a PaaS allows you to easily create load-balanced collections of containers that run your software. You can think of those containers just like shipping containers that hold all the code and resources needed to run your application.

Heroku is a fully managed PaaS — all the underlying complexity is handled for you by dedicated teams at Salesforce, including things like responding to failures, monitoring security vulnerabilities and patching them, planning for scaling, and actually scaling the PaaS. If you wanted to run your own PaaS, you’d need teams of people managing all these things 24/7/365.

Heroku takes care of these things for you so that you can concentrate on building custom applications to delight your customers. And you get the added flexibility of being able to use a variety of languages and easily scale your resources as necessary.

Heroku sounds great! What can I do with it?

With Heroku you can build applications or systems using a number of open-source languages, like Java, PHP, Python, Node, Go and Ruby. The systems you build can accept requests via HTTP and HTTPS, attach to databases, use third-party add-on modules, and queue and run background jobs.

In short, you can build cutting-edge web applications from scratch using Heroku. You can also store data in a managed database and use third-party add-ons that provide additional functionality from the Heroku Elements Marketplace. And because Heroku is part of the Salesforce Platform, all your Heroku apps can easily gain access to your company’s Salesforce data.

Build RESTful APIs on Heroku

The web-based nature of Heroku means that you can easily extend your application suite to power your mobile strategy. Modern mobile apps are driven by web-based, RESTful APIs that provide standard ways for mobile apps to make requests and receive responses from your web application. Your web and mobile apps are all connected to a single back-end software system, powered by Heroku.

Because Heroku is a platform for custom web-based applications, the sky's the limit in terms of what you can build on it. You could build your next awesome, custom website on Heroku. Do you want to add your device to the Internet of Things? Heroku can power that. How about fintech? Even the financial services of the future can be driven by Heroku.

Sound too good to be true? Let’s dive into some specific use cases and how you might go about designing these applications.

Use Case: Customer Engagement Website

Your business is unique and so are the ways in which you want to engage with your customers. Cookie-cutter sites built from templates, even if they’re branded to match your company’s website, aren’t going to provide the one-on-one, omni-channel, disruptive customer engagement experiences that web consumers have come to expect from top brands. Heroku lets you build custom applications using all the latest in open-source technology.

And with your customer data and back-end systems in Salesforce, apps built on Heroku can be tightly integrated. You can build a bespoke application giving your customers a totally customized experience without losing the efficiency of having all your data in one place.

Use Case: Empowering Mobile and IoT via API Services

Because RESTful API services are web-based, you can easily build your company’s API on the Heroku platform. All great mobile apps and Internet of Things (IoT) devices these days have a reusable, extensible API behind them.

After you’ve built your API service, you can build any number of mobile clients, be they native, hybrid, or HTML5, on top of it. You can even build new web applications or physical devices that interact with that API to deliver new unique experiences to your customers. With an API built on Heroku, you open up a world of mobile opportunity.

Use Case: Data Manipulation

Salesforce comes with many great tools to manage, manipulate, and explore your data. With Lightning Platform, you can build apps without code and create powerful workflows and automations, while Einstein Analytics lets you analyze the large amounts of data you’ve collected from your customers. Lightning Platform is extremely powerful, but isn’t the best choice for some use cases. Heroku provides complementary tools that round out the capabilities of the Salesforce Platform.

With Heroku, you can take advantage of both the tight Salesforce data integration and the ability to use open-source languages and tools to build your own data processing, warehousing, or archiving applications. You can even connect your business intelligence tools directly to your Heroku data applications, leveraging your transformed datasets to draw out more powerful and unique insights. In short, Heroku expands the choices you have to easily link together open-source, third-party, and custom analytics, all to support your most demanding data-centric use cases.

Use Case: Proof of Concept or Labs

One of the best things about Heroku is that it’s elastic. It takes a few moments to create a new application environment and you’re ready to run your code. When you're done trying out your new idea, you can delete the application and move on to the next thing. Many customers use Heroku to try out new ideas for applications or provide valuable customized tools.

And what if your proof-of-concept app, the one that started out as a side project intended to explore new possibilities, suddenly takes off and you need to roll it out immediately to a wider audience? With Heroku, you have absolutely nothing to worry about. It’s trivial to scale up the resources behind your application from miniature to massive to accommodate real-world traffic. You don’t need to spend weeks planning and provisioning infrastructure and moving those applications to the production environment. Heroku works just as well for proving a concept as it does for delivering on the full-fledged experience.

A Hypothetically Real Example

Let’s say you have a brilliant idea to revolutionize the connected doormat market. You need an application to accept data points from the doormats, display metrics from each customer's doormat, and allow customers to open support cases about their doormats. You also want to allow potential customers to see information about your connected doormats and to buy them.

Whew! That sounds like a lot, right?

Hold on, don’t forget the business dashboards, marketing programs, predictive support, and all the back-end systems you need to track the doormats, accept orders, track the orders, deliver them, and ...

In a Salesforce Platform world, you concentrate on the code that makes the most impact to your customers. You build your customer websites, RESTFul API endpoints, and high-volume data ingestion points as custom apps on Heroku. Then you use Lightning Platform to build out the back-end systems, customer service tools, business intelligence, workflows, and marketing journeys. With the Salesforce Platform, you can move from selling to supporting and servicing hundreds of thousands or even millions of doormats.

Summary

With the addition of Heroku, the Salesforce Platform world became even bigger, providing a platform to build custom apps to give unique experiences to your customers. Does it sound too good to be true or like it’s bound to be overly complicated? Follow us to the next unit to see Heroku’s deployment options.

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback