On 4/27/05, Schreck, Tom <[EMAIL PROTECTED]> wrote:
> So, you have to generate the CFC file and a separate DAO CFC file?  Hmm,
> seems like a lot of extra work when you can simply introspect the properties
> and create the insert, updates etc.  This assumes the property names and the
> table field names match up.  Although you could theoretically have an alias
> attribute to a property that maps the cf property to the database table.

Introspective systems do not scale very well unless you are extremely
careful about caching generated SQL etc. I don't recommend using
<cfproperty> for this purpose really - I've already seen a couple of
projects fail that took this approach but people keep on trying to do
it that way...

> I thought it was best practice for an object to know everything about
> itself.  There's a school of thought that objects model real world things
> and should know everything about itself.  If you follow this point of view,
> then an object also knows how to display itself.

Not really. Views should be separate from business logic and an object
should model the business logic part of the equation. A business
object should know nothing about its *environment*. You should be able
to take a business object and display it any way you want, in HTML,
WML, Flash, whatever. The display mechanism is a feature of the
*program* not of the business object. The same is true for persistence
- the business object should not care whether it is persisted nor how
it is persisted. Persistence and display are not part of the business
object's function. There's a lot of OO literature out there that
explains why this separation is worth doing.
-- 
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


----------------------------------------------------------
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).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to