473,788 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

If you had JavaScript running server-side...?

I'm writing a server-side web application framework using Mozilla's
Rhino JavaScript engine. My two primary motivations are so I can write
code on server and client sides without needing to switch gears
mentally and so that the server and client can share code.

The types of code sharing I know I can use immediately are form
validations and html previews. For form validation, I'll be able to
specify the regexp for what is an email address in just one language
rather than in both Perl|Python|Rub y|Java|etc and in JavaScript. For
something like a blog comment form or a wiki editor, where the user
can use *bold* or _underline_ syntax, the algorithm to convert this
code to HTML will only need to be expressed in one language. This
makes live previews in the editor much easier to implement.

I'm curious what other bits of common (or uncommon) client-side
functionality that you would be able to share with the server if you
had server-side framework running JavaScript.

Thanks,
Peter
Jan 19 '08
12 1734
Thomas 'PointedEars' Lahn said the following on 1/20/2008 6:32 PM:
Randy Webb wrote:
>Thomas 'PointedEars' Lahn said the following on 1/20/2008 2:24 PM:
>>Peter Michaux wrote:
<URL: http://groups.google.c om/group/comp.lang.javas cript/msg/76e2debc87edaf1 0>
It works, but it makes little sense, if any. Despite what Google Groups and
other mirrors want you to believe, Usenet is not on the Web.
Nobody said Usenet is on the Web. The archives for Usenet are on the Web
though. And that is what Peter linked to was the archive of that post.

Several, but not all, Usenet archives are available via the Web.
Nobody said there weren't any available on the Web.
Those that are on the Web are neither complete, nor do they always present the original
article.
Can you show an instance where Google Groups didn't present the original
article?
Google Groups in its current form makes no exception.
Example? I am not referring to you trying to cancel a message and it
getting archived anyway. I am asking you for an instance where GG did
not present the original article. Meaning, Google Groups modified it in
some way.

There is one thing GG does, and that is adding trailing spaces.
Furthermore, Web archives are not required to access an article that was
posted only a few days ago; there is no public news server that has such a
short expiration setting.
We are not discussing "Web archives" and some that won't "show an
article a few days ago". We are discussing Google Groups and the ability
to use Google Groups as a reference to an older article.
And if my articles eventually expire, both will only be available in the
archives, be they public or private.
Nobody said any differently.

Nothing you have said is any more true/false about web archives than
Usenet servers.
In fact, my (Google) research showed that providers of public Usenet
archives have been going to great lengths to support `news:' URIs in
the way I posted as being rewritten to links to their archives.
Nobody said any differently. What I said was that your style of
referring to old posts is unreliable. Posting a URL to a Google copy of
it is.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 21 '08 #11
[snip regarding linking to news archives]

So do you guys have any thoughts about sharing code on the client and
server sides? ;-)

Peter
Jan 21 '08 #12
Peter Michaux said the following on 1/21/2008 2:35 AM:
[snip regarding linking to news archives]

So do you guys have any thoughts about sharing code on the client and
server sides? ;-)
I tried ASP once with JScript, gave me more headaches than I care to
remember. I kept getting confused about where I was, client or server.
Switched to PHP and haven't looked back.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 21 '08 #13

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

Similar topics

3
32826
by: john woo | last post by:
Hi in JSP, it's easy to pass value from java-variable to javascript-variable, like js_function(a) { a=<%java-class.A%> } I'm wondering how is the other way around? I tried
2
2884
by: Kenneth | last post by:
Hi, In a document I have three lines that detects and redirects to another page is a session variable is 0 If Session("Customer_ID")=0 Then Response.Redirect("myPage.aspx") End If What I really would like to have is a notification for the
2
1996
by: Jimmy | last post by:
Hi How do you refer from you webpage to a usercontrol which contains a n html control with javascript? usercontrol contains: <input id="tb1" name="tb1" type=text>
19
1550
by: The Numerator | last post by:
I was just wondering that if it is possible to do almost anything you can do in JavaScript in PHP.
9
2421
by: Boris Yeltsin | last post by:
I use Master Pages, so I make use of URL rebasing through the ~ operator, like this in the <head>: <link runat="server" href="~/Root.master.css" media="screen" rel="stylesheet" type="text/css" /> It works perfectly and the ~ gets converted by the server into the correct relative path. Great! Now, I put this in the <head>: <script type="text/javascript" src="~/Root.master.js"
4
1275
by: Eric.Thomas.Moore | last post by:
Hey, My old boss wrote an extensive work tracking system in php for internal use. He left and the server he is running it on is very outdated so I have been given the task of transfering it over to a new server and the latest versions of php, mysql, and apache. That information is probably not relevant to the question. His system has some javascript forms. One of which is a drop down menu that uses the onchange functionality. Here...
7
7321
by: Rob | last post by:
Hi, I'm getting an error on my login page when using Javascript session object. It works on the development server so I'm wondering if there is a setting in IIS to allow using sessions on the server. When the user clicks on the submit button after entering their username and password, it calls a function (below) and I get an "Object expected" javascript error. This is the function:
6
2776
by: Venkatesh | last post by:
Hello All, I have couple of doubts regarding the concept of on-demand javascript loading using javascript code. I could see on the net different techniques for achieving this - techniques like: 1. document.write("<script src= language='JavaScript'></script>); 2. sc = document.createElement("<script>"); sc.setAttribute("src", ); and append this to the head
4
2063
by: Epictitus | last post by:
I am trying to write a script which will allow me to read the contents of an HTTP web page into memory, parse the data, and output a calculated value. The HTTP page is on a web enable appliance - I am reading some data out of a table for further calculation. I can't modify the web appliance, only read the text data. I've written a script on my Windoze PC that successful uses a MSXML2 ActiveX object to read the contents of a web page...
2
1839
by: an96su | last post by:
Hi, I'm new to php. i'm trying to send information from my php (client) script to a website that is running javascript. Here is an extract of the server's response to my initial http request. I need to know how to communicate further with the server. Thanks, anne
0
9498
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,...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
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
5399
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
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4070
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
2
3674
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.