Unobtrusive JavaScript

Unobtrusive JavaScript ( lit. unobtrusive JavaScript also: barrier-free JavaScript) is committed to certain principles form, such as JavaScript is used in Web pages. A uniform definition of the term does not exist and it is not particularly an official standard.

JavaScript should therefore not be a prerequisite for the functions of a website, but only extend the functionality. The approaches of unobtrusive JavaScript, play a role, especially for barrier-free and mobile Internet.

Basic principles

  • Demarcation of content, behavior and presentation of web pages (Model View Controller)
  • Use of best practices in order to avoid problems of traditional JavaScript programming

Motivation

Historically, JavaScript had a reputation as a clumsy, unpolished programming language that is useless for " serious " software development. This is mainly due to inconsistent implementations of the script environment and the DOM in multiple browsers, as well as the extensive use of copy- & -paste source code. Runtime errors were so common and difficult to repair that many programmers waived improvements as long as the script had approximately the desired behavior. In some browsers, such a script was entirely not run.

The advent of standards-compliant browsers, JavaScript libraries and better debugging tools made ​​organized and scalable JavaScript code possible and Ajax- based user interfaces made ​​this even necessary.

Where JavaScript has been previously used only for small, non-critical tasks, it is now practical to implement large, complex projects, which often form part of the core functionality of a website. Runtime errors are so that no imperfections, but ( possibly fatal ) failures.

The concept of accessibility within the meaning of JavaScript programming is dominated by the article Unobtrusive DHTML, and the power of unordered lists by Stuart Langridge. In this article Langridge discussed the concept strictly separate JavaScript from HTML. Since then he has illustrated this concept in several articles and a book in detail.

793767
de