Introduction to OOPS using Salesforce

on

|

views

and

comments

Table of Contents

Introduction to Salesforce Apex

    • What is Salesforce apex?
      • Salesforce Apex is a programming language used to develop custom functionalities and business logic in the Salesforce platform. Think of it as a tool that allows developers to create custom solutions that are specific to a particular business’s needs within the Salesforce environment.
    • Use of Salesforce apex
      • With Salesforce Apex, developers can create custom objects, automate business processes, create custom user interfaces, and integrate Salesforce with other systems. In simple terms, Apex is a way to extend the capabilities of the Salesforce platform to meet the unique needs of a business.

OOPs Concept

    • Object
    • Class
    • Abstraction
    • Inheritance
    • Polymorphism
    • Encapsulation

What is an Object?

  • Any real-world entity that has a state and behavior is known as an object. For example, a chair, pen, table, keyboard, bike, etc.
  • It can be physical or logical.
  • A Cat is an Object because it has color, height, and weight as state and speaks, walks, and sleeps as behavior
  • A table or chair is also an object because it has color, height, width &, etc.

What is a Class

→ A-Class is a Collection of Objects is a class. For Example, Vehicles, Tree, Animal
→ Class can also be defined as a blueprint from which we can create multiple individual objects.

Abstraction (What the object does)

Hiding internal (implementation) details and exposing/showcasing only the functionality is known as abstraction.
For example tv, We do not what happens behind the scene

Inheritance

When a child object acquires all the properties (variables/methods) from a parent object then it is known as inheritance.

Polymorphism

When the same task is done in a different way then it is known as Polymorphism. For Example, speaking, walking, convincing customers, playing football, youtube sessions, teaching

Encapsulation (How the Object does)

Wrapping hiding/code (Putting together) and data together into a single unit is known as encapsulation.
For example, a capsule is wrapped with different medicines.
In Salesforce, class is a perfect example of encapsulation.

  • DRY Principle
    • Do not repeat yourself
  • SOLID Principle (Intro)
    • S – Single Responsibility Principle (SRP)
    • O – Open-Closed Principle
    • L – Liskov’s Substitution Principle
    • I – Interface Segregation Principle
    • D – Dependency Inversion Principle

Complete Video

Resources

Amit Singh
Amit Singhhttps://www.pantherschools.com/
Amit Singh aka @sfdcpanther/pantherschools, a Salesforce Technical Architect, Consultant with over 8+ years of experience in Salesforce technology. 21x Certified. Blogger, Speaker, and Instructor. DevSecOps Champion
Share this

Leave a review

Excellent

SUBSCRIBE-US

Book a 1:1 Call

Must-read

How to Utilize Salesforce CLI sf (v2)

The Salesforce CLI is not just a tool; it’s the cornerstone of development on the Salesforce Platform. It’s your go-to for building, testing, deploying, and more. As one of the most important development tools in our ecosystem

Save the day of a Developer with Apex Log Analyzer

Table of Contents What is Apex Log Analyzer? Apex Log Analyzer, a tool designed with Salesforce developers in mind, is here to simplify and accelerate your...

Salesforce PodCast

Introduction Hey Everyone, Welcome to my podcast, the first-ever podcast in India for Salesforce professionals. Achievement We are happy to announce that we have been selected as Top...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here

5/5

Stuck in coding limbo?

Our courses unlock your tech potential