473,725 Members | 2,271 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Client Side Vs Server Side Java Script

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
5 13122
This sounds your homework question.

Jun 28 '07 #2
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
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
Thanks
On Jun 28, 1:17 pm, Julian Turner <julesb...@goog lemail.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
In comp.lang.javas cript message <11************ *********@c77g2 000hse.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.demo n.co.uk/TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.bancoems.co m/CompLangPascalD elphiMisc-MiniFAQ.htmclpd mFAQ;
<URL:http://www.borland.com/newsgroups/guide.htmlnews: borland.* Guidelines
Jun 29 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1440
by: Mike Moore | last post by:
Can an asp.net button that is a server side control call a client side java function when the button is clicked? If so, please provide example.....thanks.,
5
1972
by: tmb | last post by:
Is there a way to use ASP to 'push' a new image to the client every 15 seconds or so? I guess the entire page will have to be 're-sent' to the client but I'm not sure. I'm trying to 'rotate' a new product image every few seconds. I could use an animated gif or some java script maybe, but I want to keep the file small and not have to count on the user having java script
1
2333
by: Stephen | last post by:
Hey Everyone, I have a problem with a web application due to the use of both client-side and server side script on the on-click event of a button. The client side script runs first as expected however my problem is that this code runs and brings up a Microsoft Internet Explorer Window telling the user they are going to be charged for the search they are about to do. The user then has to click ok or cancel. My problem with this is that I...
1
2319
by: Stephen | last post by:
Hey All, I have a problem with a web application due to the use of both client-side and server side script on the on-click event of a button. The client side script runs first as expected however my problem is that this code runs and brings up a Microsoft Internet Explorer Window telling the user they are going to be charged for the search they are about to do. The user then has to click ok or cancel. My problem with this is that I need...
5
2603
by: Mong | last post by:
Hi, I have a webform with various asp controls on it such as textboxes and dropdownlists. I'm fairly new to asp.net coming from VB6 and am wondering when it's best to use client side events and when it's best to use server side events. For example, if a textbox is to contain a date I want to validate the date when that textbox loses the focus. If the date is not valid I make visible a label next to the textbox telling the user it's
2
1423
by: MPA | last post by:
Hi, I am a newbee. All our applications so far were traditional client-server database applications. We are considering now writing our main application with Visual Studio .NET. Basically we want to be able to install each version of our software on one or two machines without having to meddle with typically several hundred client computers. We understand that using the new architecture we write server side code in C# or Visual Basic,...
3
1750
by: jesper_lofgren | last post by:
Hello, I have a problem, i have a event in asp.net codebehind file that updating a datasource. If that update went well i want to refresh my treeview thats on another page. The script works well, the problem is.... the client script runs before the updatemethod ! I give u some ex code here...
1
2776
by: Simon_21 | last post by:
Hi All, I have a servlet which is invoked from a jsp page. While the serlvet is executing, the jsp page is waiting for the servlet to complete. When the servlet completes, it informs the waiting jsp to redirect to another page. The waiting jsp has implemented onload which will redirect to the page informed by the servlet Server : (tomcat 6.0), Browser - IE 6.0, OS - WinXP
0
8889
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9116
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.