Your SlideShare is downloading. ×
0
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Introduction to the Dart language
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Introduction to the Dart language

1,215

Published on

My presentation from event: Introduction to the Dart language organized by GDG SSPŠ.

My presentation from event: Introduction to the Dart language organized by GDG SSPŠ.

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,215
On Slideshare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
10
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Introduction to the Dart lang Jana Moudrá
  • 2. Co-Founder at Juicymo Organizer at GDG ČVUT Prague/GDG Prague Interested in Web, Android, Design, Dart about.me/janamou About Me
  • 3. about.me/janamou
  • 4. about.me/janamou 1.3.6
  • 5. Open-source Language for the Web For better performance Goals to replace JavaScript Ready for standardization about.me/janamou
  • 6. Dartium: Chromium with Dart VM about.me/janamou
  • 7. Compiled into JavaScript works in all modern browsers about.me/janamou
  • 8. Object Oriented Easy to learn Optional types Modular Compiles to JavaScript about.me/janamou
  • 9. Client Server about.me/janamou
  • 10. Performance
  • 11. Dart Performance www.dartlang.org/performance/
  • 12. Language
  • 13. Optional types Every variable is object Top level main() function Checked and Production modes Syntactic sugar Named constructors … and more about.me/janamou Streams Futures HTML
  • 14. var x = 10; var y = 20; or num x = 10; num y = 20; Optional types about.me/janamou
  • 15. void main() { print("Hello world Dart!"); } Top level main() function about.me/janamou
  • 16. class Person { String firstName; String lastName; int age; Person(this.firstName, this.lastName); } void main() { Person person = new Person("Jana", "Moudrá"); } Syntactic sugar about.me/janamou
  • 17. 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 constructor about.me/janamou
  • 18. 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/Setter about.me/janamou
  • 19. void main() { querySelector("#my-button") ..text = "Open Window" ..onClick.listen(openWindow); } Cascade operator about.me/janamou
  • 20. someFunc() .then(printValue) .catchError(printError); Futures I. about.me/janamou
  • 21. HttpRequest.getString('shapes.json') .then((String jsonString) { print(jsonString); }) .catchError((Error error) { print(error.toString()); }); Futures II. about.me/janamou
  • 22. Tools
  • 23. about.me/janamou Dart Editor Dartium Dart SDK
  • 24. Dart Editor
  • 25. Dart VM Libraries Command Line Tools Dart SDK
  • 26. Dart VM Libraries Command Line Tools Dart SDK dart2js dartanalyzer pubdocgen
  • 27. Libraries
  • 28. dart:core dart:html dart:math dart:convert dart:js dart:web_gl … and more on https://api.dartlang.org/apidocs/ about.me/janamou
  • 29. import 'dart:html'; ButtonElement myButton; void main() { myButton = querySelector('#myButton'); myButton.onClick.listen(updateText); } void updateText(Event event) { myButton.text = "Hello world Dart!"; } dart:html about.me/janamou
  • 30. dart:convert about.me/janamou import 'dart:convert'; void main() { String jsonString = '{"name": "Jana", "surname": "Moudra"}'; Map jsonMap = JSON.decode(jsonString); print(jsonMap["name"]); //prints Jana print(jsonMap["surname"]); //prints Moudra }
  • 31. dart:js about.me/janamou <script type="text/javascript"> var Person = function(name, surname) { this.name = name; this.surname = surname; this.sayHello = function(){ alert("Hello!"); } }; </script>
  • 32. dart:js about.me/janamou import 'dart:js'; void main() { var person = new JsObject(context['Person'], ["Jana", "Moudra"]); print(person["name"]); print(person["surname"]); person.callMethod("sayHello"); }
  • 33. AngularDart Polymer.dart StageXL three.dart vector_math … and more on https://pub.dartlang.org/ about.me/janamou
  • 34. How to start?
  • 35. How to start? www.dartlang.org
  • 36. GET STARTED www.dartlang.org/codelabs/darrrt/
  • 37. DOCS > TUTORIALS www.dartlang.org/docs/tutorials/
  • 38. DART API REFERENCE https://api.dartlang.org/apidocs/ DOCS > DART: UP AND RUNNING www.dartlang.org/docs/dart-up-and-running/
  • 39. DOCS > API REFERENCE https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/home
  • 40. PUB https://pub.dartlang.org/
  • 41. SAMPLES www.dartlang.org/samples/
  • 42. Thank You! and happy Dart coding :-) about.me/janamou
  • 43. https://www.dartlang.org/ http://news.dartlang.org/ https://pub.dartlang.org/ https://github.com/dart-lang https://plus.google.com/+dartlang/ https://www.dartlang.org/articles/idiomatic-dart/ Dart Resources

×