IMO, the problem with using "DAO" is that Data Access Objects are really in
a lower layer of the architecture than the layer you are addressing. At
least according to the pattern descriptions I have read, including that in
Core J2EE Patterns. In fact, the structure and sequence diagrams in that
book show Business Objects using DAOs to encapsulate access to the
DataSource.
These Business Objects are what I referred to before as "Business Delegates"
or "Command Beans". Really, as I see it, you want your Actions to be the
transformation point between your presentation (using JSPs, HTML,
ActionForms, etc.) and your model. This is responsibility enough I think.
Except in the simplest of web applications, the model is more than just
accessing data. It is business logic that usually involves accessing data
and many times involves manipulating/altering the data and using it ways
that satisfy the functional requirements of your application. This is the
job of your Delegates/Commands which in turn use DAOs when necessary to
access the DataSources (databases, directories, files, other applications,
etc.) that contain the information used by your application.
So you have:
--> Action -------> Delegate -------> DAO ------> DataSource
| calls | calls | calls
uses returns /
| | +--- creates
V V V
ActionForm ValueObject
Not very pretty but descriptive, I think.
Best regards,
Jim Cakalic
> -----Original Message-----
> From: Maturo, Larry [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 12, 2002 10:02 AM
> To: 'Struts Users Mailing List'
> Subject: RE: What do you call them beans?
>
>
> Yes, that's what we call them also.
>
> -- Larry Maturo
> [EMAIL PROTECTED]
>
>
>
> -----Original Message-----
> From: Soledad Villa [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 12, 2002 6:38 AM
> To: 'Struts Users Mailing List'
> Subject: RE: What do you call them beans?
>
>
> how do you like DAO (data access object)?
>
> -----Mensaje original-----
> De: Adam Hardy [mailto:[EMAIL PROTECTED]]
> Enviado el: martes, 12 de marzo de 2002 9:35
> Para: [EMAIL PROTECTED]
> Asunto: What do you call them beans?
>
>
> Hi,
>
> just a quick question. I want to have a set of classes that do all the
> operations on my data classes. What do you call them in Struts-speak?
>
> The Action classes will call them to take care of the
> updates, deletes,
> selects and stuff, and they'll return a data class or
> collection of data
> classes.
>
> I was thinking of calling them all with the suffix 'Man' for
> Manager but
> that's kind of Microsoft-oriented, which I'm trying to get away from.
>
> Thanks
> Adam
>
>
> Find the best deals on the web at AltaVista Shopping!
> http://www.shopping.altavista.com
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
<font size="1">Confidentiality Warning: This e-mail contains information intended
only for the use of the individual or entity named above. If the reader of this
e-mail is not the intended recipient or the employee or agent responsible for
delivering it to the intended recipient, any dissemination, publication or copying of
this e-mail is strictly prohibited. The sender does not accept any responsibility for
any loss, disruption or damage to your data or computer system that may occur while
using data contained in, or transmitted with, this e-mail. If you have received this
e-mail in error, please immediately notify us by return e-mail. Thank you.