Example javascript is said to be a client-server programming language. I have tried browsing what that means. I seem not to grasp the meaning of that. So if javascript is seen as a client-server programming language what exactly does that mean
CodePudding user response:
For javascript, that means that the it can run locally (in the browser) and on a server (not in the browser). That is simply the difference. For example, you cannot run any php on a browser, that makes it a server language, same for python.
CodePudding user response:
Javascript is not a "client-server language" but can be described as a client-side programming language. However, this is not entirely correct. With node, it is also possible to use javascript on the server side. What does server-side vs. client-side mean?
Let's take PHP and Javascript. PHP is a pure server-side language. PHP is running on a computer that provides a server. This means that PHP can accept and process requests and send them back to the browser (for example). PHP therefore needs a server. Therefore server-side.
CodePudding user response:
There are two types of programming languages regarding where they run, their nature and their functionalities Client side languages (aka frontend) and Server side languages (aka backend).
Client side languages are used to present data to user, it what a user sees and can interact with.
Server side languages are responsible for storing data, handling data etc.
Javascript started as a language that was mainly used on the client side of an app, until NodeJS came and by using Chrome's V8 engine was possible to run javascript on the server side.
So technically javascript is a language that can run in both cases, thus it is called client and server language.
This term though (client-server language) is kind of wrong in my opinion and i rarely heard of it.