Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Struts 1.3 and Hibernate

Reply
Thread Tools

Struts 1.3 and Hibernate

 
 
kate@katefalconer.co.uk
Guest
Posts: n/a
 
      03-12-2008
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
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      03-17-2008
wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hibernate LazyInitializationException in web application Struts asMVC, Spring as IOC and Hibernate as ORM layer Amit Jain Java 7 04-27-2009 10:27 AM
HIBERNATE - java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration Eleanna Skouta Java 2 12-09-2008 02:09 AM
Hibernate cannot find hibernate.cfg.xml jstorta Java 1 01-19-2008 01:45 PM
Hibernate Syncronizer now generates code for Hibernate 3.0 msenin@covad.net Java 0 07-14-2005 05:47 AM
[HIBERNATE] [EVALUATION] - Gavin King Censors Hibernate Forum Ilias Lazaridis Java 0 12-27-2004 04:26 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57