Vienna Dart Flight School, 2014-02-01

Dart & Polymer
WorkTrail

@HerbertPoul
Herbert Poul,
Developer @

Developed in Dart since April 2013
Gone into production in July
@HerbertPoul
My go-to Languages
Server Side
Java
Python
Perl
PHP

Web/Client Side
JavaScript

@HerbertPoul
Dart?
“OO Language for the modern Web”
Optionally Typed
Fully Object Oriented
Toolable: Whole Program Analysis/Refactoring
(Type Inference, etc.)
@HerbertPoul
Not just a Language
“batteries-included developer platform”

@HerbertPoul
Rich Core Library
api.dartlang.org

@HerbertPoul
Dart Editor
Eclipse based
Editor

@HerbertPoul
Pub - Package Manager
670+ Packages

@HerbertPoul
Syntax
● Familiar (boring) syntax
○ similar to Java / JavaScript / C#

@HerbertPoul
… with some fortunate exceptions

@HerbertPoul
Named Constructors

@HerbertPoul
Constructor syntax sugar

@HerbertPoul
Named Optional Parameters

@HerbertPoul
Cascade Operator

@HerbertPoul
String Interpolation

@HerbertPoul
Getter & Setter

@HerbertPoul
Function shorthand for oneliners

@HerbertPoul
Use it today!

Dartium
@HerbertPoul
… dart2js

Compile Dart to JavaScript
@HerbertPoul
dart2js is a First-Class Citizen

@HerbertPoul
Used in production...

@HerbertPoul
WorkTrail: How we use Polymer

@HerbertPoul
Extending the DOM

@HerbertPoul
Reusing Polymer Elements

@HerbertPoul
Reusing Elements from Pub
● Install packages through Pub
● Use 3rd Party Elements with complete
Isolation

@HerbertPoul
WorkTrail Public Elements @ github
autocomplete_ui

https://github.com/hpoul/dart-autocomplete-ui

tapo_calendar

@HerbertPoul
Polymer

http://www.polymer-project.org/

@HerbertPoul
HTML Imports

@HerbertPoul
Custom Elements & Shadow DOM

@HerbertPoul
Template Binding & Object.observe

@HerbertPoul
Polymer.dart
“Build structured, encapsulated, client-side web apps
with Dart and web components”

https://www.dartlang.org/polymer-dart/

@HerbertPoul
Demo: Reuse autocomplete_ui

@HerbertPoul
Create Application
Adding autocomplete_ui as dependency
Add autocomplete component
add choices and choice properties
Deployment
pub build

@HerbertPoul
Dart
● “batteries-included” Platform for Web Apps
● Usable now!
● Easy to learn & get started

@HerbertPoul
Thanks
Questions?
@HerbertPoul
http://h.poul.at/+
visit us @ https://worktrail.net/
@HerbertPoul

Dart flight school - Dart and Polymer Introduction