39
@HerbertPoul Dart & Polymer WorkTrail Vienna Dart Flight School, 2014-02-01

Dart flight school - Dart and Polymer Introduction

Embed Size (px)

DESCRIPTION

Introduction to Dart and Polymer.dart and how we used the technologie to (re)launch WorkTrail.net - Presentation for the Vienna Dart Flight School at 2014-02-01 Full Version with a few Speaker Notes available at: https://docs.google.com/presentation/d/1inu9oxRumbxXJo7RqoI9zUd2RJM86po1hAlylLF5g7I/edit?usp=sharing Feel free to share, use and remaster/edit or give feedback for improvements ;-)

Citation preview

Page 1: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Dart & PolymerWorkTrail

Vienna Dart Flight School, 2014-02-01

Page 2: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Herbert Poul,Developer @

Developed in Dart since April 2013Gone into production in July

Page 3: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

My go-to Languages

Server SideJava

PythonPerlPHP

Web/Client SideJavaScript

Page 4: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Dart?

“OO Language for the modern Web”

Optionally TypedFully Object OrientedToolable: Whole Program Analysis/Refactoring (Type Inference, etc.)

Page 5: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Not just a Language

“batteries-included developer platform”

Page 6: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Rich Core Library

api.dartlang.org

Page 7: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Dart Editor

Eclipse basedEditor

Page 8: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Pub - Package Manager

670+ Packages

Page 9: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Syntax

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

Page 10: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

… with some fortunate exceptions

Page 11: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Named Constructors

Page 12: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Constructor syntax sugar

Page 13: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Named Optional Parameters

Page 14: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Cascade Operator

Page 15: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

String Interpolation

Page 16: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Getter & Setter

Page 17: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Function shorthand for oneliners

Page 18: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Use it today!

Dartium

Page 19: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

… dart2js

Compile Dart to JavaScript

Page 20: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

dart2js is a First-Class Citizen

Page 21: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Used in production...

Page 22: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

WorkTrail: How we use Polymer

Page 23: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Extending the DOM

Page 24: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Reusing Polymer Elements

Page 25: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Reusing Elements from Pub

● Install packages through Pub● Use 3rd Party Elements with complete

Isolation

Page 26: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

WorkTrail Public Elements @ github

autocomplete_ui tapo_calendar

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

Page 27: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Polymer

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

Page 28: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

HTML Imports

Page 29: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Custom Elements & Shadow DOM

Page 30: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Template Binding & Object.observe

Page 31: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Polymer.dart

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

“Build structured, encapsulated, client-side web apps with Dart and web components”

Page 32: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Demo: Reuse autocomplete_ui

Page 33: Dart flight school - Dart and Polymer Introduction

Create Application

Page 34: Dart flight school - Dart and Polymer Introduction

Adding autocomplete_ui as dependency

Page 35: Dart flight school - Dart and Polymer Introduction

Add autocomplete component

Page 36: Dart flight school - Dart and Polymer Introduction

add choices and choice properties

Page 37: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Deployment

pub build

Page 38: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Dart

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

Page 39: Dart flight school - Dart and Polymer Introduction

@HerbertPoul

Thanks

Questions?

@HerbertPoulhttp://h.poul.at/+

visit us @ https://worktrail.net/