Design Constraint: Apex is an Abstraction of the Lightning Platform

The Apex programming language is what enables developers to write code to leverage Salesforce and the Lightning Platform as a driver of business innovation.

When declarative “point and click” solutions do not go far enough to meet business requirements, we can meet those requirements programmatically with Apex.

Apex is not a general purpose programming language. Unlike Java, which will run on any underlying platform given the necessary virtual machine, Apex is a proprietary language that is tightly coupled with the Lightning Platform.

You can’t run Apex anywhere other than on the Lightning Platform because the language was built from the ground up as an abstraction of the Lightning Platform.

Being tightly coupled with the Lightning Platform presents both challenges and opportunities.

The number one challenge that developers run into is that programmatic access to the Lightning Platform using Apex code is governed by limits on access to processing, memory, network, database and other resources.

Learning how to live within these constraints can be difficult when coming from other languages where limits on resource usage are not inherent to the platform.

On the other hand, Apex has total awareness of the data model and configuration for the Salesforce instance that it runs in.

Knowing how to leverage the myriad classes and interfaces that have been built specifically to ask the Lightning Platform to perform operations on our behalf is fundamental to being an effective Apex developer.