I have a few questions regarding best practices for the methods called from a trigger handler.
I am using a trigger handler that calls a method for some processing. I want to call the same method for a delete, update or insert. Is it a best practice to use if statements to check new and old lists for records. Then loop over the passed records and add a record id to a list. Than do the processing if the list is not null. I'm thinking this is less code that having different methods for insert, update and delete.
My second question is about updating data on a record. What is the best practice if I am updating a few different data points on the object that causes the trigger. For example, if I am updating an opportunity and I want to check a field and update the owner if certain conditions apply.. I also want to update some other fields on the opportunity. Do I create a separate method for each of those or should I have one method that updates all of the fields.