6. Building Blocks of Life: JavaScript
element.onClick = function() {
document.getElementById('myImage').src =
'differentImage.jpg';
}
Invented so people could do DHTML:
7. Meanwhile, Server-side Sophistication
We can make dynamic web pages!
1. Common Gateway Interface
2. “Page” Languages:
a. 1994 - PHP
b. 1996 - ASP
c. 1999 - JSP
3. Apache Modules
10. It's a technology! It's a language! It's..AJAX! (It's JSON)
var request = new XMLHTTPRequest();
request.onload = function() {
alert(this.responseText);
};
request.open('get', 'endpoint.php');
request.send();
11. Doug Crockford
2001 - JSON
2002 - JsLint
2003 - JsMin
2008 - JavaScript: The Good Parts
“It is much harder to write correct
programs if you do not understand
what the language actually does.”
16. Conscious Life: JavaScript Tooling
NodeJS sends JavaScript to the server in 2009.
1. Code organization - AMD, RequireJS, CommonJS
2. Code sharing - NPM, Bower
3. Automation - Grunt, Gulp
17. The Modern SPA
Best SPA practices and tools coalesce:
1. Declarative Programming
2. Separation of view and app state
3. Data Binding
4. Promises
5. Dependency Injection