What You Built
This chapter has the entire software layer for the project. The functional core creates time structs with a constructor and converts them to convenient formats for different use cases. The core provides logic for three adapters with identical interfaces but different implementations for hardware, IEx, and tests. Together, these features show time upon request.
The service layer processes periodic requests for time and delegates the task of showing the local time to configurable adapter layers. The lifecycle layer uses supervisors to automatically start the service layer if needed.
Why It Matters
Core layers are important because they express complex logic in pure functions without needing to manage complexity. Adapters allow clients ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access