UDF/Utility functions globally accessible.

21 views
Skip to first unread message

drfishflan

unread,
Nov 27, 2013, 5:36:29 AM11/27/13
to mach-ii-for...@googlegroups.com
Currently in my model I have numerous modules whos listeners instantiate a copy of my UDF component.

UtillityService.cfc

I have noticed that CF/Machii do not cache this file and actually instantiate a new copy within each listener.

I am considering loading an instantiated copy of this component into my application scope.

Can any advise me on whether or not this is the best solution for my problem?

Thanks very much!

Alex

Alex Tait

unread,
Nov 27, 2013, 5:54:07 AM11/27/13
to mach-ii-for...@googlegroups.com
Also... I want this Utillity Service to be available across all my model not just listeners

So putting it in the constants is not an option!

Thanks!


--
--
For more options and to unsubscribe, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
 
Git & Wiki: https://github.com/Mach-II/Mach-II-Framework
---
You received this message because you are subscribed to a topic in the Google Groups "Mach-II for CFML" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mach-ii-for-coldfusion/OdevEYovWaw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mach-ii-for-coldf...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Alex Tait

Peter J. Farrell

unread,
Nov 27, 2013, 6:04:28 AM11/27/13
to mach-ii-for...@googlegroups.com
Alex Tait said the following on 11/27/2013 04:54 AM:
> Also... I want this Utillity Service to be available across all my
> model not just listeners
>
> So putting it in the constants is not an option!
>
>
I would look at ColdSpring 1.x branch to wire in dependencies. This is
exactly what DI is used for especially in CF and Java. Other languages
like Python have DI frameworks but they are not used very often because
of the way that Python constructs objects in memory.

--
Peter J. Farrell
OpenBD Steering Committee / Mach-II Lead Developer
http://blog.maestropublishing.com
Identi.ca / Twitter: @maestrofjp

Please do not send me Microsoft Office/Apple iWork documents. Send OpenDocument instead! http://fsf.org/campaigns/opendocument/

drfishflan

unread,
Nov 27, 2013, 6:09:15 AM11/27/13
to mach-ii-for...@googlegroups.com
That is fantastic ... thanks!

drfishflan

unread,
Nov 27, 2013, 6:13:23 AM11/27/13
to mach-ii-for...@googlegroups.com
Sorry to pester... I would like to look into ColdSpring 1.x branch integration ... can you point me in the right direction?

Thanks!

Alex Tait

unread,
Nov 27, 2013, 6:14:29 AM11/27/13
to mach-ii-for...@googlegroups.com


--
--
For more options and to unsubscribe, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
 
Git & Wiki: https://github.com/Mach-II/Mach-II-Framework
---
You received this message because you are subscribed to a topic in the Google Groups "Mach-II for CFML" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mach-ii-for-coldfusion/OdevEYovWaw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mach-ii-for-coldf...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Alex Tait
Reply all
Reply to author
Forward
0 new messages