struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron O'Hara" <aa...@globalreachsoftware.com>
Subject RE: [OT]: Struts, Web Development, J2EE, and what is too much?
Date Tue, 11 Mar 2003 22:48:06 GMT
Thanks for you detailed reply.  Is it a safe to say that if all the
following are true, EJBs may not be a wise choice:

-- I want to provide DB Vendor specific queries that are optimized to
take advantage of each vendor

-- the application has only 1 front end, servlets/jsp

-- There is only one "data store" and transactions do not span more than
1.

-- entity model is far different than object model

I find that in my design, the object model differs greatly from
database.  From an application's perspective, you design it so that it
is usable and uses appropriate modeling based off of the requirements of
the application.  For example, if you stored all email addresses in a
separate table and had a contact table, you may decided that your object
model will have an emailAddress field and not a foreign key reference to
the record in an EmailAddress object.

>From a database design point of view, you may interpret the requirements
and design the database based on a number of different factors, such as
normalization, performance, etc.  An application that is report-heavy
may benefit from de-normalized design whereas an input-heavy may benefit
from a highly normalized design.  Based on that line of thinking, one
may decide to put all email addresses in a separate table.  (This is not
a great example, since most contacts will have a unique address, but
hopefully my point is still coming across).

Given the above, does it make sense that EJBs are not necessary and I
would not receive a great benefit from them?

Thanks,

Aaron

-----Original Message-----
From: Robert McIntosh [mailto:robert@bull-enterprises.com] 
Sent: Tuesday, March 11, 2003 8:39 AM
To: Struts Users Mailing List
Subject: Re: [OT]: Struts, Web Development, J2EE, and what is too much?

Tony made some good points, and my take is that from your requirements, 
you may not need EJBs. However, if you layered your app sufficiently, 
then if you end up needing them later on, it shouldn't be too much of a 
problem. Of course I am assuming you are referring to Entity beans in 
this case...

As for when to use EJBs, what I have always recommended to our clients 
is that EJBs are good for large scale applications that run on clustered

machines and require transactions at the entity bean level. The 
transactions are good if you have multiple apps and clients that are 
modifying the same data. If your app is largely read only, it is the 
only one interacting with the data and you aren't worried about 
concurrent modifcation, then you probably don't need entity beans. Yes, 
most app servers can cache and mark entity beans as read-only or mostly 
read-only for performance, but there are other ways of doing the same
thing.

Another thing to consider is how your object model is designed. If you 
have lots of inheritance, entity beans aren't going to fit you well. 
Same can be said if you have complex query requirements (joins, 
relationships that the object model doesn't support, etc.).

Then again, in some cases as Nash pointed out, EJBs can be simplier from

the perspective that any good app server can build the database for you 
and with tools like XDoclet, you don't have to write deployment 
descriptors and you don't have to maintain (i.e. code) the interfaces 
for home, remote and local.

- Robert

Aaron O'Hara wrote:

>I know this question has probably been asked before, and that biased
>publications have had their opinions on it, but I wanted to get some
>feedback regarding some "real user experience" regarding the use of EJB
>in a web application used along with Struts.
>
>I am creating a web application and I have decided to use struts.  The
>application needs to be high performance, uses a single database (so it
>doesn't have heterogeneous transactional db requirements).  I have
>designed the application in layers, and it will only have a web
>interface.  It's starting small, but will grow to have many functions.
>Even though I'm confident that I need not invest in EJB's, I don't want
>to develop the application to find out I should have used them (hence
>why I'm creating this post).
>
>In what scenarios have people found the use of EJB beneficial?  When
>have they been overkill?  Does struts integrate smoothly with EJBs?
>
>My fear is that I'll make the application overly complex by
implementing
>EJBs, but I'd like to hear from people with experience building large
>web-only projects with struts.
>
>Thanks,
>
>Aaron
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message