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

Hey BKBK!

 

I was told that in OOP, I should not have my objects be aware of anything not directly passed in to it.

 

Sure I could make application.DataSource, but my issue is that I have multiple objects and methods that have need of that data, and it is not advised to simply have the code reference "application.DataSource", but to instead have an argument that has the application.DataSource passed to it, and which point it can refer to it as arguments.DataSource.

 

My issue is that I'm getting to a point where some of the objects I'm storing in the application.cfc's variables scope aren't available at the currently executing template (be it invoked, cf-module'd or included) because the internal executing templates have their own variables scope.  So what I need to do is, in essence, find a structured way in which I can pass in the application.cfc's variables scope as part of a structure/variable that will exist any any level of executing template.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



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