10
Crafting the Notifications Layer
In this chapter, we will touch on the topic of user notifications and how to organize the corresponding code in a Rails application. We will start by discussing the built-in abstraction for sending emails—Action Mailer. Then, we will demonstrate how adding notification channels increases the code base’s complexity and how we can tackle this complexity by introducing a new abstraction layer (with and without third-party libraries). Finally, we will talk about the part of the domain model responsible for managing notifications.
We will cover the following topics:
- From Action Mailer to multiple notification channels
- Extracting the notifications layer
- Modeling user notification preferences
This chapter aims ...
Get Layered Design for Ruby on Rails Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.