This article was automatically translated from the original Turkish version.
Website(s) | developer.salesforce.com/docs/platform/apex/guide/ | ||||||||
|---|---|---|---|---|---|---|---|---|---|
Type(s) | Registered Programming Language | ||||||||
Platform(lar) | Salesforce Lightning Platform | ||||||||
Influenced Languages | Java | ||||||||
First Release | Winter '07 Release (2006) | ||||||||
License | Commercial (Proprietary) | ||||||||
Paradigm | Object-Oriented, Event-Driven | ||||||||
Developer(s) | Salesforce Inc. | ||||||||
Apex is a proprietary, object-oriented, and strongly-typed programming language developed by Salesforce that runs on the Lightning Platform (formerly known as Force.com). Its syntax closely resembles Java, enabling developers and administrators to execute complex business logic and process automation directly on Salesforce servers. Its primary purpose is to provide a "pro-code" solution for creating custom and advanced automations when Salesforce’s standard declarative tools such as Flow fall short.
The existence of Apex is driven by the requirements of Salesforce’s multi-tenant cloud architecture. Since all customers on the platform share the same resources, Apex is designed to prevent written code from over-consuming these shared resources or negatively impacting the performance of other tenants. As a result, Apex code is always compiled stored and executed on the platform on demand and within defined limits known as governor limits.
The operating principle is based on an event-driven model:
Apex is designed to be easy for developers familiar with Java to learn but includes unique powerful features of its own:
The most fundamental concept distinguishing Apex from other programming languages is governor limits. To ensure fair resource usage in a multi-tenant environment Salesforce imposes strict limits on the number of operations allowed within a single Apex transaction. These include:
These limits compel developers to write efficient and optimized code.
Apex forms the pro-code layer of the Salesforce platform and works alongside low-code tools:
Several tools are available for developing Apex code:
Although Apex is a proprietary language it has a vibrant and active developer community supported by Salesforce’s Trailhead platform and Trailblazer Community.
Salesforce Developers. "Apex Developer Guide." Salesforce. Accessed August 16, 2025. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm.
Salesforce Developers. "Apex Triggers." *Apex Developer Guide*. Accessed August 16, 2025. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm.
Salesforce Developers. "Execution Governors and Limits." Salesforce. Accessed August 16, 2025. https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apex.htm.
Salesforce Developers. "SOQL and SOSL Reference." Salesforce. Accessed August 16, 2025. https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_sosl.htm.
Trailhead. "Apex Basics & Database." Salesforce. Accessed August 16, 2025. https://trailhead.salesforce.com/content/learn/modules/apex_database.
Website(s) | developer.salesforce.com/docs/platform/apex/guide/ | ||||||||
|---|---|---|---|---|---|---|---|---|---|
Type(s) | Registered Programming Language | ||||||||
Platform(lar) | Salesforce Lightning Platform | ||||||||
Influenced Languages | Java | ||||||||
First Release | Winter '07 Release (2006) | ||||||||
License | Commercial (Proprietary) | ||||||||
Paradigm | Object-Oriented, Event-Driven | ||||||||
Developer(s) | Salesforce Inc. | ||||||||
No Discussion Added Yet
Start discussion for "Apex (Programming Language)" article
Purpose and Core Operating Principle
Core Features and Syntax
Governor Limits
Place in the Ecosystem
Development Tools and Community