Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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.
 
this llama doesn't want your drama, he just wants this tiny ad for his mama
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic