IMHO, 

I think EJB is a great way to manage complexity.  We have a proprietary
system and an EJB system that does the same thing.  It took 5 years to
create Proprietary and <6 mo EJB.  Proprietary system is very cool, uses all
kinds of transaction config and map files, it's own language for SQL
interface and serializations, 8 config and map files per transaction... 

Guess which one is easier to upgrade?

EJB manages all the plumbing for you behind the scenes in a standardized
way.  If your Architect is hit by a truck, you will not loose 2 years
development time.  Yeah, some times you don't want that much plumbing to
deal with, so develop your own objects.  But pretty soon you begin to
realize that you're in the business of creating the plumbing instead of the
business logic.  Plumbing can be nice too, but you need results quickly.  So
you are right back at EJB solution.

Just my 20 cents.

Greg


-----Original Message-----
From: Nahid, Nazneen (CORP, Consultant)
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 2:22 PM
To: JDJList
Subject: [jdjlist] Re: What are the advantages of using EJB?


Thanks Andy. So it means if there are lot of complexity involved then one
should not go forward with EJB.

-----Original Message-----
From: Andy Bentley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 1:16 PM
To: JDJList
Subject: [jdjlist] Re: What are the advantages of using EJB?


IMO,  Container managed Entity beans provide a quick and dirty solution. The
server manages the persistence of your object and transactions.  So its
easy to get a simple EJB app up and running for Demo, or have something to
show to mgt or clients quickly.  This may be good enough if your over all
app is not very complex.  EJB does allot of the work for you and makes it
quick to deploy, but if you have tons of data and scope creep where that you
get more beans that have to cooperate, the overhead can adversely affect
your performance.  Bean managed persistence gives the programmer more
control
over the persistence. So if you need more control you can go that way, its
20 to 50 % more code (depending on the size of your classes - if you have a
tiny class that's mostly data with getters & setters but not any long
methods, the DB code can double the size of a class).

One thing that you want to keep an eye on while your modeling, is to model
your major processes as Session beans which act as controllers, entity
beans as model, then servlets or java applets or whatever as your view.

I have heard tell of shops who put too much control in their entity beans.
When scope creep happens, the entity beans then have to cooperate directly
among each other (without session bean controllers).  When you combine model
and controller - Performance, maintenance, extensibility, transaction
boundaries/scope, ability of anyone who didn't write it to understand it,
sales, all goes rapidly downhill.


"Nahid, Nazneen (CORP, Consultant)" wrote:
> 
> Greetings everybody,
> 
> I have been involved in developing Web Application in Java .
> All the web applications that we have used are based on java classes and
the
> jsp.
> Even our database connection pooling are based on the concept of simple
> threads and classes.
> 
> I have an oppurtunity to design an new Web Application and I would like to
> give it a pattern and strong foundation.
> 
> Question is :- What is the advantage of using EJB over simple Java
Classes?
> 
> I have got lot of documnetation, but I am in search of a simple question
why
> do we need EJB over simple Java Classes?
> I may sound stupid but would appreciate an answer.
> 
> FYI- the Application server is WebSphere v3.5.
> 
> Thanks
> Nazneen Nahid
> 
> To change your membership options, refer to:
> http://www.sys-con.com/java/list.cfm


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to