I won't comment on your OO design so far as there are far more capable
people on the list to do that and I am still dipping my toes into that
field.

However as far as OO and CFMX goes, it's only since CFMX and
components that we have been able to develop in an OO way (in a manner
of speaking). My understanding is that there is still some way to go
before you could even start considering cfml an OO language (for
example no strong typing or method overloading). Still it's a good
start and a nice way to start wrapping your head around some of the
concepts.

On the cfczone mailing list there has been a thread about OO practices
and design patterns as applied to cfml. Ideas about creating a Wiki or
even a book with cfml based examples of some of the common design
patterns contributed by the community has been bandied around
recently. You can also find some information on OO and cfml by looking
cfoop.com and Ben Forta has recently written a couple of articles in
CFDJ on that topic too (the last two editions). If you want to learn
more, then I suggest you subscribe to cfczone.org and the Mach-ii
mailing lists (www.topica.com) and hang out there for a while. I
should point out that the discussion on the Mach-ii list does centre
around the framework more than anything else, but it is very
insightful (if somewhat mind boggling at times). The mach-ii website
and Sean Corfield's sites also contain pretty useful information.

Hope this helps.

G

On Wed, 28 Jul 2004 20:33:05 +1000, Jamie Lawrence Jenner
<[EMAIL PROTECTED]> wrote:
> hi all,
> 
> I am just setting out on the OO express (couldnt find any oo books for cf,
> so im using action script book instead!), so i thought i would create a
> group of cfcs, whcih will create a form dynamically, validate and return
> any errors automatically so i dont have to keep binding errors and data
> back to the form.
> 
> I currently have 4 objects.
> 
> tempForm.cfc
> This creates a copy of the form data values on re post, which, if any
> errors are found, are bound to the form elements when displayed to the
> user
> 
> ElementBuilder.cfc
> Wherever i want a form element, i invoke the makeformelement function
> (below) and the function returns a html string of the form element
> required. n.b During this stage, if the error object is initialised
> (signifying a re post and the validator finding an error) then the form
> values are taken from tempform, instead of the values passed
> (session.myName)
> 
> #application.formbuilder.makeFormElement("name","text",20,50,session.myName)#
> 
> Validator.cfc
> This is passed the arguments collection:form, and then validates each form
> element based upon a prefix it is given s_=string, n_=numeric etc.
> 
> Errors.cfc
> If the validator finds any problems then the error object is initialised,
> and gets passed the error and field name etc to display to the user
> 
> This just a very brief explanation, but am i on the right track? Should
> all of the above be bundled into one cfc as they are all working on the
> same object (theform). Is this an ok use of a cfc function (elementbuilder
> cfc) or should this really be done with a custom tag? Personally, as the
> function is returning 1 value, it seems ok. just after some views on it
> thats all. I havent got any cf chums you see, my friends work on the dark
> side (asp.net), cfug in uk is not very good :-(
> 
> Also, if OO programming is the future, then why arent there any books for
> cf out there. I have many books on cf, and each one has about two pages on
> oop, "this is an object, this a class", but they really dont explain the
> real benefits of oop, and how cf fits in. i spent a year learning how ot
> program in cf (the traditional way) and it was only once i found cfaussie
> that i found there was a better way! The right way! the OOP way! But if
> there had been a book out there on oop when i took up cf, then i would
> have got it then, and be good at it now!
> 
> Sorry went off on one there!
> 
> cheers in advance!
> 
> jamo
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 


-- 
e: greg.stewart(a)gmail.com
w: http://gregs.tcias.co.uk/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to