Application server VS web server

F

fabio.barbieri78

Hello,
who could explain the difference to me between "Application server"
(JBoss, WebSphere ... ) and a "web server" ( Apache , IIS ... )
 
O

Oliver Wong

dennis said:

I didn't like how the author said "The majority of a Web server's work
is to execute HTML or scripting such as Perl, JavaScript, or VBScript." It
is very misleading.

While it's conceivable that a web server could be set up to actually
parse and execute JavaScript and VBScript, it's much more common by far for
the web server to just send the JavaScript source code exactly as-is to the
client, which is free to do whatever it wants with that content (though
probably the client will choose to parse and execute that JavaScript code).

By the time the client has started running the JavaScript, the web
server has probably already disconnected from the client and gone to sleep
waiting for other requests.

What's especially bad is that the author put Perl in the same list as
JavaScript. Perl *IS* typically executed on the server, and very rarely
passed on to the client for them to execute. In other words, the way the
webserver handles Perl and JavaScript are each others opposites, but the way
the author phrased it, it sounds like they would be processed the same way.

- Oliver
 
D

Dag Sunde

Oliver Wong said:
I didn't like how the author said "The majority of a Web server's work
is to execute HTML or scripting such as Perl, JavaScript, or VBScript." It
is very misleading.

While it's conceivable that a web server could be set up to actually
parse and execute JavaScript and VBScript, it's much more common by far
for the web server to just send the JavaScript source code exactly as-is
to the client, which is free to do whatever it wants with that content
(though probably the client will choose to parse and execute that
JavaScript code).

By the time the client has started running the JavaScript, the web
server has probably already disconnected from the client and gone to sleep
waiting for other requests.

What's especially bad is that the author put Perl in the same list as
JavaScript. Perl *IS* typically executed on the server, and very rarely
passed on to the client for them to execute. In other words, the way the
webserver handles Perl and JavaScript are each others opposites, but the
way the author phrased it, it sounds like they would be processed the same
way.

I didn't find it misleading at all...
The author should have mentioned PHP as well...

My point is that all those scripting-languages is very common as server-side
scripting languages.

The fact that VBScript (IE) and Javascript is commonly used as client-side
scripting-languages doesn't change the fact that they are very common
server-side. Actually, most people that use IIS for one reason or the other
use VBScript server-side.
 
O

Oliver Wong

Dag Sunde said:
I didn't find it misleading at all...
The author should have mentioned PHP as well...

Indeed, if the author had went with "Perl, PHP, Ruby", I wouldn't have
said anything.
My point is that all those scripting-languages is very common as
server-side
scripting languages.

The fact that VBScript (IE) and Javascript is commonly used as client-side
scripting-languages doesn't change the fact that they are very common
server-side. Actually, most people that use IIS for one reason or the
other
use VBScript server-side.

Right, I'm aware of VBScript as a legal sub-language within ASP, which
is why I didn't mention VBScript so much in my post. This is the first I've
ever heard of JavaScript being another legal sub-language.

Apparently, IE also supports something called "PerlScript", so it looks
like Perl (or some facsimile thereof) could be run client-side as well.

- Oliver
 
D

Dag Sunde

Oliver Wong said:
Dag Sunde said:
"Oliver Wong" <[email protected]> skrev i melding


Right, I'm aware of VBScript as a legal sub-language within ASP, which
is why I didn't mention VBScript so much in my post. This is the first
I've ever heard of JavaScript being another legal sub-language.

Just start your .ASP page like this:

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

I use it sometimes in IIS because of JS' superior functions
when it comes to Regular Expressions.
Apparently, IE also supports something called "PerlScript", so it looks
like Perl (or some facsimile thereof) could be run client-side as well.

Now *that* was news for me!

:)
 
A

Andy Dingley

who could explain the difference to me between "Application server"
(JBoss, WebSphere ... ) and a "web server" ( Apache , IIS ... )

There are three layers really.

"Web servers" serve static content, such as HTML files, images etc..
They don't do anything other than serve static content, unchanged.

