Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Happy Soup to Unlocked Packages

From Happy Soup to Unlocked Packages

After the release of DCP packages, production environments are not just a single monolithic container of metadata. Learn how to split your production org metadata (happy soup) into multiple DCP unlocked packages to have a better software development life cycle. We will share and discuss strategies on how to approach to the most common scenarios.

Aldo Fernandez

August 08, 2018
Tweet

More Decks by Aldo Fernandez

Other Decks in Technology

Transcript

  1. Agenda • Know your Happy Soup • SalesforceDX • Unlocked

    Packages • Identify, split and aggregate metadata • Foundation and Business Packages • Package Architecture • Dependency’s challenges
  2. Happy Soup! Ingredients • All org’s metadata • Declarative customizations

    • Process • Flows • Validation Rules • SObjects • Workflows • …everything point-n-click • Programmatic customizations • Apex • Triggers • AppExchange Packages and Customizations = Monolithic Container
  3. SalesforceDX • Salesforce Development evolved • Modern Software Practice •

    Metadata and code are modular • Development is based on open standards • Flexible packaging support agile distribution model
  4. SalesforceDX: packaging • Classic release lifecycle management • change sets,

    ant/IDE deployments, • packaging for ISVs • Modern release lifecycle management • Packaging for Customers: DCPs • Locked Packages (pilot) • Unlocked Packages (beta)
  5. Unlocked Packages • AKA: 2GP, Unlocked DCP, • Fully supported

    by SalesforceDX • Encapsulated metadata container • Freedom to make changes after installed • Allow downgrading • Optionally can leverage namespaces(*) • Delegate change management
  6. Understand your org’s metadata • What metadata do you have

    in your org? • Who needs it? • What critical process(es) are supported? • How dependency looks like? • Who is/was owner of what? #TIP: Create a Catalogue by Metadata Type
  7. Identify key components Salesforce Customizations AppExchange Apps Custom Applications AppExchange

    Apps Customizations Utilities and Frameworks Integrations #TIP: Aggregate your metadata in Units
  8. Refine your Units Modular Business Units: = Business Packages LeadGen

    Marketing OnBoarding Drawloop Portal MobileApp Base Units: = Foundation Packages Core Common
  9. Drawloop Portal MobileApp Core LeadGen Marketing OnBoarding Drawloop Common Framework

    Renewals #TIP: Identify dependencies early Dependency graph
  10. Foundation Packages • Core • Base package • Common interfaces

    • Your own frameworks • External libraries • No SObjects • Everyone depends on this • Common • Responsible for Standard Objects • Provide minimal information for all other objects • Doesn’t depend on ISVs packages • Only depends on: Core
  11. Business Packages • Built over Core and Common • Limited

    responsibility • Leverage the use of Interfaces • Logic details should be hidden • Open design encouraging extensibility • Follow Enterprise Architecture Patterns
  12. Package Architecture (I) • Follow strict naming conventions for classes

    • [PACKAGE]_[DESCRIPTOR] • Examples • Core_HttpRequestWrapper • COR_HttpRequestWrapper • …any combination • Why not leveraging namespaces? #TIP: “Let the metadata tell you where it belong and what’s its purpose“
  13. Package Architecture (II) Selector/DB tier Domain tier Service tier Presentation

    tier API Services Unlocked Package Unlocked Package Unlocked Package Dependency Dependency Dependency
  14. Dependency’s challenges • Dependency graph • Clean Interfaces design •

    Use Stub API for mocks and unit tests (forceDI) • Dynamic Field Binding on SOQLs • Dependency Injection Framework (forceDI) • Pub/Sub model for package’s communications (Platform Events)
  15. CI/CD and scripting • CI provider for DevOps (Heroku Pipelines)

    • scratch orgs • automated testing • automated package build/deploy • Manage package dependencies from build script • Identify downstream and upstream packages
  16. Futurology • CLI plugins to Manage Package Dependencies • Microservices

    Architectures • Open Source Libraries • Developers from other languages • Agile parallel development • Automated Code Reviews tools
  17. Takeaways! • If your development life cycle process is not

    broken, don’t fix it! (however, do think about escalation) • Invest research time in DevOps and CI/CD • Understand how Custom Metadata Types will help resolve dynamic dependencies (ForceDI) • How your actual release management process works? Can you identify any issues? What’s the cost of change management? What’s the learning curve for DCPs?
  18. Who to follow: • Andrew Fawcett @andyinthecloud [forceDI project, TDD

    and mocks article, DCPs] • John M. Daniel @ImJohnMDaniel [Modern ALM, DF18] • Doug Ayers @DouglasCAyers [forceDI, flows, lightning] • Fabien Taillon @FabienTaillon [DF18] • Zayne Turner @zaynelt [SalesforceDX Series] • Trailblazer Community Group: Packaging 2 Beta
  19. From Happy Soup to Unlocked Packages Aldo Fernandez Platform Architect

    Litify @aldoforce Thank you!!! #Forcelandia #HappySoup #UnlockedPackages #Uruguay #PuntaDreamin