RE:[RE: EJB vs Servlets]

2000-10-09 Thread Alexandre POLOZOFF  

It sounds to me like it probably is not worth it for you to move to EJBs
considering how much you have invested in your current technology.

But some reasons we use EJBs where I work:

a) portability.  Stored procedures, mentioned in another post, are not
portable at all.  Whereas EJBs will run on a mainframe (Websphere),
midrange (AS/400) or Unix to PCs (weblogic, orion, websphere, etc) with
pretty much any database backend.

b) Sure, you have lookups, but then if you want remote access ...

c) NO SQL in our code (that could become a weird chant...).  Fits the KISS
principle and eliminates one learning curve (SQL is steeper than learning
EJB and XML descriptors that's for sure).  Plus, any change to the data
model is not that big a deal to us with EJBs because it is easier to
restructure an object and it's XML descriptors rather than chase down
every SQL call to update/modify it.  Especially in the maintenance phase
where the original programmers are no longer around and no-one knows just
where that insert/update/delete is happening...

d) Learning EJB is not that big a deal.  We put together a large website
all EJB based (with servlets and JSPs to round out MVC) in less than 3
months.  No one on the project had seen EJBs before.  Even lightweight
java programmers (less than a years experience) picked up on the concepts
and were productive.  Performance is on par with any other java
environment I've seen, even under heavy load (given that you have the
appropriate hardware behind it).

I think what we have is a case of fear, uncertainty and doubt.  My
experience with EJBs has been so good I'm going back to rewrite some of my
personal-hobby-related sites into EJBs.  That is how impressed I am with
EJB.

-Alexandre

On Mon, 9 Oct 2000 12:00:34 -0700
   "Duffey, Kevin" [EMAIL PROTECTED] wrote:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - -



Actually, I know all about it. I have read up on it in those books and
others. Infact, we have already separated our code into those tiers but it
all runs in the servlet engine. This is what I am talking about. I am
using
the Struts framework to allow all forms submitted to a single controller
servlet, which then calls upong action classes. Those action classes then
figure out what "session" class to call upon. These "session" classes are
our logic (ejb) code, but its not in the EJB container..it runs in our
servlet engine. It is separated, just not from the servlet engine itself.
However, by compexity of building EJBs, I think I mean what goes into it.
Instead of a single class, we would have 2 (or is it 3) interfaces and an
implementation class. To access it, its not as simple as a class/reference
variable to an object in the servlet engine, you have to do a lookup,
etc..its a bit more code. Sure..its not terribly complex, but compared to
doing it the way we are now, there is quite a bit more work involved than
what we are doing now. Also, actually testing and learning how exactly it
works is a process that will take a little time. All of these things add
up.
What I am wondering is..is it really worth it if supposedly EJB doesn't
offer much in the way of performance..it just separates the logic into a
separate "tier" of servers. Our code is already separated long those tiers
now..and it will probably be easier for us to move to EJB than those that
have logic in their servlets.


 -Original Message-
 From: Russ White [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 09, 2000 11:32 AM
 To: Orion-Interest
 Subject: RE: EJB vs Servlets


 You should read up on J2EE so you can understand what separation of
 data/logic/presentation is all about. I would recommend any
 of the O'Reilly
 books on the subject(s). Also Development of EJBs is very
 simple. Especially
 with a good IDE like VA, Forte, or JBuilder. Orion even comes
 with a simple tool
 for creating very useful EntityBeans from a GUI.

  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of
 Duffey, Kevin
  Sent: Monday, October 09, 2000 1:22 PM
  To: Orion-Interest
  Subject: EJB vs Servlets
 
 
  Hey all,
 
  I know this is a little off-topic, but seeing as how Orion
 is about the only
  fully compliant EJB server, I figured this would be a
 better place to ask.
 
  Lately I have talked to a number of people that have been
 moving towards EJB
  and pulled back because they have found it to be more
 tedious to develop, as
  well as the end result was slower than just using Servlets.
 
  I ask this because it appears to me that the servlet engine
 (at least with
  2.2) being able to be failed over, load-balanced, etc,
 seems to be quite as
  capable for scalability and fault-tolerance as the ejb
 engine used to be. I
  do realize that the EJB container offers transaction management, but
  connection pooling is available in the servlet engine at
 the server level as
  well. So, if you lose speed in development time and
 performance, 

RE: [RE: EJB vs Servlets]

2000-10-09 Thread Duffey, Kevin

Hi,

 I think what we have is a case of fear, uncertainty and doubt.  My
 experience with EJBs has been so good I'm going back to 
 rewrite some of my
 personal-hobby-related sites into EJBs.  That is how 
 impressed I am with
 EJB.

I think your exactly right. I bought an EJB book and started reading it and
the first couple of chapters have got me a little worried. ;) Actually..I
think once I actually figure out how to develop them, it will be less fear.
I am just looking at what needs to be done and it appears to be a lot of
work. Ideally I really want to learn about EJB, CMP and O/R, but I have no
idea where to being (other than that book i got). Is CMP and O/R a
standard..or vendor specific implementations? Do I need special tools for
CMP and O/R, or do all DBMS with Type IV JDBC 2.0 drivers support it. I am
looking at the Interbase 6 free RDBMS which I have used a while back with
C++Builder and the fact that its free and was pretty fast back then
impresses me. Its not for large-scale apps, but it will certainly work for
most tasks. But to actually get started, that seems to be taking the most
time. There isn't much docs on Orion on how to get EJB's working, CMP, O/R,
etc. I don't even fully understand those items yet, and am not sure if I
need tools to do that, or can I manually edit them, and so on.

Anyways..thanks for the reply. 




Re: Re EJB vs Servlets

2000-10-09 Thread Damian Guy

"van Geel, Leo" wrote:
 
  -Original Message-
  From: Rafael Alvarez [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 10, 2000 9:11 AM
  To: Orion-Interest
  Subject: Re[2]: EJB vs Servlets
 
 
  I'm currently developing a big project using EJBs,a backend for a
  one-hour delivery company. In fact, I'm using CMP EJB for the data and
  a fakade object for processing.There were few factors that
  influenced the
  choice:
  .- You don't have to code in SQL. That says a lot on easy manteinance.
  .- Don't need to understand, as a programmer, the how of
  inner working of
 your RDMBS.
 
 This is one of the big dangers I see happening around me. Don't fall in this
 trap.
 You need to understand what is happening behind the scenes. Poor performance
 is the result.
 A programmer needs to understand how the the code is accessing the database.
 That is a different story than understanding the DBMS internals! It is one
 of the bad things about CMP EJB's. I do not believe that generated SQL code
 can be optimal for all the different relational database backends.
 Impossible!
 
 DBA's raise your voice!
 
 Leo van Geel
 Massey University
 New Zealand

I agree that you need to understand what is happening behind the scenes,
but that doesn't mean that you need to re-invent the wheel! CMP EJB's
allow developers to concentrate on the business logic rather than having
to worry about database access code, this is a good thing. Besides, I
have run BMP vs CMP tests on several App server + DB combinations, CMP
wins hands down every time.

Damian