You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gaet <ga...@free.fr> on 2005/11/02 17:10:08 UTC

Struts + Spring + Hibernate

  Hi everybody,

  After reading for two days on the web, the association of "Struts + Spring + Hibernate" seems to be one of the best architecture to address web application. 

  I've also read several samples but all these classes to develop looks like a gazeline :o) and a little bit difficult to understand for newbie...

  Are there some developers here who use this solution?
  Does someone have a good tutorial or sample to indicate? (I've already seen "Wiring your web applications with Open Source java"..thanks :o))

  Thanks for your feedback on this architecture :o)


Re: Struts + Spring + Hibernate

Posted by James Mitchell <ja...@mac.com>.
You can use [1]Middlegen to [2]generate *.hbm.xml files, then use [3] 
hbm2java to generate Pojos.


[1] -- http://boss.bekk.no/boss/middlegen/
[2] -- http://www.hibernate.org/98.html
[3] -- http://hibernate.bluemars.net/276.html

Combine this with Spring's OpenSessionInView and the Struts' wild  
card action mapping, and you'll find yourself developing at lighting  
speed.

In fact, one of my clients have extended Middlegen to generate the  
following (in addition to the *.hbm.xml files) from any data source:
a) a default Dao layer (each of which extends HibernateDaoSupport)
b) a base service layer with a stock set of finders using the  
injected Dao's from (a)
c) an extended service layer impl (1 time gen) that extend (b) so  
future regen's of (b) don't overwright custom code
d) unit tests for all generated sources
e) all of the xml needed to wire together the Dao and Service layers.

All I have to do, is create a new Facade and impl, and with Springs  
autowiring, my crud work is done.  The whole thing is quite  
impressive and serves as a pretty nice launchpad for a new  
project...which leads to my next link:

https://appfuse.dev.java.net/



--
James Mitchell





On Nov 2, 2005, at 11:49 AM, Gaet wrote:

> Thanks Wendy,
>
> yes, this article is a good presentation but it's a pity that there  
> is not a chapter with Hibernate!
> It seems that only one tutorial exists with these 3 frameworks...
>
> Does somebody know if it exists code generator for the interfaces  
> when using these 3 framework?
> Because, I'm afraid on the number of classes we have to develop to  
> only retrieve one row in a table!
>
> Thanks for help
>
>
>   ----- Original Message -----
>   From: Wendy Smoak
>   To: Struts Users Mailing List
>   Sent: Wednesday, November 02, 2005 5:16 PM
>   Subject: Re: Struts + Spring + Hibernate
>
>
>   On 11/2/05, Gaet <ga...@free.fr> wrote:
>
>>
>>
>> Are there some developers here who use this solution?
>> Does someone have a good tutorial or sample to indicate? (I've  
>> already
>> seen "Wiring your web applications with Open Source  
>> java"..thanks :o))
>>
>>
>
>   For the Struts + Spring part, Ted recently posted a link to a  
> good article:
>   http://www-128.ibm.com/developerworks/java/library/j-sr2.html
>
>   --
>   Wendy
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts + Spring + Hibernate

Posted by Gaet <ga...@free.fr>.
Thanks Wendy,

yes, this article is a good presentation but it's a pity that there is not a chapter with Hibernate!
It seems that only one tutorial exists with these 3 frameworks...

Does somebody know if it exists code generator for the interfaces when using these 3 framework?
Because, I'm afraid on the number of classes we have to develop to only retrieve one row in a table!

Thanks for help

 
  ----- Original Message ----- 
  From: Wendy Smoak 
  To: Struts Users Mailing List 
  Sent: Wednesday, November 02, 2005 5:16 PM
  Subject: Re: Struts + Spring + Hibernate


  On 11/2/05, Gaet <ga...@free.fr> wrote:
  >
  >
  > Are there some developers here who use this solution?
  > Does someone have a good tutorial or sample to indicate? (I've already
  > seen "Wiring your web applications with Open Source java"..thanks :o))
  >

  For the Struts + Spring part, Ted recently posted a link to a good article:
  http://www-128.ibm.com/developerworks/java/library/j-sr2.html

  --
  Wendy

Re: Struts + Spring + Hibernate

Posted by Wendy Smoak <ws...@gmail.com>.
On 11/2/05, Gaet <ga...@free.fr> wrote:
>
>
> Are there some developers here who use this solution?
> Does someone have a good tutorial or sample to indicate? (I've already
> seen "Wiring your web applications with Open Source java"..thanks :o))
>

For the Struts + Spring part, Ted recently posted a link to a good article:
http://www-128.ibm.com/developerworks/java/library/j-sr2.html

--
Wendy

Re: Struts + Spring + Hibernate

Posted by netsql <ne...@roomity.com>.
I use a diferent stack, this one: http://ibatis.apache.org/petstore.html
not what you asked for but..


Martin Ravell wrote:
>> Are there some developers here who use this solution?
>> Does someone have a good tutorial or sample to indicate? (I've already
>>seen "Wiring your web applications with Open Source java"..thanks :o))
>>
>> Thanks for your feedback on this architecture :o)
>>
> 
> 
> Check out Matt Raible's Equinox project. For that matter you can get a head
> start on this combination using Appfuse.
> 
> 
> Regards
> Marty


-- 
thx,
.V

Your Roomity Broadband Community <http://roomity.com/demo.jsp>

cell: 917 825 3035 in DFW
email: netsql at roomity.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts + Spring + Hibernate

Posted by Martin Ravell <st...@rave-tech.com.au>.
>  Are there some developers here who use this solution?
>  Does someone have a good tutorial or sample to indicate? (I've already
>seen "Wiring your web applications with Open Source java"..thanks :o))
>
>  Thanks for your feedback on this architecture :o)
>

Check out Matt Raible's Equinox project. For that matter you can get a head
start on this combination using Appfuse.


Regards
Marty




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org