Struts 1.3 and Hibernate

K

kate

Hello,

I am creating my first web application using Struts 1.3 and Hibernate
in Eclipse. Everything is going reasonably well so far and I have all
the setup complete and I am doing some of my basic functionality such
as login using (jsp -> actionform -> action). However I have a query
about 'best practice', when creating common methods for my users (such
as hashing passwords, checking whether a user exists, formatting
results etc) and where these should go, i.e whether I should create a
pojo for Users, whether this should implement/extend a pre-created
hibernate class (such as users.java, abstractUsers.java or
UsersDAO.java), or whether I should just store them in my Action
Classes and call the class whenever I need to use this method.

Many Thanks
Kate
 
A

Arne Vajhøj

I am creating my first web application using Struts 1.3 and Hibernate
in Eclipse. Everything is going reasonably well so far and I have all
the setup complete and I am doing some of my basic functionality such
as login using (jsp -> actionform -> action). However I have a query
about 'best practice', when creating common methods for my users (such
as hashing passwords, checking whether a user exists, formatting
results etc) and where these should go, i.e whether I should create a
pojo for Users, whether this should implement/extend a pre-created
hibernate class (such as users.java, abstractUsers.java or
UsersDAO.java), or whether I should just store them in my Action
Classes and call the class whenever I need to use this method.

In my world:

JSP - presentation layer
action - control layer
what you are talking about - business layer
Hibernate data classes - data access layer

I think you need something between you action classes and
your Hibernate data classes.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top