Apex is programming language which has been developed by Salesforce.com. It is a strongly type, Object oriented programming language allows developer to write the code and execute the flow and transaction control statement on Salesforce platform (Force.com) server in conjunction calls Force.com API.
It looks like Java syntax and acts like database store procedures. Apex enables developer to add business logic to system events, including button clicks, record updates and Visualforce page. Apex can initiated by Web service request and trigger on salesforce objects.
It is available in:
- Salesforce Classic and Lightning Experience
- Unlimited, Enterprise, Performance, Develop and Database.com Editions
Apex as a Language, It is:
Integrated
Apex provides built-in support for:
-DML calls, such as INSERT, UPDATE, and DELETE.
-Include built-in DmlException handling.
-Inline SOQL and SOSL queries which return collection of sObject records.
-Looping for bulk processing of multiple records at a time.
-Locking syntax that prevents record update conflicts.
-Custom public Force.com API calls that can be built from stored Apex methods.
-Warnings and errors occurred when a user tries to edit or delete a custom object or field that is referenced by Apex.
Easy to use
-Apex has syntax very similar to Java, such as variable and expression, block and conditional statement, loop, object and array notation, and so on.
-Apex uses syntax and semantics that are easy to understand and encourage efficient use of the Force.com platform.
-Apex produces code that is both succinct and easy to write.
Data focused
-Apex executes multiple query and DML statements into a single unit of work on the Force.com platform server.
-Apex does not attempt to provide general support for rendering elements in the user interface.
Rigorous
-Apex is a strongly-typed language.
-Apex uses direct references to schema objects such as object and field names.
-Apex fails quickly at compile time if any references are invalid.
-It stores all custom field, object, and class dependencies in metadata to ensure they are not deleted while required by active Apex code.
Hosted
-Apex is interpreted, executed, and controlled entirely by the Force.com platform.
Multitenant aware
-Apex runs in a multitenant environment.
-Apex runtime engine is designed to guard closely against runaway code, preventing it from monopolizing shared resources.
-Any code that violates limits fails with easy-to-understand error messages.
Automatically upgradeable
We do not upgrade it manually. Because Apex is upgraded as part of Salesforce releases.
Easy to test
Apex provides built-in support for unit test creation and execution, including test results that indicate how much code is covered, and which parts of your code could be more efficient.
Versioned
-Apex code can be saved against different versions of the Force.com API.
-Apex is included in Performance Edition, Unlimited Edition, Developer Edition, Enterprise Edition, and Database.com.