Struts 1.3 and Hibernate

Discussion in 'Java' started by kate@katefalconer.co.uk, Mar 12, 2008.

  1. Guest

    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
    , Mar 12, 2008
    #1
    1. Advertising

  2. Arne Vajhøj Guest

    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
    Arne Vajhøj, Mar 17, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilias Lazaridis
    Replies:
    0
    Views:
    1,720
    Ilias Lazaridis
    Dec 27, 2004
  2. Replies:
    0
    Views:
    3,705
  3. jstorta
    Replies:
    1
    Views:
    11,753
  4. Eleanna Skouta
    Replies:
    2
    Views:
    8,423
    Arne Vajhøj
    Dec 9, 2008
  5. Amit Jain
    Replies:
    7
    Views:
    3,292
    Amit Jain
    Apr 27, 2009
Loading...

Share This Page