Advertisement
Advertisement

More Related Content

Advertisement
Advertisement

Let's Play Dart

  1. Let's play Dart! Jana Moudrá @Janamou +JanaMoudra www.moudra.net Juicymo #dfua
  2. Let's write a Web App...
  3. No fairy tales today
  4. What is Dart? #dfua
  5. Language Easy to learn Modular Great tools
  6. Language Easy to learn Modular Great tools Let's learn Dart in a few minutes
  7. class Person { String name; int age; Person(this.name, this.age); } Person person = new Person("Peter", 18); Easy to learn
  8. class Person { var name; var age; Person(this.name, this.age); } var person = new Person("Peter", 18); Types are optional
  9. var name; //is null int count; //is null Default value no undefined in Dart
  10. if (name is String) { print("$name is String"); } Checking types
  11. Person person = new Person(); person.name = "Peter"; person.age = 18; person.hairColor = "brown"; Normal developer life
  12. Person person = new Person() ..name = "Peter" ..age = 18 ..hairColor = "brown"; Hello .. operator
  13. Me + Dart = Productivity #dfua
  14. Great docs Tools and libraries async/await Null-Aware operators
  15. pub
  16. name: my_super_app version: 0.1.0 description: My super application! dependencies: args: any pubspec.yaml
  17. name: my_super_app version: 0.1.0 description: My super application! dependencies: args: any pubspec.yaml $ pub get Resolving dependencies... Got dependencies!
  18. dart:async, dart:collection, dart:convert, dart:core, dart:developer, dart:html, dart:indexed_db, dart:io, dart:isolate, dart:js, dart: math, dart:mirrors, dart:svg, dart: typed_data, dart:web_audio, dart:web_gl, dart:web_sql
  19. HttpRequest .getString("animals.json") .then(feedAnimals); Before async/await era
  20. feedAnimals(await HttpRequest .getString("animals.json")); We can do it better
  21. if (person != null) { person.sayHello(); } Null everywhere...
  22. person?.sayHello(); Hello Null-Aware
  23. person?.sayHello(); Hello Null-Aware and that's not all...
  24. Not only for client side #dfua
  25. Not only for client side server side command line mobile #dfua
  26. Client side Web Browser Compiles to JavaScript Lots of libraries
  27. Server side Dart VM Lots of frameworks Integration with databases App Engine, Firebase etc...
  28. Command line
  29. On mobile?
  30. On mobile Fletch Flutter
  31. Fletch Flutter dartlang.org/mobile flutter.io On mobile
  32. Developer Utilities #dfua
  33. Tests rule the world code Package test test("Person is Jana", () { Person person = new Person("Jana"); expect(person.name, equals("Jana")); });
  34. Documentation for everything /** * [ProcessResult] represents the result of * running a non-interactive process started with * [Process.run] or [Process.runSync]. */ class ProcessResult {
  35. Dartdoc
  36. Observatory is your best friend Profiling Dart code Code coverage Debugging memory leaks ...
  37. Observatory
  38. That's not all! Stagehand dartfmt Grinder … and more on pub.dartlang.org
  39. Why should I use Dart? #dfua
  40. #IJSAWTC
  41. I Just Sit And Write The Code!
  42. I Just Sit And Write The Code! for client for server for command line
  43. Let's play Dart tomorrow Dart Code Lab Sat, 14:50 - 15:30, Community hall #dfua
  44. Jana Moudrá @Janamou +JanaMoudra www.moudra.net Juicymo Questions? #dfua
  45. Image credits ● Matthew Keefe, cc, https://www.flickr.com/photos/60243770@N00/3123775954/ ● Mari Wirta, cc https://www.flickr.com/photos/64194626@N03/6292870807/ ● jenny downing, cc, https://www.flickr. com/photos/7941044@N06/3990391143/ ● Kjetil Korslien, cc https://www.flickr.com/photos/kjetikor/8484119632/ ● Kārlis Dambrāns, cc https://www.flickr.com/photos/janitors/16524906898
Advertisement