Notes (Theory)
Client Side Programming
Recall: HTML is good for developing static pages can specify text/image layout, links etc. web page looks the same each time it is accessed
In order to develop interactive or dynamic pages, must integrate a programming language
Programs are written in a separate programming language e.g. JavaScript, JScript, VBScript
Programs are embedded in the HTML of a web page, with tags to identify the program component e.g.
<script type="text/javascript"> … </script>Browser executes the program as it loads the page, combining the dynamic output of the program with the static content of HTML
# JavaScript: a bit of history
- Originally called LiveScript and was introduced in the NetScape browser of 1995
- The original vision was to create a full programming language for the web
- Renamed JavaScript to indicate a marketing relationship with Sun’s Java language
- The first scripting language to be supported by web browsers
- The most popular web scripting language
- Formalised in ECMAScript language standard
JavaScript: capabilities
- JavaScript is
- Interpreted
- Has dynamic types
- A multi-paradigm scripting language
- object-oriented, imperative, and functional programming styles supported
- It has higher order functions