Most web servers now have some sort of "plugin" architecture that allows
"filters" to be installed. These recognise particular sorts of content
and can perform operations on them server-side, before serving the
document across the web. Simpler examples of these plugins could
process SSI (include files) in HTML documents, select an appropriate
langauge version of pre-existing HTML content according to browser
request headers, or re-size images on demand. Under Apache HTTP Server
these plugins can be found as "mod_negotiate" and the like, for IIS
look at "ISAPI filters"

It's now rare to find a web server that does anything more than either
serve content, or pass it to the plug-ins. The plug-ins are doing much
of the complexity, if not the sheer volume.

A sophisticated plug-in would be a server-side language processing
engine, such as mod_php or the ASP filter for IIS. These can either
process a recognised language from the file type, or (as IIS does) it
hands off the language interpreter to a further plug-in language engine
that interprets any one of a number of "<foo>Script" languages, from
JScript and VBScript through to PerlScript or even COBOLScript. Each of
these languages supports a common syntax for embedding language
fragments in an ASP page and their engines support a common COM
interface for ASP Script.


Tomcat is something different, but externally similar-looking. It's
termed a "Java Servlet container" becase what it does is to execute Java
Servlets (Java programs that use a particular web-dependent
HTTP-specific interface). It's both the externally visible server, and
the language engine (not a plug-in). As both Tomcat and HTTP Server are
part of the Apache project, they do integrate well together.

JSP (Java Server Pages) are ASP-like in that they appear to be HTML with
embedded code fragments in them. However they're executed by being
turned into Servlets first, compiled and then executed by Tomcat just as
if they'd been coded as Servlets in the first place. This is quite
different (and better) than how ASP works.

Tomcat is usually run in conjunction with Apache HTTP, but you can run
it alone, as its own web server. Not ideal for a mainstream production
site (just use Apache as well) but it can be convenient for light use.

JSP and Servlets are part of J2EE, but they're not EJB (the other main
component of J2EE). EJB are run under an App Server, such as Weblogic,
Websphere or JBoss. There are several reasons why you might wish to do
this.
- You need the performance of executing middleware components on a
large server farm.
- You already have pre-existing EJB components.
- You want an architecture with more layers than simple Servlets.
- You want an architecture like SOA that's distributable over multiple
sites.

In general, Apache HTTP is the pragmatic solution to anything involving
web serving. Tomcat is the solution to anything with complex server-side
scripting. Ruby on Rails might cope for the small stuff, otherwise go
Tomcat. Avoid "enterprise" tools like EJB or App Servers until you
actually need them. Most projects, even quite big ones, don't.


Be warned that "simple" configurations that have happily deployed onto
Tomcat for many versions past may fail entirely when deploying onto an
App Server. They're fussier and more variable about their configuration
too (guess what today's problem is!)
 
D

dingbat

Oliver said:
Apparently, IE also supports something called "PerlScript", so it looks
like Perl (or some facsimile thereof) could be run client-side as well.

IE and ASP support the "ASP programming language interface" (M$ will
have a proper name for this, which I neither know nor care about). You
can write _any_ language engine to work with this, so long as it allows
the source to be supplied in a simple form that's broadly "HTML with
code snippets delimited by <@ ... @> markers" and it also has a simple
COM interface to the engine itself.

This is one of the reasons why all ASP code (in any language) always
reeks of COM throughout, particularly for data typing and Collection
handling.

Of course this flexibility is more use on the server than on the
client, owing to the need to pre-install language components. Still,
someone with an intranet might find it worthwhile to deploy <foo>Script
one day.

I've personally used PerlScript (best way to port old Perl CGI code
onto IIS, although I wouldn't recommend it). COBOLScript was one of my
favourite ever hacks for making some old legacy data appear on the web
almost instantly (I did a 3 month project in 2 weeks with that, and
billed accordingly!). I've also seen RexxScript, which is handy for
the IBMers and Amigoids.

The only one I'd definitely recommend against is VBScript. You can do
anything with JScript that you can do with VBScript and it's a much
nicer language (try and catch are themselves sufficient reason).
 

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
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top