Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: I need my services available from...well... everywhere

$
0
0

An alternative to the variables scope might be to use the request scope.  I think this is the pattern frameworks like ColdBox and FW/1 use (I could be wrong about that).  I know that they both make use of a main 'RC' variable that is passed into functions, and the RC variable contains all of the other variables needed for any part of the request process (like within service function calls).  You might look at the FW/1 docs to see how that works.

 

As for where to store objects, it sounds like you might be needing to use a Dependency Injection system (like DI/1, ColdSpring, or WireBox).  Then you don't have to worry at all about where objects are stored (other than in the configuration file for ColdSpring or the "Convention over Configuration" approach of DI/1, or "annotations and conventions" approach of WireBox).

 

Since I'm also a neophyte with OOP, I'm sure I've misstated some of the above, and hopefully someone with more experience will chime in and set things straight.

 

HTH,

-Carl V.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>