Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Servlet or EJB design question for Online Store

Reply
Thread Tools

Servlet or EJB design question for Online Store

 
 
mj
Guest
Posts: n/a
 
      08-24-2004
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?
 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      08-24-2004
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.

 
Reply With Quote
 
 
 
 
Will Hartung
Guest
Posts: n/a
 
      08-25-2004

"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
()


 
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
Possible to generate "ejb-jar.xml" from EJB class (source)? "ejb-jar.xml" appserver independent? Raymond Schanks Java 0 08-03-2010 08:21 AM
Any online information of Vignette-based servlet to Websphere-based servlet? Phil Powell Java 0 08-29-2007 01:29 PM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Dynamically Access & Call An EJB From Another EJB? Steve Java 1 07-15-2003 06:47 PM



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