Questoin for you guys... what are curators? Are they:
1) Data Objects which hide the Persistenct Logic? 2) Business Logic Objects? 3) Both?
I ask because I see the entitler.. and I also see logic in the EntitlementPoolCurator.
-- bk
I think they are (3).
I'd agree that the Entitler should probably go into the ENtitlementCurator or the EntitlementPoolCurator. I will move it there.
Cheers,
Devan
On Tue, Mar 2, 2010 at 10:31 AM, Bryan Kearney bkearney@redhat.com 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
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.
-d
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
On 03/02/2010 11:26 AM, Bryan Kearney wrote:
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:
model objects. curators also belong to the model.
-d
On 03/02/2010 12:24 PM, Bryan Kearney wrote:
On 03/02/2010 11:18 AM, Dmitri Dolguikh wrote:
Which Object? So.. if I look at he stuff we have today I see the following:
model objects. curators also belong to the model.
So. for you... is EntitlmentPoolCurator.refreshPools at the correct locatioN?
- bk
I think so.
-d
On Tue, Mar 2, 2010 at 11:24 AM, Bryan Kearney bkearney@redhat.com wrote:
On 03/02/2010 11:18 AM, Dmitri Dolguikh wrote:
Which Object? So.. if I look at he stuff we have today I see the following:
model objects. curators also belong to the model.
So. for you... is EntitlmentPoolCurator.refreshPools at the correct locatioN?
to me it is :)
jesus
On 03/02/2010 11:24 AM, Jesus M. Rodriguez wrote:
On Tue, Mar 2, 2010 at 11:24 AM, Bryan Kearneybkearney@redhat.com wrote:
On 03/02/2010 11:18 AM, Dmitri Dolguikh wrote:
Which Object? So.. if I look at he stuff we have today I see the following:
model objects. curators also belong to the model.
So. for you... is EntitlmentPoolCurator.refreshPools at the correct locatioN?
to me it is :)
OK.. what I got from this was that we are planning on Curators being both business logic and DB access. This is different from satellite (where DB access was in the factory and then managers did the business logic).
Is this correct?
-- bk
On 03/03/2010 09:50 AM, Bryan Kearney wrote:
OK.. what I got from this was that we are planning on Curators being both business logic and DB access. This is different from satellite (where DB access was in the factory and then managers did the business logic).
Is this correct?
-- bk
i certainly share this view. -d
On Wed, Mar 3, 2010 at 9:50 AM, Bryan Kearney bkearney@redhat.com wrote:
On 03/02/2010 11:24 AM, Jesus M. Rodriguez wrote:
On Tue, Mar 2, 2010 at 11:24 AM, Bryan Kearneybkearney@redhat.com wrote:
On 03/02/2010 11:18 AM, Dmitri Dolguikh wrote:
Which Object? So.. if I look at he stuff we have today I see the following:
model objects. curators also belong to the model.
So. for you... is EntitlmentPoolCurator.refreshPools at the correct locatioN?
to me it is :)
OK.. what I got from this was that we are planning on Curators being both business logic and DB access. This is different from satellite (where DB access was in the factory and then managers did the business logic).
Is this correct?
-- bk
Yeah I'd prefer this as well.
Devan
On Wed, Mar 3, 2010 at 8:50 AM, Bryan Kearney bkearney@redhat.com wrote:
On 03/02/2010 11:24 AM, Jesus M. Rodriguez wrote:
On Tue, Mar 2, 2010 at 11:24 AM, Bryan Kearneybkearney@redhat.com wrote:
On 03/02/2010 11:18 AM, Dmitri Dolguikh wrote:
Which Object? So.. if I look at he stuff we have today I see the following:
model objects. curators also belong to the model.
So. for you... is EntitlmentPoolCurator.refreshPools at the correct locatioN?
to me it is :)
OK.. what I got from this was that we are planning on Curators being both business logic and DB access. This is different from satellite (where DB access was in the factory and then managers did the business logic).
Is this correct?
That's what it sounds like. In Satellite the managers handle all of the business logic. The managers would talk to their respective factories and with other managers, but not their factories. For example, UserManager could talk to UserFactory, but it could not talk to SystemFactory, it had to go through SystemManager.
Factories did all of the hibernate related stuff like findById, saveObject(), etc. Managers had security built in as well (sometimes) :) where it would filter out things the user couldn't see, but we weren't very diligent with putting the logic there.
I honestly don't care either way we go. The Curators were modeled more from the Managers than the Factories, but if we want to add another layer we can, but I don't think it bought us much in Satellite, the rules started to break down as developers either by passed the managers or bypassed the factories. So I'm ok with having both rolled into our Curators.
jesus
On Tue, Mar 2, 2010 at 10:26 AM, Bryan Kearney bkearney@redhat.com wrote:
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.
Initially the idea was that model objects are dumb and the logic went into Curators. This is just the paradigm I've used in the past including pre-spacewalk and spacewalk (not that spacewalk is the epitome of a proper architecture).
Which Object? So.. if I look at he stuff we have today I see the following:
models: Entities which we are care about
IMO are just dumb, they know about their relationships and data.
resources: The public REST api ServiceAdapters: Calls to external systems / (In effetc, they are repositories) Controllers: We have one, which is pure busieness logic
Which one?
Curators: Today, they are repositories and business logic.
+1 they handle the accessing of the model objects and the biz logic around them.
Tasks: Soon to come.. batch jobs.
Simple jobs that interact with Curators & ServiceAdapters to get their jobs done.
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.
jesus
candlepin@lists.fedorahosted.org