You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by hezjing <he...@gmail.com> on 2007/06/19 14:44:36 UTC
Struts 2 + Spring 2 + DAO + Hibernate
Hi!
What is the difference between a Model object and DAO?
In "Struts 2 + Spring 2 + JPA + AJAX" tutorial, we have an annotated
quickstart.model.Person class.
Do we still require Person class say, if we create a PersonDao?
I'm trying to figure out how to implement "Struts 2 + Spring 2 + DAO +
Hibernate".
--
Hez
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 + Spring 2 + DAO + Hibernate
Posted by hezjing <he...@gmail.com>.
I found this article very useful:
Developing J2EE Applications Using Hibernate Annotations and Spring MVC
http://www.developer.com/java/ent/article.php/10933_3577101_1
On 6/19/07, hezjing <he...@gmail.com> wrote:
> Hi!
>
> What is the difference between a Model object and DAO?
>
> In "Struts 2 + Spring 2 + JPA + AJAX" tutorial, we have an annotated
> quickstart.model.Person class.
>
> Do we still require Person class say, if we create a PersonDao?
>
> I'm trying to figure out how to implement "Struts 2 + Spring 2 + DAO +
> Hibernate".
>
>
>
> --
>
> Hez
>
--
Hez
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts 2 + Spring 2 + DAO + Hibernate
Posted by Dave Newton <ne...@yahoo.com>.
--- hezjing <he...@gmail.com> wrote:
> What is the difference between a Model object and
> DAO?
DAOs get models. (Hmm, I think I need a DAO t-shirt
now--maybe it'll help.)
> Do we still require Person class say, if we create a
> PersonDao?
Yes. The Person class is the "thing" being represented
in the database. The DAO (may also be called a
"service", as in that article) operates on/with its
associated model.
(At least in my experience this is how it generally
works.)
d.
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org