By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,686 Members | 2,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,686 IT Pros & Developers. It's quick & easy.

Client Side Vs Server Side Java Script

P: n/a
Hi Folks,

I am new for this group. I want to clarify one thing what's a basic
difference between Client Side Java Script and Server Side Java
Script. how we can differentiate it. Why we called this kind of script
"Server Side Java Script".

I am in confusion because according to lots of web developer Java
Script is a client side scripting language. We can not say it Server
Side Java Script.

So let's have a discussion over this topic. Any clarification abt this
would be appreciable.

Thanks in advance

Jun 28 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
This sounds your homework question.

Jun 28 '07 #2

P: n/a
On 28 Jun, 07:59, Ankur <khar...@gmail.comwrote:
Hi Folks,

I am new for this group. I want to clarify one thing what's a basic
difference between Client Side Java Script and Server Side Java
Script. how we can differentiate it. Why we called this kind of script
"Server Side Java Script".

I am in confusion because according to lots of web developer Java
Script is a client side scripting language. We can not say it Server
Side Java Script.

So let's have a discussion over this topic. Any clarification abt this
would be appreciable.

Thanks in advance
Fundamentally there are not two different specifications of
JavaScript, one for the client and one for the server: it is the same
JavaScript, just run in a different context.

Your starting point is the language specification, which is
formalised as "ECMAScript" - http://www.ecmascript-lang.org/. It is
currently at Edition 3, but Edition 4 (backwards compatible) is in the
pipeline.

Any application wishing to use ECMAScript must create its own
implementation of the language specification.

FireFox (Mozilla, Netscape) have their implementations (Rhino and
Spidermonkey) of Edition 3, and their current version is JavaScript
1.7 I believe.

Microsoft's implementation is called JScript, currently at version
5.6.

Edition 4 (which introduces namespaces, classes etc) is not yet
formally implemented, although ActionScript (Adobe Flash), and
JScript.NET (Microsoft .NET) implement substantial parts of it.

Any differences you encounter in different language implementations
will largely be down to how much of Edition 3 (or 4) has been
implemented, and whether the implementer has added anything else
outside the formal specification.

In terms of implementations in browsers, you can rely on all of the
latest browsers now having virtually complete implementations of
Edition 3.

In terms of "client side" or "server side", this is a question about
how ECMAScript is *used*, not what it is, or is not. The language
specification says nothing about the environment in which it is run.
>From my understanding:-
(a) Client Side

When scripts are downloaded over the internet or an intranet by a web
browser as part of a web page, and run in that web browser, that usage
is termed "client side".

Those scripts cannot talk to the server from which they were
downloaded, except indirectly through some remote scripting means,
such as the XMLHttpRequest object.

Client side usage is by far the predominant usage of JavaScript.

(b) Server Side

Where you have a program running on a web server to dynamically
generate your web pages, talk to databases etc, then this is known as
"server side scripting" (http://en.wikipedia.org/wiki/Server-
side_scripting).

Whether ECMAScript is used as a scripting language on the server
depends what program you are using.

The main two I am aware of that use ECMAScript are classic ASP and
ASP .NET

If you are using classic ASP, then JScript 5.6 will be available (as
well as VBScript), although the Sun One ASP Server uses a buggy
JScript 5.1 implementation.

In relation to ASP.NET, JScript.NET is one of the languages that is
supported I believe, although C# and VisualBasic a Microsoft's main
focus with .NET.

Other examples are given here : http://en.wikipedia.org/wiki/Server-side_JavaScript

Regards

Julian Turner

Jun 28 '07 #3

P: n/a
On Jun 28, 7:59 am, Ankur <khar...@gmail.comwrote:
I am new for this group. I want to clarify one thing what's a basic
difference between Client Side Java Script and Server Side Java
Script. how we can differentiate it. Why we called this kind of script
"Server Side Java Script".
One runs in the browser (the client), the other runs on the server
(the web server).
I am in confusion because according to lots of web developer Java
Script is a client side scripting language. We can not say it Server
Side Java Script.
Almost all JavaScript is client side. The majority of web developers
probably don't even realize that server side implementations exist.
The truth is that is is just a programming language and not specific
to server or client.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Jun 28 '07 #4

