Перейти к содержимому

Apex Design Patterns — Part 2| Behavioral Patterns: Strategy, Observer & Command

SF With AK

0:00 / 0:00

Apex Design Patterns — Part 2| Behavioral Patterns: Strategy, Observer & Command

47 просмотров · 4 месяца назад
SF With AK
228 подписчиков
47 просмотров · 4 месяца назад
In Part 1, we covered how objects get created.    • Apex Design Patterns – Part 1: Foundations...   In Part 2, we're answering a different question — how do objects communicate? Three behavioral patterns that will change the way you write triggers, services, and business logic in Salesforce Apex: Strategy — Replace growing if-else chains with composable, swappable algorithms Observer — Keep your triggers clean by decoupling the event from its reactions Command — Turn actions into objects so you can log, undo, queue, and replay them Each pattern includes a real-world analogy, an Apex code walkthrough, and a live demo in a Salesforce org. Timestamps 0:00 Intro 0:38 Recap — Creational Patterns from Part 1 2:36 What Are Behavioral Patterns? 3:14 Strategy Pattern — Concept & Analogy 4:53 Strategy — Apex Code Walkthrough 7:32 Strategy vs Factory — What's the Difference? 8:35 Observer Pattern — Concept & Analogy 9:56 Observer — Apex Code Walkthrough 12:51 Command Pattern — Concept & Analogy 14:11 Command — Apex Code Walkthrough 16:31 Part 2 Recap + Part 3 Preview Series Part 1 — Creational Patterns (Singleton, Factory, Builder):    • Apex Design Patterns – Part 1: Foundations...   Part 2 — Behavioral Patterns (Strategy, Observer, Command): You're here Part 3 — Structural Patterns (Adapter, Decorator, Facade): Coming soon Follow me on LinkedIn:   / sf-with-ak   #Salesforce #Apex #DesignPatterns #SalesforceDeveloper #Strategy #Observer #Command #SFwithAK #ApexCode #SalesforceCareers #CleanCode #SoftwareArchitecture