In this section we are going to begin developing Apex Classes.
Now what is an Apex class?
Any time we want to develop in Apex, but we don’t want to create a trigger, we do that development in an Apex class.
Apex classes can be used to handle trigger logic, as we alluded to in the last section. They can also be used as controllers for our Visualforce pages and Lightning Components. We can also use classes with invocable methods for our process builders and flows to call, as well as web service methods for external services to call as well.
We’re going to begin with creating a trigger handler class to contain our trigger logic, so let’s jump right in and get started.