JavaScript
The bipolar language
Fun fact
This presentation was made with JavaScript
See reveal.js
Background
-
JavaScript doesn't exist (it's ECMAScript)
- JavaScript has no logo
- JavaScript's development was rushed
- JavaScript is loved and hated greatly
Language overview
- Dynamically typed
- Interpreted*
- Prototype OOP
- Procedural/Functional
- Evented
- DOM
BAD/TRICKY PARTS
- Scope (only Matlab is worse)
- Browser dependence
- Callbacks
- Semicolon (return; {})
-
Objects
GOOD PARTS
- Lingua franca of the web/ubiquity
- Performance (if it's slow, stop using IE)
- Dynamic features
- JSON
Node.js
- Server-side JavaScript
- Evented, non-blocking
- Runs in your terminal!
- NPM package manager
- You can make an IRC bot
Socket.io
- Great for real-time applications
- A better alternative to timed AJAX requests
- Relatively easy to use, you can make a chat program in 5 min
- Cloud9
Express.js
- Web framework
- Lighter than Rails, but more flexible like Sinatra
- Used in commercial web applications
Client-side
- Most commonly used language for client-side scripting
- Flash is dying, Dart is still in development
- Probably better than OOP GUI
- Currently JS is the way to do fancy web UIs
Angular.js
- There's also Ember.js, Backbone.js
- Developed by Google
- DOM templating
- Declarative HTML
- Single page apps
- Demo
Summary
- Learn JavaScript and you'll find something cool to do with it
- JavaScript is difficult*
Made with Slides.com