» » » » » Client-side web programming

Client-side web programming

Client_side_web_programming

The objects do not provide all the solutions to the needs of interactivity and dynamism of sites, or can be heavy to implement. You can then move on to programming for better interaction with the HTML page.

Principle

When a visitor requests a simple HTML page (with or without objects) by typing an address or URL, the web server simply sends back the contents of the requested page, the web browser that interprets HTML content, and plug-ins interpret objects, asking in turn the object content to the web server.

If the code on the client side is inserted into the page, the web server also return the page to the client, including the code. So, again the web browser interpret the code and do what the code requires.

Use

The client-side programming is used primarily in the case of form validation (required fields, small computing, …) and in the creation of small animations (drop-down menus …).

Scripting languages

Client-side programming is using scripting languages. Unlike other programming languages, these languages are not compiled. They are interpreted by the visitor’s web browser, and their syntax is less stringent than the languages of developers (non-typed a priori variables, the semicolon at the end of the instructions is optional …).

  • JavaScript is the most widely used client-side programming language. It is recognized by all browsers (in current versions). It is based on the ECMAScript standard language.
  • JScript, very close to the JavaScript is just an adaptation of it by Microsoft.
  • VBScript is a scripting language developed by Microsoft based on the Visual Basic. This language is interpreted by browsers based on those developed by Microsoft (ie Internet Explorer and Maxthon). It is therefore not used on the Internet (but sometimes used on intranets).
  • DHTML is NOT a scripting language but simply combining, in a web page, of JavaScript, HTML 4 or XHTML and CSS.

Advantages and disadvantages

Advantages: The client-side programming is lightweight and relatively easy to implement (syntax not too complex).

Disadvantages: The code is sent as is to the client, and therefore visible to it (if he looks at the sources of his page) and thus insecure. The smooth running of the program depends entirely on the client browser, its configuration and its security level.

Leave a Reply

Your email address will not be published. Required fields are marked *