Skip to content

Instantly share code, notes, and snippets.

@codecakes
Last active April 15, 2024 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecakes/7de3c0a3165341170c5300a25c4d9d26 to your computer and use it in GitHub Desktop.
Save codecakes/7de3c0a3165341170c5300a25c4d9d26 to your computer and use it in GitHub Desktop.
some best practices
  • Pattern match.
  • Keep consistent level of abstraction per function.
  • Don't mix pure functions with IO functions. Segregate.
  • Build upon ubiquituous domain language.
  • Define Interfaces for service layer around infrastructure and application.
  • Partial function composition == Dependency Injection. But it is not a preferred functional pattern.
  • Don't YAGNI
  • If you find yourself passing parameters and adding conditional..the abstraction is incorrect.
  • Build upon these foundational low-level architectural design patterns:
    • Value objects, Business Domains, Service Layers
    • Ports and adapters
    • Concurrent & Isolated Processes.
    • Moular functional composition
    • Segregated Command-Query State
    • Enforce immutable contracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment