From cbe0f4a9dad07d77049fb6f24d3a8582d5d6105e Mon Sep 17 00:00:00 2001 From: Arialdo Martini Date: Fri, 22 May 2020 19:09:52 +0200 Subject: [PATCH] Answer about Active Record reformulated as series of additional questions --- design-patterns/active-record.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/design-patterns/active-record.md b/design-patterns/active-record.md index 5e430d4..e318274 100644 --- a/design-patterns/active-record.md +++ b/design-patterns/active-record.md @@ -1,7 +1,7 @@ # Active Record -## [Krzysztof Grzybek](https://github.com/krzysztof-grzybek) +Related topics suggested by [Krzysztof Grzybek](https://github.com/krzysztof-grzybek) -1. Those objects are hard to test - they are tied to the data layer. -2. This design violates SRP, so it might lead us to huge classes with lots of responsibilities. -4. It's easy to hit the database multiple times (e.g. in foreach loop) because of the leaking abstraction. +- How hard is to test code that uses Active Record? How is domain model tied or independent from data layer? +- What's the relation between objects implementing Active Record and the Single Responsibility Principle? +- How easy is to hit the database multiple times (e.g. in foreach loop) because of the leaking abstraction?