Application written with Servlets

J

John

Hi all:

I used to use Java quite a bit but it was a while ago and before J2EE became
mainstream. A customer presented me with a situation recently where he said
they have written their entire application using servlets, and I am
wondering if someone out there can tell me if this is an acceptable
approach, or would it be better to use EJBs? Please note my EJB experience
is nil, but I did work with servlets a bit, I am just not sure if servlets
alone should be used to build a viable solution.

Thanks.

John.
 
D

Daniel Pitts

John said:
Hi all:

I used to use Java quite a bit but it was a while ago and before J2EE became
mainstream. A customer presented me with a situation recently where he said
they have written their entire application using servlets, and I am
wondering if someone out there can tell me if this is an acceptable
approach, or would it be better to use EJBs? Please note my EJB experience
is nil, but I did work with servlets a bit, I am just not sure if servlets
alone should be used to build a viable solution.

Thanks.

John.
Most of the webapps we create at my work are created without EJBs.

Generally, Servlets aid in writing applications, but instead
applications are written as Servlets.

Many of our apps are created using Spring, Tiles, Hibernate/iBatis,
JSPs, etc...

So, yes, it is possible to do things without EJB. EJB's tend to be
extremely heavyweight from what I hear, but I don't have any real
experience, so I can't give you any more opinion than that.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

John said:
I used to use Java quite a bit but it was a while ago and before J2EE
became mainstream. A customer presented me with a situation recently
where he said they have written their entire application using servlets,
and I am wondering if someone out there can tell me if this is an
acceptable approach, or would it be better to use EJBs? Please note my
EJB experience is nil, but I did work with servlets a bit, I am just not
sure if servlets alone should be used to build a viable solution.

EJB is not a replacement for servlets.

If you need a web GUI then servlets is a possibility, but
nowadays I would recommend JSP with JSF and possible
an AJAX taglib.

If you have big transactional and scalability requirements,
then consider putting EJB's behind your web app.

Arne
 
L

Lew

Arne said:
EJB is not a replacement for servlets.

If you need a web GUI then servlets is a possibility, but
nowadays I would recommend JSP with JSF and possible
an AJAX taglib.

JSP are really servlets, but that aside, there is still a need for a few
servlets in many Web projects. If you follow the MVC pattern, there is a
controller servlet (possibly provided by the Struts framework, e.g.), there
might be a few helper servlets for special purposes.
If you have big transactional and scalability requirements,
then consider putting EJB's behind your web app.

EJBs scare me, but Java 6 offers hope to make it easier. But that only has to
do with the implementation details - they clearly serve a useful architectural
niche.

- Lew
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Lew said:
JSP are really servlets,

Yes. Implementation wise/internally. Which is very relevant
for the question about comparing performance og JSP and servlet.
Not so relevant if the question is about what to write.
but that aside, there is still a need for a few
servlets in many Web projects. If you follow the MVC pattern, there is a
controller servlet (possibly provided by the Struts framework, e.g.),
there might be a few helper servlets for special purposes.

It is rather rare to write those one self now a days.

JSF comes with a controller servlet as well.

The only good usage I can see for a user written servlet
is one for displaying graphics.
EJBs scare me, but Java 6 offers hope to make it easier. But that only
has to do with the implementation details - they clearly serve a useful
architectural niche.

Java 6 does not have anything about EJB.

Do you mean J2EE (or JEE) 5 ?

EJB is a rather big niche in J2EE.

Arne
 
L

Lew

Arne said:
Java 6 does not have anything about EJB.

Do you mean J2EE (or JEE) 5 ?

Uh, right. I tend to lump the two together in my mind. I was referring to the
elimination of that home/remote interface mechanism and the other streamlining
that's been done to EJBs in *JEE 5*.
EJB is a rather big niche in J2EE.

Yes, big, useful, and now somewhat less scary.

- Lew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top