- Apex is a language developed by Salesforce.com.
- Apex has a Java-like syntax and acts like database stored procedures.
- Apex is a strongly typed, object-oriented programming language that allows developers to execute the flow and control statements on the Force.com platform server in conjunction with calls to the Force.com API.
- Apex enables the developers to add business logic to most system events, including button clicks, related record updates, and Visualforce pages.
- Apex code can be initiated by Web service requests and from triggers on objects.
- Apex is included in Performance Edition, Unlimited Edition, Enterprise Edition, and Developer Edition.
- 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.
When developers choose Apex?
Developers choose apex when they are not able to implement the complex business functionality using the pre-built and existing out of the box functionalities.
Working Structure of Apex
As shown in the below diagram, Apex runs entirely on demand Force.com platform:
Understanding the Apex syntax
Apex code typically contains many things that you might be familiar with from other programming languages.
Programming elements in Apex:
Environment for our Salesforce Apex development
You can develop the Apex code in either Sandbox or Developer edition of Salesforce. A Sandbox organization is a copy of your organization in which you could write code and test it without taking the risk of data modification or disturbing the normal functionality. After that you have to develop the code in Sandbox and then deploy it to the Production environment.
Hope this helps.