A Mapper is pretty much the same thing as a DAO (there are variations of
each). I believe DAO was popularized by Core J2EE and predates Mapper in
common usage. DAO seems to be the most popular, both in the Java and .Net
worlds.

In Patterns for Enterprise Applications, Fowler makes an argument for using
the term Mapper instead of DAO. I don't have the book in front of me, but
basically, he argues that DAO is vague and often ambiguous.

DAO is vague because it describes what the object is, not what it does. It's
ambiguous because DAO is used quite a bit in this field. One very obvious
instance is Microsoft DAO, which evolved into (confusingly enough) with ADO.

Personally, I use the term Mapper for a couple of reasons. First and
foremost, I really don't like acronyms in component/class names. I equate it
to Systems Hungarian notation.

I also think it's much more difficult to point a newbie at a directory full
of components that have suffixes like DAO, TO, BO, etc. It gets even more
difficult if they came from Microsoft VB, where ADO means something
completely different.

In addition, in my applications at least, Mapper more clearly identifies the
purpose of the object. My applications generally have Gateways and Mappers.
Both objects allow me to access data, so calling one a "Data Access Object"
just doesn't make sense.

Ben Rogers
http://www.c4.net
v.508.240.0051
f.508.240.0057
________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Joe Ferraro
Sent: Friday, May 27, 2005 10:32 AM
To: [email protected]
Subject: [CFCDev] DAOs vs Mappers

Can someone give me a brief overview of what the difference is between a
mapper and a DAO? They seem somewhat similar.



----------------------------------------------------------
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]


Reply via email to