Peter Donald wrote:
> On Wed, 26 Jun 2002 19:24, Nicola Ken Barozzi wrote:
>
>>>Then your program wont scale, will be hell to maintain and suffer from
>>>pattern hell. Self induced aswell - you don't honestly expect me to feel
>>>sorry for you do you? :)
>>
>>;-) hehehe
>>
>>Let me see if I understand.
>>
>>ComponentManager should give you course grained components.
>
>
> Coarseness is not the main requirement for being accessible from CM. For
> instance in myrmidon we have components that just validate a name and that
> qualifies as a component (maybe 20 lines if that). The main requirement is
> that the object be a service NOT a resource.
>
> Ie it is perfectly valid to nab a DataSource from the SM but if you grabbed a
> JDBC Connection you are just inviting pain and user confusion.
>
> * Will multiple lookups produce same resource or new resources each time or do
> something completely different
> * When are resources released
> * what does it mean if you hold the resource
> * you have to explicitly worry about which components are resources and which
> are services to make sure you micro-manage their usage patterns
> * etc
Ok, I think I understand.
Thank you for this explanation :-)
>>This would mean (Cocoon example) that the cm would not give you a
>>Transformer or a Generator, but a service that manages them.
>
> Depends on interface of Generator. If it is a resource then yes, if it is a
> service then no. It sounds like Generator has been made a resource (really
> bad move IMHO) and thus you do need a GeneratorManager. Personally I would
> have made it a service.
Hmmm... Isn't the GeneratorManager the service for the Generator?
I guess not, since I'm asking objects (ie Generators) to it, not making
it generate(), right?
Making it a service could mean setting the Generator type and calling
generate() on the service, so I don't even have to get an object from
it, which is worse.
I have understood some time age (though I'm not so good a doing yet)
that to encapsulate well and reduce roundtripping madness you should
always call methods on objects, not request other objects.
Using a GeneratorService would make this possible, right?
>>Let me say anyway that I don't particularly like the fact that a
>>developer has to write a Manager,
>
> Thanks - I didn't hear it the first 5 or 6 times you said it.
Oh, sorry.
Anyway, just to be clear, I don't particularly like the fact that a
>>developer has to write a Manager ;-P
>>but I suppose that this is what
>>ContainerKit is for?
>
> not really. ContainerKit is for building containers not reosurce managers.
>
> In the end if you don't want to write a custom manager then don't. Just
> remember that I told you it wont scale when you start running into problems.
Now that I think I understood more I will write my Manager now ;-)
Even if I think that this could be seen as a complication from users, dunno.
--
Nicola Ken Barozzi [EMAIL PROTECTED]
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>