Salesforce providing 3 types of cloud services.

  • SAAS (Software As A Service)
  • PAAS (Platform As A Service)
  • IAAS (Infrastructure As a Service)

Three are very important with their respective features.

SAAS: Salesforce providing Salesforce CRM (Customer Relationship Management) Application as SAAS. It is OOTB (Out Of The Box) feature. Without any coding knowledge, we can operate this CRM application to implement our Business requirements.

There are certain limitations while using CRM application:

  • We can not arrange the fields in more than 2 columns inside a section in the page layout.
  • We don’t have any De-duplication process in place.
  • We can not change the page layout background color, text color, font, size and style. Which means we are not able to customize the page layout properties.
  • We can not customize the Tab home page
  • We can not add the Dynamic attachments along with the records while sending the emails through Workflow Rules and Process Builder.
  • We can not build the complex business logic and complex validation rules.

PAAS: Force.com Platform

It is nothing but a development environment, which provides a collection of services to develop the custom functionalities.

Force.com is a cloud platform, which can be used to do a collection of programming languages, technologies, databases, tools to develop the custom applications.

Force.com platform doesn’t requires any installations. We can perform the below 4 operations:

  • Customize the existing Salesforce CRM Application
  • We can leverage he features of the existing Application
  • We can build our own Custom Applications
  • We can integrate the Salesforce Applications with any external system

Force.com supports 2 programming languages.

Apex Programming: We can build our own custom business logics, complex validations and complex transaction flows.

Visualforce Programming: Visualforce is a web development framework, to design attractive and Dynamic User Interfaces.

Salesforce provides 2 types of customization’s:

Declarative Customizations :

Benefits:

  • No need of any technical skills
  • No need to learn any programming languages
  • No need to write the business logic by using coding
  • Easy to develop and maintain
  • It will consume very less time for the development. Here we can make an app development faster.
  • We can reduce the budget
  • We can improve the application performance

Programmatic Customizations:

Benefits:

  • We can implement the custom business logic and complex transactional flows
  • We can design attractive and Dynamic User Interfaces
  • We need to have the programming skills of “Apex and Visualforce”
  • We can integrate the Salesforce Application with any external system

Apex Programming

All programming languages that we have are On-premise, which means we need to install them in our local system before we start writing code.

Salesforce (On Force.com) created a programming language which needs no installation for writing and testing the code.

Apex is a cloud-based programming language, which we can use it with the help of “Browser and Internet Access”.


There are four types of programming approaches:

  • Procedure Oriented / Structured Oriented Programming (Ex: PASCAL, BASIC, C, PL/SQL,..etc)
  • Object Oriented Programming [Classes and Objects] (Ex: SmallTalk, C++, Java, C#.Net, VB Net,…etc) Apex is also an Object Oriented Programming Language.
  • Component Oriented Programming (Ex: COM /DCOM, VC++, VB, …etc) Visualforce is also Component Oreinted Programming approach developed by Salesforce.
  • Service Oriented / Message Oriented (SOA) (Ex: Web Services, Integration Tools (EAI), API. Salesforce uses REST API, SOAP API.

Apex Basics

Apex is an Object Oriented Programming language, where each Business logic will be available in the form of “Classes and Objects”.

By using Apex we can implement the Complex Business Logics, Complex Validations and Complex Transactional Flows. Apex Programming is comes under the programmatic customizations.

Each statement of Apex should ends with a semicolon (;)

Apex is tightly integrated with the Database Objects, so that we can perform all the DML (Data Manipulation Language) operations on bulk records at a time.

Apex uses six DML operations: INSERT, UPDATE, DELETE, UNDELETE, UPSERT and MERGE.

Apex program fetches records using SOQL (Salesforce Object Query Language) Queries

Apex programming is not a case sensitive, while writing the code we can use any characted case.

Apex provides search engine called as “SOSL (Salesforce Object Search Language) Queries“. These are used to search for the specified content in multiple objects in the Database.

By using Apex programming, we can process Millions of records with the help of “Batch Processing” (Max of 50 Millions).

With Apex programming we can integrate the Salesforce system with any external systems with the help of below functions:

  • REST – Representational State Transfer
  • SOAP – Simple Object Access Protocol
  • API – Application Programming Interface

Note: In an organisation, we can write maximum of 60,00,000 characters code.

We can extend the characters limit by contacting Salesforce Administrator, if we are using “Unlimited Edition”

For free “Developer Edition”, there is no extended limit facility of characters

The Extensions we use for saving the Apex codes are as below:

  1. .apxc – Apex Class
  2. .apxt – Apex Trigger
  3. .vfp – Visualforce Page