On Wed, Mar 14, 2012 at 1:45 PM, Jason King <[email protected]> wrote:

> I'd want to create a CFC for 'photos', in which the 'photo' would be the
> object.
>

Well honestly I'd probably start simple and just create a PhotoService.cfc
that held all the functions related to doing stuff with photos.


>
> Then I'd initialize the various parameters that may be involved with this
> construct.. such as name, caption, file location, date uploaded, etc
>

You're talking beans now, which is fine, just not where I was going
initially.


>
> And then, I can start creating various UDF's that I want to apply against
> this object.
>

Yeah, but again you don't *necessarily* need the bean object. Where this
started was "how do I make my UDFs available globally" and now we're off in
object modeling land. :-) Again that's fine but to start with you might
just want to abstract your functions into a service object.

So rather than putting my original deletePhoto UDF in a folder somewhere,
> it's contained within the CFC declaration?
>

It would be a method in the CFC that you would call as needed, yes.

-- 
Matthew Woodward
[email protected]
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en

Reply via email to