Tag: salesforce apex training

Salesforce Apex Training – Everything about Salesforce Apex

Best Salesforce Apex Training Tutorials

In our previous Salesforce apex training tutorials we have learned about Salesforce MVC Architecture. In this Salesforce Training Tutorial we are going to learn about Salesforce Apex. Salesforce Apex Training tutorial guides you everything about Salesforce Apex language like What is Apex, How can we use Apex.

Introduction to salesforce Apex Training

What is Salesforce APEX ?

Salesforce APEX is a programming language like Java language which can be used for developers to declare variables, constants, execute traditional flow control statements, data manipulation operations and transaction control operations when developing applications in force.com platform.

How can we use Salesforce APEX ?

Generally Salesforce APEX logic can be used in two different ways. They are

  1. In Triggers.
  2. In Class.

Salesforce Apex coding is used in both triggers and in Class. In triggers, the Apex code executes  automatically  before or after data manipulation operations like insert, update,  delete and un delete.

Salesforce Apex Training - Everything about Salesforce Apex

Salesforce Apex Training – Everything about Salesforce Apex

When the Apex code is written in a Class and it is stored on server. Force.com compile the code and stores the data in the form of meta data.This meta data is used when any user request the same data in an organization. By this process memory is saved and there is no need for recompiling the Apex code.

Salesforce Apex Advantages.

  • Salesforce Apex in Robust.
  • It can access Force.com platform data.
  • It eliminates the network traffic between Force.com platform and user by an API.
  • It’s architecture is different from other.
  • Apex code is tightly integrated with Force.com platform.
  • Apex code automatically executes triggers and classes if any changes are made in the code when those components are executed.

Salesforce Apex language Basics.

When working on big project in a company every developer must follow some nomenclatures when writing Apex code. Typically we can find more than 50 Apex class in a project and then it is difficult to find which Apex class is for what purpose. So we should follow some basic rule when writing Apex code. They are as follow.

  • Every Class starts with Capital letter.
  • Methods starts with Lower case in Apex.
  • Constants are mentioned with Upper case separated with underscore between the words. Ex:- MAX_NO_CHILDS = 15.
  • Variable are mentioned with LowercamelCase. Ex:- AccountTriggerHandler.
  • Prefix or Suffix must be used to describe nature classes like Batch, Scheduled, Future, Triggers, page extension controller and page extension class. Ex:- trgr_ContactDuplicateCheck, Page_ContactMergeExtension.
  • Avoid too many classes.

Read more for salesforce apex training and interview questions that explains with real time scenarios.