Actually, the flaw in your logic is that if you are adding a new type, it
will almost always be to support new code. So most of the time, you won't
need to go modify existing factory calls, but will just specify the new type
in factory calls that you place in the new code you're writing.
On 10/12/07, jalpino <[EMAIL PROTECTED]> wrote:
>
>
> @brian - I definitely think that the use of factories helps reduce
> coupling when your swapping objects (User to RegisteredUser) but once
> you introduce another subtype or choice, some level of refactoring is
> required if you want to replace an existing call to obtain a different
> object. For example:
>
> user = getFactory().getInstance("user");
>
> to
>
> user = getFactory().getInstance("differentUser");
> or
> user = getDifferentUserFactory().getInstance("user");
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---