dart

18

Click here to load reader

Upload: jana-moudra

Post on 02-Jul-2015

497 views

Category:

Software


1 download

DESCRIPTION

Short presentation about Dart presented before Code Lab. Code Lab is available on the Github: * https://github.com/Janamou/dart-codelab/ * https://github.com/Janamou/dart-codelab/wiki

TRANSCRIPT

Page 1: Dart

Introduction to the

Dart lang

Jana Moudrá | @Janamou | +JanaMoudrá

Page 2: Dart

Open-sourceFor better performance

Easy to learnObject oriented

Modular

Page 3: Dart

Use the Dart language, libraries, and tools to write

anything from simple scripts to full-featured apps.

Source: www.dartlang.org

Page 4: Dart

How?

Page 5: Dart

How?Download Dart

Page 6: Dart

Dart Editor DartiumDart SDK

Page 7: Dart

Dart SDKDart VMLibraries

Command Line Tools

Page 8: Dart

How?Learn the language

Page 9: Dart

How?Learn the language

It is easy!

Page 10: Dart

var x = 10;

var y = 20;

or

num x = 10;

num y = 20;

Optional Types

Page 11: Dart

void main() {

print("Hello world Dart!");

}

main() function

Page 12: Dart

void main() {

querySelector("#my-button")

..text = "Open Window"

..onClick.listen(openWindow);

}

Cascade operator

Page 13: Dart

class Person {

String firstName;

String lastName;

int age;

Person(this.firstName, this.lastName);

}

void main() {

Person person = new Person("Jana", "Moudrá");

}

Syntactic sugar

Page 14: Dart

class Person {

String firstName;

String lastName;

int age;

Person(this.firstName, this.lastName);

Person.withAge(this.lastName, this.age);

}

void main() {

Person person = new Person.withAge("Moudrá", 25);

}

Named constructors

Page 15: Dart

class Person {

String _firstName;

String _lastName;

int _age;

Person(this._firstName, this._lastName);

Person.withAge(this._lastName, this._age);

int get age => _age;

set age(int age) => _age = age;

}

Getter and Setter

Page 16: Dart

How?Develop awesome apps!

Page 17: Dart

Code LabPart...

Page 18: Dart

github.com/Janamou/dart-codelab