Servlet or EJB design question for Online Store

Discussion in 'Java' started by mj, Aug 24, 2004.

  1. mj

    mj Guest

    I'm sure this question gets asked all the time, so please bear with
    me.

    I am creating an online store for our company. As part of the design,
    I wanted to seperate the admin/back-office functions into a seperate
    webapp. The admin webapp will be located on our local company
    intranet. Currently I am planning on using WebWork/Velocity/Hibernate
    in the app. My question is about how to best design this in terms or
    servlets/ejb. Since both the storefront and the admin apps will share
    many of the same functions, if I create seperate webapps, I will be
    copying a lot of the same code into both apps. I have never used EJBs
    before, but it seems like if I put these shared functions into EJBs, I
    could then just call these functions from both my storefront and admin
    apps without having to copy any code?

    Using this logic, it seems like EJBs are the only way to go to share
    code? Is that correct? Has anyone worked on a similar project that can
    offer any advice?
     
    mj, Aug 24, 2004
    #1
    1. Advertising

  2. mj

    Sudsy Guest

    mj wrote:
    <snip>
    > I am creating an online store for our company. As part of the design,
    > I wanted to seperate the admin/back-office functions into a seperate
    > webapp. <snip>


    Most of the time you don't need a separate webapp. Investigate the use
    of roles for your clients. Admin users can be presented with different
    options than regular users. To be specific, check out
    javax.servlet.http.HttpServletRequest#isUserInRole( String role )
    You don't require a fully-fledged J2EE server to provide this
    functionality: a servlet container such as Tomcat can provide all
    you need.
     
    Sudsy, Aug 24, 2004
    #2
    1. Advertising

  3. mj

    Will Hartung Guest

    "Sudsy" <> wrote in message
    news:...
    > mj wrote:
    > <snip>
    > > I am creating an online store for our company. As part of the design,
    > > I wanted to seperate the admin/back-office functions into a seperate
    > > webapp. <snip>

    >
    > Most of the time you don't need a separate webapp. Investigate the use
    > of roles for your clients. Admin users can be presented with different
    > options than regular users. To be specific, check out
    > javax.servlet.http.HttpServletRequest#isUserInRole( String role )
    > You don't require a fully-fledged J2EE server to provide this
    > functionality: a servlet container such as Tomcat can provide all
    > you need.


    Also, even if you decide to go with seperate WebApps, there's no reason why
    the two applications can't share code and classes. Just because they're both
    using the same classes doesn't mean you're duplicating code. Just have two
    different build options from a single source tree.

    Regards,

    Will Hartung
    ()
     
    Will Hartung, Aug 25, 2004
    #3
    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. Steve
    Replies:
    1
    Views:
    704
    John C. Bollinger
    Jul 15, 2003
  2. Mumbai Joe
    Replies:
    0
    Views:
    611
    Mumbai Joe
    Jul 29, 2003
  3. circuit_breaker
    Replies:
    2
    Views:
    2,045
    Jack Jia
    Apr 4, 2004
  4. Phil Powell
    Replies:
    0
    Views:
    334
    Phil Powell
    Aug 29, 2007
  5. Raymond Schanks
    Replies:
    0
    Views:
    671
    Raymond Schanks
    Aug 3, 2010
Loading...

Share This Page