OOP (Object Oriented Programming) in SFDC:
In apex you use classes to define what objects will be able to do.A class consists of methods and attributes.The methods of a class describe what an object of a class will be able to do.The attributes of a class describe the state of the class or the instance of the class.
To define a class ,you first need to specify the access modifier as private, public or global .Next ,you can specify optional definition modifiers such as virtual , abstract, with sharing or without sharing.After you define modifiers you need to specify the keyword class , the unique name of the class and optional implementations and extensions.Finally in the body of the class you can define your own attributes and methods.
A class can implement multiple interfaces , but only extend one class. A class can cast as a super class and verify an objects class using the instanceof keyword.You can implement interfaces and extend classes using the keywords virtual, abstract and extends.Except anonymous blocks all apex code executes in system mode when the code executes in the system mode it ignores all create, run , update and delete permissions on objects field level security and record level sharing privileges.Salesforce provides sharing models to execute apex code with just the rows available to the operating user.These sharing models enable you to enforce record level access within the context of a common or shared environment.
Interfaces are classes that only include the method signature.The methods are not implemented in the interfaces.Another class must be created to supply the implementation.
Methods and Attributes access modifiers are Private, Protected, Public, Global
Static attributes and methods do not require an instance of an object to run.They can shared by objects based on the class in which static attributes and methods are defined.
How to instantiate an object
How to overload constructors
Developers can use this keyword to represents the methods and attributes of the current instance of a class.
Apex includes various classes in its system-delivered class library.Two such classes System and User info
Apex run time engine strictly enforces a number of limits on resources due to the multi-tenant environment.
Apex also contains built in methods to help manage these limits.These methods can be utilized for debugging and printing messages.some of them shown below.two versions getDMLStatements(), getLimitDMLStatements()...
Apex provides support to programmatically control the workflow with apex process classes and approval namespace.You can use apex process classes to submit workflow requests and process the results of those requests.You can use the apex approval namespace to create and submit an approval request.
Summary
In apex you use classes to define what objects will be able to do.A class consists of methods and attributes.The methods of a class describe what an object of a class will be able to do.The attributes of a class describe the state of the class or the instance of the class.
To define a class ,you first need to specify the access modifier as private, public or global .Next ,you can specify optional definition modifiers such as virtual , abstract, with sharing or without sharing.After you define modifiers you need to specify the keyword class , the unique name of the class and optional implementations and extensions.Finally in the body of the class you can define your own attributes and methods.
A class can implement multiple interfaces , but only extend one class. A class can cast as a super class and verify an objects class using the instanceof keyword.You can implement interfaces and extend classes using the keywords virtual, abstract and extends.Except anonymous blocks all apex code executes in system mode when the code executes in the system mode it ignores all create, run , update and delete permissions on objects field level security and record level sharing privileges.Salesforce provides sharing models to execute apex code with just the rows available to the operating user.These sharing models enable you to enforce record level access within the context of a common or shared environment.
Interfaces are classes that only include the method signature.The methods are not implemented in the interfaces.Another class must be created to supply the implementation.
Methods and Attributes access modifiers are Private, Protected, Public, Global
Static attributes and methods do not require an instance of an object to run.They can shared by objects based on the class in which static attributes and methods are defined.
How to instantiate an object
How to overload constructors
Developers can use this keyword to represents the methods and attributes of the current instance of a class.
Apex includes various classes in its system-delivered class library.Two such classes System and User info
Apex run time engine strictly enforces a number of limits on resources due to the multi-tenant environment.
Apex also contains built in methods to help manage these limits.These methods can be utilized for debugging and printing messages.some of them shown below.two versions getDMLStatements(), getLimitDMLStatements()...
Apex provides support to programmatically control the workflow with apex process classes and approval namespace.You can use apex process classes to submit workflow requests and process the results of those requests.You can use the apex approval namespace to create and submit an approval request.
Summary
No comments:
Post a Comment