Client-side scripting languages

from Wikipedia, the free encyclopedia

As a client-side scripting languages (client-side script languages) is generally referred to such scripting languages , which (among other things) to create web applications are used, the page of the web browser ( client are running). This must be distinguished from server-side scripting languages with which scripts are written that are executed (interpreted) on the web server (e.g. Perl , PHP , Python etc.). Client-side scripting languages ​​are an integral part of Dynamic HTML (DHTML).

JavaScript

The most important client-side scripting language today is JavaScript , as all common web browsers support it as standard. VBScript and ActionScript also have a certain significance .

Alternatives to JavaScript

In theory, any scripting language can be used on the client side. The fact that in practice only JavaScript is used has less of a technical background than a historical and political one: The historical reason is that JavaScript was the first scripting language that was used and spread in the web browser, it became special developed for this by the founder of Mozilla; The political reason is that the manufacturers of all relevant web browsers would have to agree on appropriate support for a new script language so that the script language used works universally and independently of the web browser used.

However, there are certainly technical solutions that allow scripting languages ​​other than JavaScript to be used on the client side during development. It is programmed in a different script language, but the result is then automatically translated into JavaScript by the technologies used.

Depending on the technology used, this is done manually, so that the JavaScript result is then manually integrated into the website by the developer, or automatically in real time so that the original code remains and is translated into JavaScript in real time in the browser when the website is called up.

These technological approaches allow the developer to use a scripting language other than JavaScript, but they also have various disadvantages, e.g. B. an additional overhead when loading the required libraries when loading the page, a time delay in the case of a real-time translation and an additional level of complexity in troubleshooting.

An example of this technological approach is e.g. B. Brython : Brython (composed of browser + Python ) allows client-side scripting in Python and generates JavaScript from this when the website is called up in real time in the browser.

See also

Web links