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
150
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
34
Write Yourself an Annotation Processor
ladicek
0
41
Kotlin or The Quest For Java.Next
ladicek
0
170
Dart++
ladicek
0
140
Dart: The Dawn of Web Apps
ladicek
1
470
Dart: Preview
ladicek
0
81
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Site-Speed That Sticks
csswizardry
4
400
How to Ace a Technical Interview
jacobian
276
23k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
Speed Design
sergeychernyshev
27
800
Embracing the Ebb and Flow
colly
84
4.6k
The Invisible Side of Design
smashingmag
299
50k
A Philosophy of Restraint
colly
203
16k
Bash Introduction
62gerente
611
210k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Mobile First: as difficult as doing things right
swwweet
223
9.4k
Designing Experiences People Love
moore
140
23k
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 ?