13 Separation of Concerns
Imagine changing your application’s database schema and as a result, the font size increases in the emails that the system sends.
Why would the email template font size depend on the database schema? Good question. It ought not to.
In general, don’t put business logic in your user interface. Don’t put data import and export code in your security code. This principle is known as separation of concerns. It aligns with Kent Beck’s aphorism:
“Things that change at the same rate belong together. Things that change at different rates belong apart.” [8]
An overarching theme of this book is that code should fit in your head. As subsections 7.1.3 and 7.2.7 argues, keep code blocks small and isolated. Keeping things apart is ...
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