Is "Javascript" also a server side language? [closed] - javascript

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Few year back I read on some websites that "JavaScript is only a client-sided language".
is it so? if not then why?

Remember that JavaScript was some day Netscape LiveScript and it was already a client and server programming language. In fact, ASP Classic could be developed using JScript (basically, old JavaScript).
A language turns into a server-side language once it can be used to develop back-end code, and yes, JavaScript has been always a player in the server development.
Now with NodeJS, JavaScript has been turned into a possible and serious language of choice to develop backends.

Eventhough JavaScript was first developed to be used in a browser, the language itself has never been a strict client side language.
Aside from a few string methods that create HTML tags, there is nothing in the language itself that is specific to client side programming. Everything related to the browser is in the DOM, not in the JavaScript language.
JavaScript is used in client side scripting (and that use is almost analogous to client side scripting), but branding it a client side language would be misleading. The fact that the language itself doesn't contain the browser integration has made it easy to adapt it to other environments, including server side scripting.
Node.js is far from the only server side scripting using JavaScript. ASP for example offered VBScript and JScript (Microsofts implementation of JavaScript) as server side languages. This list compares 28 different server side uses, and it's not all there is.

Related

Why would I like to execute scripting language in JVM [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am not able to understand why and in what kind of scenario I would like to run scripting language inside JVM at server side. I mean we already have great libraries available in JAVA... why wouldn't I use use them to do stuff instead of running scripts in JVM?
Please help me understand this concept, Can someone please tell me one or two use cases where running scripting in JVM at server side will have advantages over using JAVA libraries.
The more general question here is "Why would I want to execute code in <some scripting language> in Java?", where Javascript is simply one example of such a language.
Quoting this article:
Some Java applications' requirements make integration with a scripting language necessary. For example, your users may need to write scripts that drive the application, extend it, or contain loops and other flow-control constructs. In such cases, it's sensible to support a scripting language interpreter that can read user scripts, then run them against your Java application's classes.
Basically: if you want to allow your users to customize your application in a way that requires the richness of a programming language.
Why Javascript specifically? That depends upon your application. There may be reasons to pick that (e.g. your target users already know Javascript), or not (e.g. Lua is more popular for scripting in the games industry).
One use i can think of is:
Javascript engine can be used to evaluate arithmetic expressions
which are in a String format.
example :: String expression = "2+4";
The below is the link to a example which uses java script engine to do this.
https://stackoverflow.com/a/3423360/4626402

future of backend web development vs front end web development [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I worked on C#, ASP.NET, JSP for couple of projects from 2009 - 2012. After that i was much more into Javascript, HTML, CSS, JQuery (Front end Development). So Now I am wondering is server side web technologies (ASP.NET, JSP, PHP) are dying ? The reason I asked this question is I can do fairly any kind of task in FrontEnd better than Server side technologies.
I seen soo many modern websites (Facebook, Google, Gmail... etc) was much more into FrontEnd development. so Now do I recall all my knowledge in server side web development or do I have to more focus on Front End development for the future web development ?
Any kind of comments are welcome
edit: is Node.js killing Java, C# ?
You cannot have front-end development without back-end development. Back-end development is certainly not dying.
That being said, some specific backend technologies might seem to be somewhat in decline, because newer, more hip technologies are becoming popular and replacing some of their market share (like Node.js instead of PHP and NoSQL databases instead of SQL databases).
The reason that any of these back-end technologies are "declining" is probably because there are simply more options when it comes to back-end tech. You can write server-side code in pretty much any language you want. But front-end technologies are pretty much limited to JavaScript and how the different browsers decide to support JavaScript.
--- Edit ---
Node.js is definitely growing massively in popularity right now. However, I wouldn't say that Node.js is killing Java or C# as back-end technologies. Java and C# still have very passionate supporters, and they are still used by a lot of programmers and companies around the world. And if nothing else, there will always be legacy code to worry about.

which one is the fastest? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a website which is used on Chrome and IE8. I made it with Javascript and it works fine on Chrome but it is slow on IE.
Is VBScript faster than Javascript on IE? Would I translate my code in VBScript for IE?
VBScript is executed for web sites on IIS(web servers), JavaScript mostly on client side.
I do not see how it would not work on any browsers unless you uploading something to client machines as vbs file. That is dangerous and could be considered as security threat - antivirus program may simply block it or delete file all together.
Basically question is not about if VBScript supported or not by any browsers simply because browsers never-ever touching VBScript, but what you attempt to do with VBScript. And anyone who is saying that it does not supported by any browser need to take a lessons from W3S school all over again.
It is different purpose scripting languages on the web: VBScript for servers side processing while JavaScript mostly to be used running on client side. And before anyone starts discussing that JavaScript can be used on server side please look what I put in bold letters. There are javascript libraries AJAX and JQUERY etc. which can be used to process data as well as connecting to web servers.
If you are looking for replacement of VBScript - C# is the best place to start since you already working on Microsoft platform, NET would be logical choice. There is lot of other languages to choose from but you need carefully consider what your project is all about, budget and time needed to rebuild your project/site.
However you can write VBScript and JavaScript batch files for local execution but as I understand that is not part of your question.

What is the purpose of using isomorphic webapps? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
What I understood?
It shares some code between client and server as both are in javascript. eg: form validation.
How does this work?
Can the shared code be seen from the browser? If yes then it becomes easy for an attacker to find loopholes in our code. Since the same code is being executed in the server side the attacker can pass through the server side validation too.
Are there any drawbacks or security issues if we follow this approach?
It shares some code between client and server as both are in javascript. eg: form validation.
Yes. Since the only language that executes on clientside with any reliability is JavaScript, and since node.js is the only JavaScript serverside framework, node.js is the only way at the moment you can achieve this. (Java could also do it with applets, but pretty much no-one is using those any more.)
There's several JS projects that already use isomorphic principles - more here.
The only drawback is that you're severely limited in your choice of technologies, as described above.

Does HTML work with any other language other than JavaScript? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is there any other language which can be used with HTML in programming webpages other than JavaScript?
Thanks
As far as I understand your question we are talking for client-side language which is being interpreted by the browser, without additional plugin like JVM, flash player.
You can use a programming language which is compiled to JavaScript (CoffeeScript, Dart, JSX, TypeScript...) but the browser will interpret only JavaScript (except Internet Explorer which may supports VBScript and I guess Chrome which may be able to run Dart).
Yes, in the mainstream there is VBScript however it's only supported by Internet Explorer.
Really though your question comes down to where your HTML will be rendered and whatever the host renderer supports.
Yes, CSS is a language too. Then there are client-side technologies like Java and Flash too.
But why do you ask?
Web development uses server-side technologies like some PHP frameworks and ASP.NET, among other. On server-side coding you can program using C#, Java, PHP or a host of other languages, but they usually 'generate' HTML which is served to the client browser.
Does this answer your question?
Well, on the server side, any language can be used.
In the browser, you need a plugin, which could be for Java or something more esoteric like Tcl/Tk
Yes. You're talking about client side scripting. And there are other languages that can do that. I'm not really up to date, but back in the day, ActivePerl (a Perl distribution by ActiveState) had a version that ran in Internet Explorer.
You are referring to any form of client side Language which has to do with how you're browser interprets information.

Categories

Resources