Skip to content

Commit

Permalink
Answer about Active Record reformulated as series of additional quest…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
arialdomartini committed May 22, 2020
1 parent 0c96e51 commit b612fae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions design-patterns/active-record.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Active Record

## [Krzysztof Grzybek](https://github.com/krzysztof-grzybek)
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?

0 comments on commit b612fae

Please sign in to comment.