I too have been looking at this scenario. It seems like it has only
been a few months that CF-ers have been talking about their beans
having a service injected and thus being richer.

Although it isn't technically circular, it does feel so to have the
UserService instantiate a transient User bean, which in turn HAS A
UserService. I haven't gotten my head around this idea yet and am
curious if this is what some people are doing. I would rather have
some other service object that has the simple job of creating the User
bean that can then have the UserService in there.

One way that comes to mind would be to have the controller instantiate
the User bean. I've previously shied away from this idea (and from
using some controller built-in capabilities to create a bean based on
my form data automatically) as it feels like I'm blurring the
controller - model separation.

So I go back to the idea of a bean factory service of sorts that
specializes in instantiating the User bean (or any transient for that
matter) and composing any needed services (e.g., UserService) into
that bean, probably via Brian K.'s bean injector. But then whose job
is it to call the rich/business logic functions on that User bean? The
controller? Yet another service? Ahhhhhh! Of course the only real
answer will be, "It depends."

-------------------------------
Matt Williams
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to