Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Oh my Dart!
Search
Ladislav Thon
November 09, 2012
1
140
Oh my Dart!
Ladislav Thon
November 09, 2012
Tweet
Share
More Decks by Ladislav Thon
See All by Ladislav Thon
On Value Types or Why Reference Locality Matters
ladicek
0
28
Write Yourself an Annotation Processor
ladicek
0
29
Kotlin or The Quest For Java.Next
ladicek
0
160
Dart++
ladicek
0
120
Dart: The Dawn of Web Apps
ladicek
1
470
Dart: Preview
ladicek
0
78
Featured
See All Featured
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
Six Lessons from altMBA
skipperchong
21
3k
In The Pink: A Labor of Love
frogandcode
138
21k
Design by the Numbers
sachag
274
18k
Web Components: a chance to create the future
zenorocha
305
41k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
116
18k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
25
2.3k
Optimising Largest Contentful Paint
csswizardry
8
2.3k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Making Projects Easy
brettharned
108
5.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Transcript
Come to the Dart side! We have cookies!
Oh my Dart! ladicek.github.com
Dart is made for
Dart is made for The modern web
Dart is made for Ease of use
Dart is made for Performance
Dart is made for Tooling
So Dart is a cool language
So Dart is a cool language Not really, no
So Dart is a cool language It's rather boring
Building blocks
Building blocks Braces & semicolons
Building blocks Variables
Building blocks Functions
Building blocks Closures
Building blocks Getters & setters
Building blocks Classes
Building blocks Libraries
Building blocks Event loop
Classes
Classes Lexically scoped this
Classes Named constructors
Classes Factory constructors
Classes Operators
Classes noSuchMethod
Classes Implicit interfaces
Classes Mixins (in the future)
Classes Mixin is a difference between a class and its
superclass
Libraries
Libraries Imported by URI
Libraries Can have more files
Typing
Typing Dynamic
Typing Optional type annotations
Typing Optional type annotations and generics
Typing Optional type annotations for documentation and tooling
Typing "Innocent until proven guilty"
Concurrency
Concurrency Single-threaded is good
Concurrency Single-threaded is good Except when it isn't
Concurrency No shared memory
Concurrency No shared memory Actors to the rescue
Concurrency No shared memory Actors Isolates
Concurrency "Isolated threads"
Concurrency Lightweight isolated threads
Concurrency Separate heaps and stacks
Concurrency Separate heaps and stacks Async communication
Privacy Based on names Only for libraries
Sugar Only the important right now
Sugar Nice to have not yet (maybe in the future)
Performance
Performance Fast startup
Performance Program elements are declared
Performance Diet parsing
Performance Snapshotting
Performance Compile-time constants
Performance Fast runtime
Performance Beats V8 already (on some benchmarks)
Performance And it's just the beginning
Tooling Dart Editor IntelliJ IDEA / WebStorm
None
So what is it all about?
So what is it all about? Structure!
ladicek.github.com ?
Async
Async Still very much open topic
Async Still very much open topic (not only in Dart)
Async Callbacks
Async Callbacks
Async Futures
Async Futures
Async await? async blocks? promise pipelining?
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(); }
Metaprogramming
Reflection Metaprogramming
Mirrors Reflection Metaprogramming
Mirrors Base level and meta level completely separated
Mirrors Introspecting functions, objects, classes, ...
Mirrors And other isolates!
Mirrors And other isolates! (Needs to be async...)
Mirrors Only in the VM right now
Mirrors Coming to dart2js
Mirrors Coming to dart2js But... optimizations?
Mirrors Builders (in the future)
Mirrors Builders (in the future) Creating/modifying code
Mirrors Debugging (in the future)
Mirrors Debugging (in the future) Introspecting the stack
Client side
Client side DOM reinvented
Client side DOM reinvented jQuery-like experience
Client side JS interop
Web Components
Web Components Templates
Web Components with data binding
Web Components and loops and conditionals
Web Components and event listeners
Web Components in plain old HTML
Web Components in plain old HTML (almost)
Web Components Components
Web Components = your own tags
Yes! Your own tags!
Web Components with templates
Web Components and Dart code
Server side
Server side Async IO, like in Node.js
Server side Filesystem access (files, directories, ...)
Server side Environment access (starting processes, ...)
Server side Network access (HTTP, WebSocket, ...)
Pub
Pub Package manager
Pub on the server
Pub and in the browser too!
Pub One or more libraries or an application
Pub semver.org
Pub Dependencies
Pub Dependencies with version locking
Community
Community dartflash
Community Buckshot
Community Rikulo
Community DartGap
Community three.dart
Community Spectre
Community DartBox2D
Community … … … … ... … … … ...
And much, much more!
ladicek.github.com ?