On 03/02/2010 09:58 AM, Dmitri Dolguikh wrote:
On 03/02/2010 10:31 AM, Bryan Kearney wrote:
Questoin for you guys... what are curators? Are they:
- Data Objects which hide the Persistenct Logic?
- Business Logic Objects?
- Both?
I ask because I see the entitler.. and I also see logic in the EntitlementPoolCurator.
-- bk _______________________________________________ candlepin mailing list candlepin@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/candlepin
#2. they are 'repositories' in domain-driven-design vernacular (if that helps). ideally they should be used for retrieval/update/persistence of objects. personally, i prefer to keep the rest of the business logic on the object itself.
Which Object? So.. if I look at he stuff we have today I see the following:
models: Entities which we are care about resources: The public REST api ServiceAdapters: Calls to external systems / (In effetc, they are repositories) Controllers: We have one, which is pure busieness logic Curators: Today, they are repositories and business logic. Tasks: Soon to come.. batch jobs.
I am fine either way with either using controllers for business logic, or for the repositories to do them. I think we need to pick a pattern.. and refactor towards it.
-- bk