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 start your AI Journey?

Table of Contents Introduction Are you tired of the same old world? Do you dream of painting landscapes with your code, composing symphonies with data, or...

The Secret Weapon: Prompt Engineering: 🪄

Table of Contents Introduction Crafting the perfect prompt is like whispering secret instructions to your AI muse. But there's no one-size-fits-all approach! Exploring different types of...

How to Singup for your own Production org?

Let's see how we can have our salesforce enterprise Salesforce Org for a 30-day Trial and use it as a Production environment. With the...

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