Your SlideShare is downloading. ×
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Dart != JavaScript
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Dart != JavaScript

3,797

Published on

Talk about Dart (www.dartlang.org) and how it compares to JavaScript. Happened at the Java Usergroup in Stuttgart on 22.11.2012.

Talk about Dart (www.dartlang.org) and how it compares to JavaScript. Happened at the Java Usergroup in Stuttgart on 22.11.2012.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,797
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. Dart != JavaScript Christian Grobmeier http://www.grobmeier.de @grobmeier
    • 2. Was ist falschan JavaScript?
    • 3. JavaScript „false“: false, 0, „“, undefined, null#1
    • 4. Batterien selbst besorgen. jQuery et al ist Pflicht.#2
    • 5. Segen oder Fluch? Keine Typen#3
    • 6. 1000 und 1 Möglichkeit Vererbung#4
    • 7. Patterns helfen: Namespace#5
    • 8. Jeder Browserist ein Individuum.#6
    • 9. Nicht nett.var a1 = new Array(1,2,3,4,5); var a2 = new Array(5);#7
    • 10. Einer für alle.if( a === null || a === undefined)#8
    • 11. Fallstricke. == 0 // false0 == // true0 == 0 // truefalse == false // falsefalse == 0 // true#9false == undefined // falsefalse == null // falsenull == undefined // true trn == 0 // true
    • 12. Darwin wusste es.#10
    • 13. Verkaufs-argumente
    • 14. Native VMDart Source JavaScript dart2js Engine Überall.
    • 15. Pub
    • 16. Nix neues.
    • 17. Viele Libs.
    • 18. Isolates.
    • 19. Serverseitig.
    • 20. JS -> DartRoadcrew.js(https://github.com/grobmeier/Roadcrew.js
    • 21. Use Case<div class="page" id="tablePage"> <h1>Table Page</h1> <a href="#otherPage">Other</a></div><div class="page" id="otherPage"> <h1>Other Page</h1> <a href="#tablePage">Table</a></div>
    • 22. function Roadcrew() { JavaScript // Constructor}Roadcrew.prototype = { // Prototyp};Roadcrew.prototype.act = function () { // FunctionPrototype};Roadcrew.another = function () { // Static Function};
    • 23. class RoadcrewController { var pages; Dart RoadcrewController() { // Constructor } void act(e) { // Method Class } void static another() { // Static method }}
    • 24. JavaScript Properties kopieren Framework extendVererbung
    • 25. Dartclass RoadcrewController extends C { ...}class C {Vererbung} ...
    • 26. Dartclass A implements B { ...}abstract class B {Interfaces ...}
    • 27. JavaScriptfunction Roadcrew() { test = „blub“; var xyz = „bla“;}var act = function () {Namespace console.log(test);};
    • 28. Dartlibrary Roadcrew;import dart:html;part ,RoadcrewController.dart;part RoadcrewInterceptor.dart;Namespacepart RoadcrewException.dart;
    • 29. JavaScriptvar myobj = (function() { var name = „CG“; return { getName = function() { return name; } Privacy }}());
    • 30. Dartclass Roadcrew { var _name = „CG“; _getTest() => name;} Privacy
    • 31. JavaScriptvar test = „Christian“;test = true;test = 10.32; Types
    • 32. Dartclass Roadcrew { String _name = „CG“; String _getTest() => name; List<DivElement> pages;} Types
    • 33. JavaScriptfunction RcErr(m,c,r){}RcErr.prototype = new Error();RcErr.prototype.constructor = RcErr;try { interceptor(d, data);Exception} catch (error) { ...}
    • 34. Dartclass RcEx { String msg = "An error..."; int c; RcEx(this.msg, [this.c = 1] );}try {Exception interceptors[pageId].act(d);} on RcEx catch(e) { }
    • 35. JavaScriptpages = $(.page);page = $(#myPage); DOM
    • 36. Dartpages = queryAll(.page);page = query(#myPage); DOM
    • 37. JavaScript$("a").live( click, $.proxy(this, goto)); DOM
    • 38. DartqueryAll(a).forEach((el) { el.on.click.add((e) { goto(e); }); DOM});
    • 39. Batterienbeigelegt
    • 40. import dart:isolate; Dartecho() { port.receive((msg, reply) { reply.send(I received: $msg); });}main() { var sendPort = spawnFunction(echo); Isolates sendPort.call(Hello).then((reply) { print(reply); });}
    • 41. Mehr? Dart I/O JSONMirrorsLogging ...
    • 42. Wo steht Dart? Diskussion
    • 43. Danke! Christian Grobmeierhttp://www.grobmeier.de @grobmeier
    • 44. Image Credits Omikuji: Flickr (jessleecuizon) Dollars: Flickr (401(K) 2012) Pub: Flickr (ell brown) Dog: Flickr (joshme17) Package: Flickr (lemonhalf) Threads: Flickr (The Big Quack) Server: Flickr (getButterfly) School Bus: Flickr (loop_oh) Batteries: Flickr (scalespeeder)Discussing Monks: Flickr (wonderlane)

    ×