APEX :
Apex is built on the Force.com platform and therefore it is plugged into other Force.com features.Apex allows developers to create highly complex, transactional and intelligent code.Apex is strongly tied with data structures and business logic needs.
Apex Benefits
Apex is governed and can only do what the system allows.Differences between apex and java
Classes and Triggers are two primary components constructed within salesforce when you write the apex code.When developers save apex code they always save it as a class or a trigger.
Apex is a proprietary language that sits within the Force.com platform and it can be invoked through triggers and classes.How to invoke apex
Syntax looks like this
Apex architecture looks like this
If the declarative features do not provide the required functionality ,developers can use apex.
Use cases :
and a simple Hello world apex class and trigger
public class HelloWorldPositionClass {
public static void helloWorld(List<Position__c> positions){
for (Position__c p:positions){
if (p.Hello__c != 'World') {
p.Hello__c = 'World';
}
}
}
}
trigger HelloWorldPositionTrigger on Position__c (before insert, before update) {
List<Position__c> positions = Trigger.new;
HelloWorldPositionClass.helloWorld(positions);
}
Summary of apex
Apex is built on the Force.com platform and therefore it is plugged into other Force.com features.Apex allows developers to create highly complex, transactional and intelligent code.Apex is strongly tied with data structures and business logic needs.
Apex Benefits
Apex is governed and can only do what the system allows.Differences between apex and java
Classes and Triggers are two primary components constructed within salesforce when you write the apex code.When developers save apex code they always save it as a class or a trigger.
Apex is a proprietary language that sits within the Force.com platform and it can be invoked through triggers and classes.How to invoke apex
Syntax looks like this
Apex architecture looks like this
If the declarative features do not provide the required functionality ,developers can use apex.
Use cases :
and a simple Hello world apex class and trigger
public class HelloWorldPositionClass {
public static void helloWorld(List<Position__c> positions){
for (Position__c p:positions){
if (p.Hello__c != 'World') {
p.Hello__c = 'World';
}
}
}
}
trigger HelloWorldPositionTrigger on Position__c (before insert, before update) {
List<Position__c> positions = Trigger.new;
HelloWorldPositionClass.helloWorld(positions);
}
Summary of apex
No comments:
Post a Comment