Apex in Salesforce

Apex in Salesforce is an type of object oriented language native. It has many features of object oriented concepts and other elements that would work in force.com platform only.

Below one shows a snippet of a apex marking its different elements.

apex

Collections – is a data type in apex to store collection of elements. It has three types – List, Set and Map.

SOQL – Salesforce Object Query Language used to query the salesforce objects.

SOSL  – Salesforce Object Search Language used to search against salesforce objects.

For Each Loop – used to iterate the collections (List/Set). This loop looks similar to the traditional for loop but not the same.

Database methods – used to manipulate the data into objects.

Exception – Enables to handle various exceptions in apex.

Another important element of apex is a property. It is used to declare a variable to be passed between a page and controller. If a variable is not declared as a property, then  we can refer that variable in your page. We will discuss each of these elements in detail in other sections.

Leave a Comment