java scriptgettingstarted
DESCRIPTION
TRANSCRIPT
JavaScriptGetting started
Wolfram Kriesing, uxebuCo-Founder
@wolframkriesing
Mittwoch, 18. Mai 2011
Wolfram KriesingCo-Founder
@wolframkriesing
Mittwoch, 18. Mai 2011
We open the mobile web.
Mittwoch, 18. Mai 2011
JavaScript• It's a real programming language!
• Brendan Eich at Netscape invented it
• Web only language - never was
• Often not learned, just used
• ECMAScript5, ECMAScript.next
Mittwoch, 18. Mai 2011
Take a guess!
What is JavaScript?
Mittwoch, 18. Mai 2011
0
Mittwoch, 18. Mai 2011
0
Mittwoch, 18. Mai 2011
Easy, right!?
Mittwoch, 18. Mai 2011
1
Mittwoch, 18. Mai 2011
1
Mittwoch, 18. Mai 2011
2
Mittwoch, 18. Mai 2011
2
Mittwoch, 18. Mai 2011
3
Mittwoch, 18. Mai 2011
3
Mittwoch, 18. Mai 2011
4
Mittwoch, 18. Mai 2011
4
Mittwoch, 18. Mai 2011
So...What is JavaScript?
Mittwoch, 18. Mai 2011
0
4
2
3
1
YES
YES
YES
YES
YES
Mittwoch, 18. Mai 2011
0
prompt("Type something here, please!")
Mittwoch, 18. Mai 2011
1
https://github.com/wolframkriesing/demo-orientation
Hack it!
Mittwoch, 18. Mai 2011
1
https://github.com/wolframkriesing/demo-orientation
Hack it!
Mittwoch, 18. Mai 2011
2
Impact is a JavaScript Game Engine
http://impactjs.com/
3
Mittwoch, 18. Mai 2011
4
•100% HTML5•WebGL•JavaScript•8 Chromes•WebSockets•node.js with socket.io
http://webglsamples.googlecode.com
Mittwoch, 18. Mai 2011
MicrolibrariesThe new trend!?
Mittwoch, 18. Mai 2011
"JavaScript is broken. It can be fixed with more JavaScript"
Mittwoch, 18. Mai 2011
var o = new Object();
vs.
var o = {};
Mittwoch, 18. Mai 2011
var s = new String();
vs.
var s = "";
Mittwoch, 18. Mai 2011
var x = "" + y;x.toLowerCase();
Mittwoch, 18. Mai 2011
"By reducing your global footprint to a single name, you significantly reduce the chance of bad interactions with other applications, widgets, or
libraries."
Douglas Crockford
Mittwoch, 18. Mai 2011
;(function(){})()
Mittwoch, 18. Mai 2011
var node = byId("someEl");node._value = 42;
Mittwoch, 18. Mai 2011
var str = s1 + s2 + s3;
vs.
var str = [s1, s2, s3].join("");
Mittwoch, 18. Mai 2011
var C = function(name){ this.name = name;};
C.prototype.say = function(){ console.log(this.name);};
var obj = new C("Dave");
Mittwoch, 18. Mai 2011
Libraries
Mittwoch, 18. Mai 2011
Why?• DOM API sucks
• Event handling differs
• Ajax API sucked
• Memory leaks
• before HTML5 - no UI
• Animations maybe complex
Mittwoch, 18. Mai 2011
Wolfram Kriesinguxebu.com
Thank you
Mittwoch, 18. Mai 2011