Apex is a object-oriented programming language developed by Salesforce.com. This language allows developers to execute flow and transaction control statements on the Force.com platform server in conjunction with calls to the Force.com API.
The syntax of this language is similar look alike to Java and acts like database stored procedures. Language is included in Performance Edition, Unlimited Edition, Enterprise Edition, and Developer Edition.
Support provided by Apex
Apex has built-in support for common Force.com platform including:
- Inline Salesforce Object Query Language (SOQL) and Salesforce Object Search Language (SOSL) queries that return lists of sObject records.
- Data manipulation language (DML) calls, such as INSERT, UPDATE, and DELETE.
- Custom public Force.com API calls that can be built from stored Apex methods
When Should You Use Apex?
The Salesforce prebuilt applications provide powerful CRM functionality. Apex can be used to achieve different task.
- You can create a Website.
- Create email services.
- Create complex business processes.
- Attach custom logic to another operation, such as saving a record.
How Does Apex Work?
All Apex runs entirely on-demand on the Force.com platform.
First developer writes and saves programming code to the platform.
Then platform application server first compiles the code into an abstract set of instructions that can be understood by the Apex runtime interpreter, and then saves those instructions as metadata.
As soon as the end user clicks to trigger execution, the platform application server retrieves the compiled instructions from the metadata and sends them through runtime interpreter before returning the result.
Cannot be used to:
- Render elements in the user interface other than error messages
- Create temporary files
- Spawn threads
Latest New Version