Apex Trigger’s New Design

As we know that salesforce keeps updating 3 times a year. With these releases, Salesforce introduces many new features in the apex code also. Earlier I was using the following approach when writing a trigger on any object.

But after getting Switch When and Trigger.operationType, I decided to use the below design for writing the trigger logic. This is more readable and looks more clear.