Triggers, classes, instantiation – Oh My!

There are now only 45 days until Dreamforce & I promised to share enough so that you could sneak your way into the Hackathon (or if that’s not your thing, just impress new people that you talk to), so let’s jump right in!

trigger is a chunk of code that does things (vague, I know). They look at a specific object, and can perform actions based on criteria set around that object. You can design them to run either before or after a insert, update or delete to that object in Salesforce.
I think of classes as the object factory – it’s what makes your objects. You could also think of is as the blueprint for your object (this is the analogy that is used in the DEV 531 class) – it defines what the object is & the actions that object can do. Taking this back to the Salesforce world, think of it as the fields on your sObject & what that sObject can do.

Finally, instantiation (try saying it – it’s fun & you’ll feel really smart) is when you fire up that object factory & say “Go!” It is simply the act of creating an object from a class. I like this one the most only because I feel smart using it.

Thanks for reading! I hope my vocab series is useful & please provide feedback so that I can tune this up for the upcoming posts. See you next week, or join me over on Facebook!


Advertisements

3 Responses to “Triggers, classes, instantiation – Oh My!”

  1. I feel smarter already!

Trackbacks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: