This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Learn Java with Math: Using Fun Projects and Games and have Ron Dai on-line!
See this thread for details.
Win a copy of Learn Java with Math: Using Fun Projects and Games this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Design related doubt

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I am new to struts.please clarify my doubt below:

Can we use struts and hibernate with out spring frame work.
I know Hibernate is a persitant framework.
If we are using only struts and hibernate, do we need to write model classes again for business logic(As hibernate is used for persistant logic).

So how to manage with only struts and hibernate.

Thank you,

Srini.
 
Srini vasu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody please clarify my doubt.


Thanks,
Srini.
 
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Srini.

Yes, you can use Struts, Hibernate and Spring together. Using Struts and Hibernate together is easy and direct, since each framework stands in different ends of your application. Struts will provide the front controller (as usual) with other resources and Hibernate the back end persistence.

Spring requires some extra configuration, but it should not be difficult to plug it in together, because it is already prepared to work with both Struts and Hibernate (along with other frameworks). However, you'll have to use Struts and Hibernate in the way Spring "tells" you to do.

About business logic, I think it's a deeper issue (maybe you can start such discussion in another forum). Some people don't write business logic in the persistent classes (they write in session beans, for example). Other people write only simple business logic in persistent classes. There're also people that prefer to write business logic in POJOs and make them agnostic (somehow) of the persistent mechanism. Where I currently work, most business logic is writen in the persistent classes. So, you might wanna search around for good strategies of where to place business rules and make your decision.
 
Srini vasu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leandro Melo,

Thank you for your clarification, I will try to find out different startagies for wrting Business logic.


Thanks alot,
Srini.
 
Popeye has his spinach. I have this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!