P: n/a
Thanks
On Jun 28, 1:17 pm, Julian Turner <julesb...@googlemail.comwrote:
On 28 Jun, 07:59, Ankur <khar...@gmail.comwrote:
Hi Folks,
I am new for this group. I want to clarify one thing what's a basic
difference between Client Side Java Script and Server Side Java
Script. how we can differentiate it. Why we called this kind of script
"Server Side Java Script".
I am in confusion because according to lots of web developer Java
Script is a client side scripting language. We can not say it Server
Side Java Script.
So let's have a discussion over this topic. Any clarification abt this
would be appreciable.
Thanks in advance

Fundamentally there are not two different specifications of
JavaScript, one for the client and one for the server: it is the same
JavaScript, just run in a different context.

Your starting point is the language specification, which is
formalised as "ECMAScript" -http://www.ecmascript-lang.org/. It is
currently at Edition 3, but Edition 4 (backwards compatible) is in the
pipeline.

Any application wishing to use ECMAScript must create its own
implementation of the language specification.

FireFox (Mozilla, Netscape) have their implementations (Rhino and
Spidermonkey) of Edition 3, and their current version is JavaScript
1.7 I believe.

Microsoft's implementation is called JScript, currently at version
5.6.

Edition 4 (which introduces namespaces, classes etc) is not yet
formally implemented, although ActionScript (Adobe Flash), and
JScript.NET (Microsoft .NET) implement substantial parts of it.

Any differences you encounter in different language implementations
will largely be down to how much of Edition 3 (or 4) has been
implemented, and whether the implementer has added anything else
outside the formal specification.

In terms of implementations in browsers, you can rely on all of the
latest browsers now having virtually complete implementations of
Edition 3.

In terms of "client side" or "server side", this is a question about
how ECMAScript is *used*, not what it is, or is not. The language
specification says nothing about the environment in which it is run.
From my understanding:-

(a) Client Side

When scripts are downloaded over the internet or an intranet by a web
browser as part of a web page, and run in that web browser, that usage
is termed "client side".

Those scripts cannot talk to the server from which they were
downloaded, except indirectly through some remote scripting means,
such as the XMLHttpRequest object.

Client side usage is by far the predominant usage of JavaScript.

(b) Server Side

Where you have a program running on a web server to dynamically
generate your web pages, talk to databases etc, then this is known as
"server side scripting" (http://en.wikipedia.org/wiki/Server-
side_scripting).

Whether ECMAScript is used as a scripting language on the server
depends what program you are using.

The main two I am aware of that use ECMAScript are classic ASP and
ASP .NET

If you are using classic ASP, then JScript 5.6 will be available (as
well as VBScript), although the Sun One ASP Server uses a buggy
JScript 5.1 implementation.

In relation to ASP.NET, JScript.NET is one of the languages that is
supported I believe, although C# and VisualBasic a Microsoft's main
focus with .NET.

Other examples are given here :http://en.wikipedia.org/wiki/Server-side_JavaScript

Regards

Julian Turner

Jun 28 '07 #5

P: n/a
In comp.lang.javascript message <11*********************@c77g2000hse.goo
glegroups.com>, Thu, 28 Jun 2007 09:06:55, David Dorward
<do*****@gmail.composted:
>On Jun 28, 7:59 am, Ankur <khar...@gmail.comwrote:
>I am new for this group. I want to clarify one thing what's a basic
difference between Client Side Java Script and Server Side Java
Script. how we can differentiate it. Why we called this kind of script
"Server Side Java Script".

One runs in the browser (the client), the other runs on the server
(the web server).
>I am in confusion because according to lots of web developer Java
Script is a client side scripting language. We can not say it Server
Side Java Script.

Almost all JavaScript is client side. The majority of web developers
probably don't even realize that server side implementations exist.
The truth is that is is just a programming language and not specific
to server or client.

--
DSS.

Javascript is not exclusively used client- or server- side; there is
more to computing than the Web.

Javascript can also be used within Web-type pages run locally in a
browser (web pages can be tested that way in development, though that is
not the only local use).

Javascript can also be executed in Windows Scripting Host - there,
VBScript is more common, which shows the benighted ignorance of the
average * programmer.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Delphi 3? Turnpike 6.05
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htmclpdmFAQ;
<URL:http://www.borland.com/newsgroups/guide.htmlnews:borland.* Guidelines
Jun 29 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.