ADM231 Flashcards
Apex is
a cloud based, object oriented programming language
Classes
Blueprints used for creating objects
Objects
Code is divided into objects that do work
Attributes
Characteristics of a class
Methods
The things that a class can do
Way to invoke apex
save, sending an email, anon blocks, web services, scheduled job, vf page
What is an sObject
A salesforce object
What does the Metadata API allow
access to salesforce metadata
Two characteristics of the metadata API
View metadata using the force.com ide and create modify metadata by writing apex code
What is metadata
refers to data that describes data. Custom object definitionss, page layouts, for your org
Force.com platform metadata can be described as>
XML
How does the force.com ide interact with the force.com platform?
Metadata API
What allows you to view the metadata and data for your org
The Schema Explorer
Anonymous blocks
are discrete sections of code run out of context
Anonymous blocks is a good way to
Test sections of code
System.debug()
a special method of the system class that you can add to your code to generate output when code is executed to provide feedback
Is system.debug() considered testing?
No
Pascal Case
When first letter of each word is in uppercase
Camel Case
When first letter of the first word is in lowercase and subsequent words are capitalized
Is Apex case sensititive?
No
Attribute names are typically written how
nouns and start with a lowercase letter
Constants are written?
All Capitalized and sometimes with an underscore
Methods use what case
Camel case. are typically verbs and followed by ()
Classes always start with?
Uppercase letter and followed by curly braces
What is syntax
Rules that describe how code should be structured
Dot notation refers to
The syntax of identifying and chaining together attributes or methods in OOP
Dot notation example
dog. age = 15
dog. bark();
Whats a statement
A single line of code terminated by a semicolon
What’s a block
INcludes multiple statements enclosed between curly braces
Methods require what to enclose statement parameters
( )
What must be used to enclose a string
Single quotes
Where do you open curly braces
on the line above the block
Two types of commenting
// AND /* */
Whats an operator
A symbol that performs an action on one or more arguments to product a result
3 types of operators
Math, logical, and comparsion
++
Increment by 1
–
Decrement by 1
Read a single equal sign as
is assigned the value of
Read double equal sign as
is equal to the value of
&& Logical AND
TRUE && TRUE = TRUE
|| Logical OR
TRUE || FALSE = TRUE
! Logical NOT
TRUE && !FALSE = TRUE