Your SlideShare is downloading. ×
Building Single-Page Web Appplications in dart - Devoxx France 2013
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Building Single-Page Web Appplications in dart - Devoxx France 2013

8,131
views

Published on

Published in: Education

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
8,131
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
5
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. Building a Single-Page Web Application in Dart 18h20 - 18h50 - Miles Davis B
  • 2. Building a Single-Page Web Application in Dart Yohan Beschi So@t – Java Developer @yohanbeschi 27 au 29 mars 2013
  • 3. Yohan Beschi • Started programming at 15 – 100% self-taught • Languages (Assembly, C/C++, Java, Python) • Blogger, Speaker, Instructor • Started Dart 6 months ago
  • 4. Building Uis - Javascript ?
  • 5. Building Uis - Java ?
  • 6. Building Uis - But how ?
  • 7. Programmatic Components with GWT
  • 8. Java + GWT = Too verbose! lin es n 1 00 e t ha M or
  • 9. The Dart Way Table<User> table = new Table (sorting:true) ..addColumn(ID, new TextCell((User o) => o.id)) ..addColumn(First name, new TextCell((User o) => o.firstName)) ..addColumn(Last name, new TextCell((User o) => o.lastName)) ..addColumn(Age, new TextCell((User o) => o.age)) ..setData(objs);
  • 10. The Dart Way Table<User> table = new Table (sorting:true) ..addColumn(ID, new TextCell((User o) => o.id)) ..addColumn(First name, new TextCell((User o) => o.firstName)) ..addColumn(Last name, new TextCell((User o) => o.lastName)) ..addColumn(Age, new TextCell((User o) => o.age)) ..setData(objs); 6lignes
  • 11. Dart is the winner
  • 12. Once upon a time…
  • 13. Programmer productivity
  • 14. Application scalability
  • 15. Raw execution speed
  • 16. Startup performance
  • 17. And here we are! • Open Source (BSD) • Structured • Anti-revolutionary • Same goals as new Javascript frameworks • The goal is to not break the web
  • 18. Dart - The language
  • 19. Abstract Class abstract class Validatable { }
  • 20. Abstract Method abstract class Validatable { List<Object> valuesToValidate(); }
  • 21. Generics abstract class Validator<T extends Validatable> { }
  • 22. Implementing a method – 1/4 abstract class Validator<T extends Validatable> { bool validate(T object) { } }
  • 23. Implementing a method - for in – 2/4 abstract class Validator<T extends Validatable> { bool validate(T object) { for (Object obj in object.valuesToValidate()) { } } }
  • 24. Implementing a method – 3/4 abstract class Validator<T extends Validatable> { bool validate(T object) { for (Object obj in object.valuesToValidate()) { if (StringUtils.isEmpty(obj.toString())) { } } } }
  • 25. Implementing a method – 4/4 abstract class Validator<T extends Validatable> { bool validate(T object) { for (Object obj in object.valuesToValidate()) { if (StringUtils.isEmpty(obj.toString())) { return false; } } return true; } }
  • 26. Concrete class class User { }
  • 27. Class as Interface class User implements Validatable { }
  • 28. Class members class User implements Validatable { String username; String password; }
  • 29. Private Class members class User implements Validatable { String _username; String _password; }
  • 30. Accessors class User implements Validatable { String _username; String _password; String get username => this._username; String get password => this._password; set username(String username) => this._username = username; set password => this._password = password; }
  • 31. Constructor – Sugar Syntax class User implements Validatable { String _username; String _password; User(String this._username, String this._password); }
  • 32. Implementing an abstract method class User implements Validatable { String _username; String _password; User(String this._username, String this._password); List<Object> valuesToValidate() { return [_username, _password]; } }
  • 33. Dart Reference API • Core • Unit Testing & Mocks • HTML • Math • Async • Logging • IO • URI • Crypto • I18N • etc. • JSON • Mirrors • UTF
  • 34. But there is more… • Mixins • Optionally typed • Top level functions • Mono process
  • 35. Isolates
  • 36. Dart Ecosystem
  • 37. Virtual Machines
  • 38. Dartium
  • 39. DartEditor
  • 40. Plugins
  • 41. dart2js
  • 42. dart2js
  • 43. dart2js • Target HTML5 • Tree Shaking • Aggregation/Minification • Optimization
  • 44. Pub
  • 45. Pub - pubspec.yaml name: pacifista_rocks description: The best application in the whole world version: 0.0.1 dependencies: great_lib: any
  • 46. dartdoc /// This is a single-line documentation comment. /** * This is a multi-line documentation comment. * To generate the documentation: * $ dartdoc <filename> */ void main() { }
  • 47. dartdoc
  • 48. Uses • Single-page Web Apps • Client and server side applications • HTML Games
  • 49. Démonstrationhttps://github.com/yohanbeschi/devoxxfr_20130327.dart https://github.com/yohanbeschi/pwt_proto.dart 27 au 29 mars 2013
  • 50. RoadmapToday: M3 ??: M4 Summer 2013 : V1 !
  • 51. Want to know more ? • DartLangFR • Mailing-list : dartlangfr (https://groups.google.com/forum/?fromgroups=&hl=en#!forum/dartlangfr) • Google+ : DartlangFR (https://plus.google.com/u/0/communities/104813951711720144450) • Twitter : @dartlang_fr • Blog : dartlangfr.net • DartLang • Site officiel : www.dartlang.org • Mailing-list : dartlang (https://groups.google.com/a/dartlang.org/forum/?fromgroups&hl=en#!forum/misc) • Google+ : Dart (https://plus.google.com/+dartlang) • Google+ : Dartisans (https://plus.google.com/communities/114566943291919232850) • Twitter : @dart_lang • Blog : blog.dartwatch.com • Newsletter : Dart weekly
  • 52. Thanks Questions ?