|
Thanks So I replied to the previous email and
changed the subject – starting a new thread is that simple? I found what you wrote very interesting –
when you say "Services Manager", are you referring to a special
system object that’s available for use, or is it just a concept? Right now I have a single .cfm file that
contains about 10 general purpose functions that I use all over the place –
functions like ShortenString, FormatKeywords, etc. As a result, I cfIncluded
the file in my application.cfc for use when needed - but it turns out that both
CFCs and cfimported interfaces can’t access the functions. So now I resort to
including the file on every page that needs it which could be 3-4 times per
request! There is definitely something I’m missing
and all this singleton talk may be the answer. Any good articles on the topic
I should look into? Cheers, Baz From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Gary Menzel Just send an email to the same address you reply to. It would be better to start this in a different email thread with a
different subject. But - as a short answer to your question - we use "Services
Manager" object to contain methods that are used from multiple components
and create what is called a "singleton" (meaning there is only ever
one instance of the class) that all the others reference. You could
either pass this in during initialisation, or it could be one object that just
has a known name in the Session or Application scope. Regards,
On 7/26/05, Scratch
<[EMAIL PROTECTED]> wrote:
Hi, This is my first time being part of a listserv. I wanted to know people's opinion on how they go about
re-using their UDFs – now, due in part to MX and CFCs, the MVC model is being
more closely followed and you can't just include your primary UDF file in
application.cfm/cfc – it won't be shared in CFCs and interfaces and its just
bad practice to call them from data or view layers. So do you find yourselves
including the same UDF file all over the place in the same request? Do you
separate all your functions into separate files and include/call them when
needed? How are people managing this? How can I start this new topic on the listserv? Thanks all, Baz From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Aaron Rouse I have run into this just with database data modeling
tools. I am the only person in our group that even uses one of these
tools and I do so because the groups standard is actually even more labor
intensive since they like to make their "data models" in access to
get a E/R diagram to show for a picture then they make them in Oracle. I
have found when using a data modeling tool that if I ever have a change to do
after I have started coding that I do go back to the tool and make the change
there but just write quick scripts to make the changes in the database.
So I could see how if I was given a basic structure for the CFCs that I might
feel the personal need to go back to the tool and make any changes that I found.
I do think it still would save me some time, maybe not really from a coding
standpoint but from the standpoint of showing a pretty picture to higher ups,
they tend to love diagrams and charts and fancy colors after all. On
7/25/05, Gary Menzel < [EMAIL PROTECTED]>
wrote: To
Aaron.... Generating
the CFC structure is fine - but what happens when you change (re-factor) the
design? Beyond that initial "prototyping" of the object's
structure, it has been my experience that the design tools begin to fail.
So you are then left with a manual job. So, I find it easier to say that
the "build" process is a manual one from the first instance. In
our development environment we ensure the designs are up to date before
actually changing the code (other than possibly modelling the revised concept
first). But, of
course, it is up to everyone to find what works for them. Regards,
On
7/26/05, Adrocknaphobia <
[EMAIL PROTECTED] > wrote: Yeah, I'm not a big fan of code generation myself. The
only code ----------------------------------------------------------
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
- [CFCDev] Too many UDF calls Scratch
- Re: [CFCDev] Too many UDF calls Gary Menzel
- RE: [CFCDev] Too many UDF calls Scratch
- Re: [CFCDev] Too many UDF calls Gary Menzel
- Re: [CFCDev] Too many UDF calls Barney Boisvert
