Advanced Developer Certification, DEV 501 Quick Points Part-I

DEV 501 Quick Notes
#Referred from another blog.
Quick notes to take before Advanced Developer certification exam:
Would be useful for all developers. 

1.     ReadOnly Annotation prevents you from performing the following operations within the request:
·        DML operation, 
·        system.schedule method,
·        calls to future method,
·        sending emails

2.     To increase other Visualforce-specific limits, such as the size of a collection that can be used by an iteration component like <apex:pageBlockTable>, you can set the readonly attribute on the <apex:page> tag to true.

3.   Class defined with @isTest should not be interface or enums.

4.     future annotation:
o   Method with future annotation cannot be used in getter, setter, constructor methods
o   Future annotated methods must be defined as static and can return only void return type.

5.     Map Key can hold null value.

6.     Methods with the RemoteAction annotation must be static and either global or public.

7.     Static methods and variables can only be declared in a top-level class definition, not in an inner class.
If a local variable is named the same as the class name, these static methods and variables are hidden.
System methods are examples of static methods 

8.     Classes can be declared as enums but does not require class keyword in declaration. Unlike Java, the enum type itself has no constructor syntax.

9.     Protected access modifier-
This means that the method or variable is visible to any inner classes in the defining Apex class, and to the classes that extend the defining Apex class.\
Only instance methods and member attributes can use protected method.

10. The instance initialization code in a class is executed every time an object is instantiated from that class. These code blocks run before the constructor.

11. Apex properties cannot be defined on interface.
To use an interface, another class must implement it by providing a body for all of the methods contained in the interface.
Apex support both top level and inner interfaces.
To implement an interface all methods should be defined.

12. Only class extends from abstract or virtual classes can use super. You can only use super in methods that are designated with override keyword.

13. With Sharing:
Inner classes do not inherit the sharing setting from their container class. Classes inherit this setting from a parent class when one class extends or implements another.
Even with with sharing class all CURD and field level security are ignored.

14. Exception classes must extend either exception or another user-defined exception

15. Default access level for inner class is private.
This keyword is not available for top level classes but available for attributes and methods.

16. Constructor does not have any explicit return type.

17. System methods:
·        System.Now() - Returns the time in GMT
·        System.today()- returns the date in current user's timezone
·        System.assert(),
·        System.AssertEquals()- Compares two argument and optional message
·        System.AssertnotEquals().
·        System.debug()

18. UserInfo class:
·        getUserId()
·         getUsername()
·         getUserRole()
·         getFirstname()
·         getLocale()
·         getLanguage()
·        getSessionId()

19. Limit class:
·        getDMLRows() returns the number of rows processed.
·        getLimitDMLRows() returns the total resource available from the current context.
·        getDMLStatements
·        getheapSize
·        getQueries
·        getQueryRows
·        getScriptStatements
20. Data Types in apex:
Primitives, Sobjects, Collections, enums, objects created from user-defined or system supplied apex class.

Comments

Popular posts from this blog

List of Key Prefixes in Salesforce

SFDX Install CPQ in Scratch org