web hosting


JavaScript belongs to the big three of web hosting: Besides HTML (page structure) and CSS (Representation) offers the object-oriented programming language Dynamization of content. But JavaScript is not only applicable in the context of page design. Server-side applications can also be controlled with JavaScript.

Origins of JavaScript

Despite its name, JavaScript has little to do with Java. Originally, the scripting language was to be called LiveScript and was developed by Netscape for the interaction of Netscape Navigator with Java applets (Java client applications). As an actually proprietary Software JavaScript was a competitive factor for companies like Microsoft dar. These responded to the development of JavaScript with their own solutions such as the script language JScript. Over time, however, JavaScript became the primary scripting language for client-side and (besides php) server-side dynamization.

Client-side dynamization

Probably the most used Function of JavaScript is the possibility of client-side dynamization. The client is the web browser. Client-side dynamization means that the contents displayed in the client are manipulated. HTML is the static Description the structure of a web presence, the so-called Document Object Model (DOM). While CSS (Cascading Style Sheets) is used for the separate design of this "skeleton", JavaScript offers the possibility of moving, deleting or adding HTML elements.

This DOM manipulation (DOM scripting) can be used in many ways. Via so-called event handlers Functions is initially linked to certain events. These can be Clicks by the user, times or even the loading of the website. Using the ID's assigned to elements in HTML, event-based changes can then be triggered. This can range from programming simple, dynamic forms or table filters to embedding Video-players or complex, dynamic graphics.

JQuery: The more uncomplicated JavaScript

JavaScript is an example of object-oriented programming languages. As such, the entry threshold for inexperienced web designers is relatively high. Without restricting the functionality of JavaScript (greatly), the JavaScript library JQuery a simplified syntax that allows the most common use cases to be handled quickly and easily While JavaScript with the definition of prototypes (instead of classes), instances (concrete objects) and methods (functions bound to objects) has a similar complexity and changeability as Java or Python offers, JQuery restricts the vocabulary and structures. The commands are nestable, so that the structure right can be quickly understood. Therefore, as long as it is not about complex, unusual applications, there is most likely a simple solution in JQuery.

Server-side dynamization: AJAX and Node.js

In addition to DOM manipulation, JavaScript is also used for communication with servers, such as database queries. Since 2009 node.js, a framework for server-side dynamization with JavaScript. This was already possible before 2009, but node.js makes it easier to integrate. This is an advantage for JavaScript programmers, because they don't have to use other languages like php anymore. In addition, node.js also allows the parallelization of processes. This is an advantage, because too many of these so-called threads can lead to a standstill. With node.js, requests run through a single thread, which can increase performance considerably.

Node.js is an example for the possibilities of AJAX. The acronym stands for a procedure called Asynchronous JavaScript and XML. This principle makes it possible to retrieve content from servers without having to reload the entire page. For many web offers like YouTube would be a complete reload after video requests or the loading Comments a great disadvantage. AJAX is also a solution to the problem of accumulating requests thanks to the asynchronous processing as explained above for Node.js.

Integration of JavaScript

The basic integration of JavaScript in web offers works exactly the same way as the connection with CSS files. So there are two possibilities for this: On the one hand, JavaScript can be used in the head or in the body of the HTML document.


Please divide the contribution
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest
Share on whatsapp
Share on telegram
Latest posts

Recommended video from our Youtube Channel