File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Design related doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Design related doubt" Watch "Design related doubt" New topic
Author

Design related doubt

Srini vasu
Greenhorn

Joined: Jun 08, 2007
Posts: 10
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

Joined: Jun 08, 2007
Posts: 10
Anybody please clarify my doubt.


Thanks,
Srini.
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401
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.


Leandro Melo
SCJP 1.4, SCWCD 1.4
Srini vasu
Greenhorn

Joined: Jun 08, 2007
Posts: 10
Hi Leandro Melo,

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


Thanks alot,
Srini.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Design related doubt
 
Similar Threads
INTEGRATION DOUBT.
General doubt
doubt
doubt
If doubt