Skip to main content

Posts

Showing posts from November, 2021

Polymorphism in Apex

Polymorphism in Apex P olymorphism in simple word can be said as  One name many forms. For example , a man can play a role as an Employee, as a Father or as a Husband in his day-to-day life. It means that he can be in any of these form.  Polymorphism can be achieved by these two ways : Method Overloading Method Overriding Method Overloading If a class have multiple methods with same name but different parameters (either different length of the arguments or different data types of the arguments), it is known as Method Overloading. If we have to perform only one operation, with the same name of the methods increases the readability of the program as well as its very logical too. Let’s suppose if we want to perform addition of the given numbers but there can be any number in arguments as below: Example of method overloading w

Inheritance in Apex

Inheritance in Apex I nheritance in Apex is a mechanism by which one object acquires all the properties and behaviors of parent object. The idea behind inheritance in Apex is that you can create new classes that are built upon existing classes. Whenever you inherit from an existing class, you can reuse methods and fields of parent / super class, as well as you can add new methods and fields also based on the requirements. Reason to use inheritance : For Method Overriding (to achieved runtime polymorphism). For Code Reusability Various term used in inheritance : Class: A class is a concept/prototype/template of common properties, from which objects are created. Child Class/Sub Class: Child class is a class which inherits the other class, known as child class. It is also called extended class, derived class, or sub class. Parent Class/Super Class: Parent class is t

OOP,s Concepts in APEX

What is OOP's Concepts in APEX Programming ?   Object-Oriented Programming System (OOPs) is a programming concept that works on the principles of abstraction , encapsulation , inheritance , and polymorphism . It allows users to create objects they want and create methods to handle those objects. The basic concept of OOPs is to create objects, re-use them throughout the program, and manipulate these objects to get results. OOP meaning “Object Oriented Programming” is a popularly known and widely used concept in modern programming languages like Java, Apex and many other. List of OOP's Concepts >  Class  :   The class is one of the Basic concepts of OOPs which is a group of similar entities. It is only a logical component and not the physical entity. Lets understand this one of the OOPs Concepts with example, if you had a class called “Expensive Cars” it could have obje

Apex Data Types

Apex Data Types Data types are used to store the different sizes and values that can be stored in a variable during execution of program. Apex supports the following data types : Primitive (Integer, Double, Long, Date, Datetime, String, ID, or Boolean) sObject Classes and Interfaces Collections (Lists, Sets and Maps) Integer :    It is a 32-bit number without any decimal value . The value range for this data type starts from -2,147,483,648 and the maximum value go up to 2,147,483,647. For Example , Integer varInt = 5; String :    It is used to store the text value. It does not have any limit for the number of characters. Here, the heap size will be used to determine the number of characters in Apex programming. For Example ,

Salesforce Architecture ( MVC )

Salesforce MVC Architecture  ( Model - View - Controller ) S alesforce MVC (Model view Controller) separates the complexity of the business logic from the User Interface and database. Salesforce MVC architecture helps to develop powerful business application. Everything we develop in Salesforce is part of Model View Controller. Also,  It is very important to understand about the flow of the real-time project when working with SFDC MVC architecture in an organization / individually. Everything we develop in Salesforce is a part of Model View Controller .  Model : It is also called as a Database-Layer. Model or the database is the backbone which forms the bridge between View and Controller. In Salesforce, we can say that sObjects are the model as every entity in salesforce is mapped to some sObject. Objects, Fields, Relationships come under M

Declarative Features Vs Programmatic Features

Declarative Features Vs Programmatic Features > Declarative Features : Declarative customizations can be made point and click in a browser. Declarative customizations require an understanding of Force.com concepts, but no coding knowledge. Advantages of declarative customizations: Ease of development. More visual. Faster. Ease of upgrades. Ease of maintenance. Does not require programmatic skill set. > Programmatic Features : Programmatic customizations are made with code. Programmatic customizations require coding skills and allow developers to extend beyond the declarative Salesforce.com capabilities. Advantages of declarative customizations: Can extend the capabilities of an application beyond standard functionality. More customizations as we required. By : Harshal Lad