What is a design pattern you follow when writing apex code?
Anonymous
Me: I follow the service layer pattern, ensuring that business logic is kept separate from other aspects of the code. For instance, I use a trigger handler framework to control the order of operations, reuse processed data, and manage feature activation via custom metadata settings. I maintain separation by using helper/utility classes for non-business logic functions and service/controller classes for business logic. Interviewer: "That's wrong. What design patterns do you use?" Me: "I don't understand what what you mean. Can you give me an example?" Interviewer: "Like multiton vs singleton. Which design pattern do you follow" Me: "I still don't understand what you mean? That doesn't make sense because it depends on what you are trying to implement. Like with trigger handler frameworks, the one Salesforce recommends is a multiton but it could very well be implemented as a singleton depending on what you need it to do." Interviewer: "Alright Steven, thank you for your interest in National Debt Relief. Have a great day, bye." Me: "Okay, bye???"
Check out your Company Bowl for anonymous work chats.