by programminggeek · 14y ago · 0 comments
What if your entities were just objects that held data and did validation, but you let use case objects determine the behavior of your system beyond that? Data persistance at that point is literally persisting your entities to the DB.
Then you use the DB much more like you would a filesystem - to retrieve and save data. It doesn't determine your model, it just stores and retrieves your data.
So, you end up with 3 types of things in this system... entities, use cases, and data gateways.
Your data gateways can still use AR if you want, or something else, it doesn't matter.
This isn't my idea, Uncle Bob lays it out better than I can here: http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-arch...
No comments yet.