FUNDAMENTAL QUESTION 1:

G

Gary

Hi, I thought I new lots about java programming but I dontthink I do
now. I have just been on a cramming course and we were using Tomcat
for our servlets. Someone said they had used that "application server"
before and the tutor said no, "it wasn't an application server, it was
a servlet container". So what is the differerence and when would you
use the later over the former.

Thank you
Gary Hindrew
 
A

Andrew Thompson

Gary said:
Hi, I thought I new lots about java programming but I dontthink I do
now. I have just been on a cramming course and we were using Tomcat
for our servlets. Someone said they had used that "application server"
before and the tutor said no, "it wasn't an application server, it was
a servlet container". So what is the differerence and when would you
use the later over the former.

Why don't you ask your tutor and report back?
Or.. did your _tutor_ ask you to find out for
your _homework_? ;-)
 
S

Sudsy

Gary said:
Hi, I thought I new lots about java programming but I dontthink I do
now. I have just been on a cramming course and we were using Tomcat
for our servlets. Someone said they had used that "application server"
before and the tutor said no, "it wasn't an application server, it was
a servlet container". So what is the differerence and when would you
use the later over the former.

Thank you
Gary Hindrew

The terminology is correct. Tomcat it a servlet contain as it
implements the Servlet/JSP specifications. JBoss is an application
server as it implements the J2EE specifications. Other app servers
include IBM's WebSphere, BEA's WebLogic, Sun's ONE Server, etc.
As to when to use each, that's a bit trickier. If your needs
become complex, such that you're looking at using multiple third-
party products to support transactional contexts, two-phase
commits and the like then you'll reach a point where it's simply
cheaper and easier to do it all in a J2EE server. They don't come
cheap but then neither do the third-party products.
The question has come up before on this newsgroup and there's no
"hard and fast" answer. You have to analye each situation before
making a recommendation. Sorry.
 
P

pete kirkham

Gary said:
Hi, I thought I new lots about java programming but I dontthink I do
now. I have just been on a cramming course and we were using Tomcat
for our servlets. Someone said they had used that "application server"
before and the tutor said no, "it wasn't an application server, it was
a servlet container". So what is the differerence and when would you
use the later over the former.

An application is a server for applications- a client communicates with
it to invoke a process on a remote machine. Application servers may be
built on many technologies, including servlets. Historically, and the
largest deployed base, application servers make their connection through
telnet and the communication is plain text. Richer application server
technologies includes the X server system, which allows full interaction
with a wimp GUI application over a network. Other application serving
technologies are based on RPC, ASN.1 and CORBA, in which effieint binary
message take the place of the text-based messages used in web applications.

A web application server is an application server that uses http as its
communication protocol. Layered on top of the http may be plain text,
mime, XML RPC or any other message format - including RPC and CORBA if
you're so inclined. Web application severs are popular because it is
possible to access them with a commonly available client that provides
simple form and text UI (unlike X where to program the application
require more knowledge of a full windowing system library, or telnet
where the client is text only) and the protocol is easy to implement
(you only have to read a socket an parse one line of text). For
anything more complicated, eg 3D rendering or fuller GUIs like Java web
launch or XUL, the web application server paradigm generally pushes the
processing back to the client, so you end up with only half teh
application server side.

A servlet container is built into a web application server to enable it
to run application engines based on the Java servlet technology. Through
it the servlet handle requests that are passed to it via a standard
interface, without the application layer having to manage load balancing
and (to an extent) other resource management.

A J2EE web application server implements an interface giving additional
functionality for enterprise applications.

Tomcat is a web application server, which either contains or is a
servlet container, depending on the version (version 4.0 the container
has a seperate identity and is called Catalina, versions 3.0 and 5.0
doen't make this distinction). It is not a J2EE web application server.

As to which technology you use to implement your application server,
that depends on many factors. If the interface is to a human via simple
text and forms, you might send html and recieve mime over http, and use
a web server. Applications with more complexity require fatter clients,
so the server stops being an application server and takes more of a
mediation role for sharing common resources between applications than
are running on the client. The technology implementing the application
in the server has no bearing on whether the server is an application
server or not-if you have specified your interfaces and protocols
sensibly, you should be able to replace a GCI based server with a J2EE
one without the client requiring any change, or any change in the
functionality of the application.

Some web application servers use CGI. Some use JSP, PHP and ASP. If the
application lends itself to being implemented on the JVM, you can use
servlets. If you wish to manage state automatically and connect to
databases, then J2EE may help with that functionality, and impose an
component architecture that is intended to help reuse.


Pete
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top