The real benefits I have found are:

1)
Objects are initialised in one place only, so if the init arguments change,
then I only need to change one piece of code.

2)
Objects are created in one place only, so if the location of the component
changes, then I only need to change one piece of code.

3)
Less code!

application.myfactory.getInstance()

is less code than

createobject("component","path.to.my.component").init(application.dsn,
application.somethingelse)



On 11/12/06, Phill B <[EMAIL PROTECTED]> wrote:
>
> I have read a lot about people making their own objectFactory and I
> still don't see the need for one. Can some one please give me a reason
> why I would need to use one? So far I have yet to find a reason not to
> call to the objects directly when I need them. My lack of
> understanding makes me think it is just adding more code than is
> required.
>
> --
> Phil
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263539
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to