473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

JavaScript on the server side? Why not?

Hi,

I might be turning a corner today and seeing the light. I might still
be confused :)

If JavaScript is the language for the browser then why do servers use
Ruby/Rails, Perl/Catalyst, Python/Turbogears or PHP/Cake? Is it because
the prototype-based language is too different to be chosen except when
necessary. Is it because browser bugs make people think JavaScript is
bad? Is JavaScript not suitable for the server-side for any reason?

I imagine that if server-side programmers started to learn JavaScript
then the client-side code in the world might start to improve.
Translation layer libraries like Prototype.js or Mochikit wouldn't need
to exist. The more I learn about JavaScript the more I like it. It is
difficult to learn however for multiple reasons.

Peter

Nov 3 '06 #1
5 1355
Peter Michaux wrote on 03 nov 2006 in comp.lang.javascript:
Hi,

I might be turning a corner today and seeing the light. I might still
be confused :)

If JavaScript is the language for the browser then why do servers use
Ruby/Rails, Perl/Catalyst, Python/Turbogears or PHP/Cake? Is it because
the prototype-based language is too different to be chosen except when
necessary. Is it because browser bugs make people think JavaScript is
bad? Is JavaScript not suitable for the server-side for any reason?

I imagine that if server-side programmers started to learn JavaScript
then the client-side code in the world might start to improve.
Translation layer libraries like Prototype.js or Mochikit wouldn't need
to exist. The more I learn about JavaScript the more I like it. It is
difficult to learn however for multiple reasons.
Javascript in the version of MS jscript has been and is a trusted way of
doing serverside coding on a ASP platform.

Where traditionally many ASP programmers use VBscript, they do not know
what they are missing.

Example:

<%@ Language=JScript %>
<html>
<body>
<table border=1>
<tr><td>n<td>n squared
<%
for (var i=1;i<11;i++)
Response.write('<tr><td>'+i+'<td>'+i*i);
%>
</table>
</body>
</html>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 3 '06 #2

Peter Michaux wrote:
I might be turning a corner today and seeing the light. I might still
be confused :)
I"ve been using JS on IIS for years. Much easier for me to use the
same language on both the client and server.

For rapid development, we use a JScript-based server emulator that
grinds through tons of XML and XSLT to produce HTML pages depending on
the input request it got. This is about 3 pages of Javascript running
locally on a developer's laptop that, through semi-hardcoded response
data, emulates many pages of Apache/Blaze code running on monster
servers. Thus we're able to produce and test code very rapidly vs
deploying it to an actual server, resetting Websphere, etc.

We also use .js script files when deploying lots of code to laptops,
for WMI etc.

It's great stuff.

Kev

Nov 3 '06 #3
Peter Michaux wrote:
Hi,

I might be turning a corner today and seeing the light. I might still
be confused :)

If JavaScript is the language for the browser then why do servers use
Ruby/Rails, Perl/Catalyst, Python/Turbogears or PHP/Cake? Is it because
the prototype-based language is too different to be chosen except when
necessary. Is it because browser bugs make people think JavaScript is
bad? Is JavaScript not suitable for the server-side for any reason?

I imagine that if server-side programmers started to learn JavaScript
then the client-side code in the world might start to improve.
Translation layer libraries like Prototype.js or Mochikit wouldn't need
to exist. The more I learn about JavaScript the more I like it. It is
difficult to learn however for multiple reasons.

Peter
See Whitebeam:

http://www.whitebeam.org

Jeremy
Nov 3 '06 #4
"Peter Michaux" <pe**********@gmail.comwrote in
news:11**********************@e3g2000cwe.googlegro ups.com:
Hi,

I might be turning a corner today and seeing the light. I might still
be confused :)

If JavaScript is the language for the browser then why do servers use
Ruby/Rails, Perl/Catalyst, Python/Turbogears or PHP/Cake? Is it because
the prototype-based language is too different to be chosen except when
necessary. Is it because browser bugs make people think JavaScript is
bad? Is JavaScript not suitable for the server-side for any reason?

I imagine that if server-side programmers started to learn JavaScript
then the client-side code in the world might start to improve.
Translation layer libraries like Prototype.js or Mochikit wouldn't need
to exist. The more I learn about JavaScript the more I like it. It is
difficult to learn however for multiple reasons.
http://en.wikipedia.org/wiki/Server-side_JavaScript
Nov 4 '06 #5
I know - its a pain swapping languages every 5 minutes!
Under .NET you can program server side in 'javascript'
I think the mono team are working on that bit for the Mono setup
Tom
Peter Michaux wrote:
Hi,

I might be turning a corner today and seeing the light. I might still
be confused :)

If JavaScript is the language for the browser then why do servers use
Ruby/Rails, Perl/Catalyst, Python/Turbogears or PHP/Cake? Is it because
the prototype-based language is too different to be chosen except when
necessary. Is it because browser bugs make people think JavaScript is
bad? Is JavaScript not suitable for the server-side for any reason?

I imagine that if server-side programmers started to learn JavaScript
then the client-side code in the world might start to improve.
Translation layer libraries like Prototype.js or Mochikit wouldn't need
to exist. The more I learn about JavaScript the more I like it. It is
difficult to learn however for multiple reasons.

Peter
Nov 4 '06 #6

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

Similar topics

4
by: =?Utf-8?B?R1ROMTcwNzc3?= | last post by:
Hi Guys, thanks for your help yesterday, I've got one more question, then I think I'm done for now,... Is it possible to insert recordset data in a javascript, for instance I have a javascript...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...

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.