Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Oh my Dart!

Ladislav Thon
November 09, 2012
130

Oh my Dart!

Ladislav Thon

November 09, 2012
Tweet

Transcript

  1. Come to the Dart side! We have cookies!

  2. Oh my Dart! ladicek.github.com

  3. Dart is made for

  4. Dart is made for The modern web

  5. Dart is made for Ease of use

  6. Dart is made for Performance

  7. Dart is made for Tooling

  8. So Dart is a cool language

  9. So Dart is a cool language Not really, no

  10. So Dart is a cool language It's rather boring

  11. Building blocks

  12. Building blocks Braces & semicolons

  13. Building blocks Variables

  14. Building blocks Functions

  15. Building blocks Closures

  16. Building blocks Getters & setters

  17. Building blocks Classes

  18. Building blocks Libraries

  19. Building blocks Event loop

  20. Classes

  21. Classes Lexically scoped this

  22. Classes Named constructors

  23. Classes Factory constructors

  24. Classes Operators

  25. Classes noSuchMethod

  26. Classes Implicit interfaces

  27. Classes Mixins (in the future)

  28. Classes Mixin is a difference between a class and its

    superclass
  29. Libraries

  30. Libraries Imported by URI

  31. Libraries Can have more files

  32. Typing

  33. Typing Dynamic

  34. Typing Optional type annotations

  35. Typing Optional type annotations and generics

  36. Typing Optional type annotations for documentation and tooling

  37. Typing "Innocent until proven guilty"

  38. Concurrency

  39. Concurrency Single-threaded is good

  40. Concurrency Single-threaded is good Except when it isn't

  41. Concurrency No shared memory

  42. Concurrency No shared memory Actors to the rescue

  43. Concurrency No shared memory Actors Isolates

  44. Concurrency "Isolated threads"

  45. Concurrency Lightweight isolated threads

  46. Concurrency Separate heaps and stacks

  47. Concurrency Separate heaps and stacks Async communication

  48. Privacy Based on names Only for libraries

  49. Sugar Only the important right now

  50. Sugar Nice to have not yet (maybe in the future)

  51. Performance

  52. Performance Fast startup

  53. Performance Program elements are declared

  54. Performance Diet parsing

  55. Performance Snapshotting

  56. Performance Compile-time constants

  57. Performance Fast runtime

  58. Performance Beats V8 already (on some benchmarks)

  59. Performance And it's just the beginning

  60. Tooling Dart Editor IntelliJ IDEA / WebStorm

  61. None
  62. So what is it all about?

  63. So what is it all about? Structure!

  64. ladicek.github.com ?

  65. Async

  66. Async Still very much open topic

  67. Async Still very much open topic (not only in Dart)

  68. Async Callbacks

  69. Async Callbacks

  70. Async Futures

  71. Async Futures

  72. Async await? async blocks? promise pipelining?

  73. This isn't real Dart code! Future<List<int>> xAxis = db1.fetchData(100); Future<List<int>>

    yAxis = db2.fetchData(100); async { List<int> xs <- xAxis; List<int> ys <- yAxis; plot(xs, ys); } catch (e) { doSomething(); }
  74. Metaprogramming

  75. Reflection Metaprogramming

  76. Mirrors Reflection Metaprogramming

  77. Mirrors Base level and meta level completely separated

  78. Mirrors Introspecting functions, objects, classes, ...

  79. Mirrors And other isolates!

  80. Mirrors And other isolates! (Needs to be async...)

  81. Mirrors Only in the VM right now

  82. Mirrors Coming to dart2js

  83. Mirrors Coming to dart2js But... optimizations?

  84. Mirrors Builders (in the future)

  85. Mirrors Builders (in the future) Creating/modifying code

  86. Mirrors Debugging (in the future)

  87. Mirrors Debugging (in the future) Introspecting the stack

  88. Client side

  89. Client side DOM reinvented

  90. Client side DOM reinvented jQuery-like experience

  91. Client side JS interop

  92. Web Components

  93. Web Components Templates

  94. Web Components with data binding

  95. Web Components and loops and conditionals

  96. Web Components and event listeners

  97. Web Components in plain old HTML

  98. Web Components in plain old HTML (almost)

  99. Web Components Components

  100. Web Components = your own tags

  101. Yes! Your own tags!

  102. Web Components with templates

  103. Web Components and Dart code

  104. Server side

  105. Server side Async IO, like in Node.js

  106. Server side Filesystem access (files, directories, ...)

  107. Server side Environment access (starting processes, ...)

  108. Server side Network access (HTTP, WebSocket, ...)

  109. Pub

  110. Pub Package manager

  111. Pub on the server

  112. Pub and in the browser too!

  113. Pub One or more libraries or an application

  114. Pub semver.org

  115. Pub Dependencies

  116. Pub Dependencies with version locking

  117. Community

  118. Community dartflash

  119. Community Buckshot

  120. Community Rikulo

  121. Community DartGap

  122. Community three.dart

  123. Community Spectre

  124. Community DartBox2D

  125. Community … … … … ... … … … ...

  126. And much, much more!

  127. ladicek.github.com ?