Download ppt - GWT no-dto

Transcript
Page 1: GWT no-dto

GWT noDTO Distilled

Francois Wauquier@wokier

Artisan du SI

Page 2: GWT no-dto

GWT

Transcripteur Java->Javascript Widgets Outils de développement Code performant pour l'utilisateur

Compression Découpage du code par navigateur/locale

Productivity for developers, performance for users

Page 3: GWT no-dto

Google ? Web Toolkit

Ray Cromwell (Google representative and acting Committee Chair)

Artur Signell (Vaadin representative)

Mike Brock (RedHat representative)

David Chandler (Developer Advocate at Google)

Daniel Kurka (mgwt, gwt-phonegap)

Bhaskar Janakiraman (Google)

Page 4: GWT no-dto
Page 5: GWT no-dto

DTO

MonEntite MonDTO

Mais j'écris mes classes 2 fois !!!

Serveur Client

Page 6: GWT no-dto
Page 7: GWT no-dto

DTO

MonEntite MonDTO

Dozer http://dozer.sourceforge.net/Setget FactoryReflection Factory (BeanUtils)Ubiquity http://larochef.github.io/ubiquity/

Serveur Client

Page 8: GWT no-dto
Page 9: GWT no-dto

noDTO

MonEntite

Serveur Client

Page 10: GWT no-dto

DTOs

Pros

Isole Définit une API stable Sous-ensemble de

l'entité pour les perf La sécurité

No source code is available for type…

Page 11: GWT no-dto

DTOs

Pros

Isole Définit une API stable Sous-ensemble de

l'entité pour les perf La sécurité

No source code is available for type…

Cons

Duplique Duplique Duplique Si l'API est publique Doit rester l'exception

Page 12: GWT no-dto

Lever les contraintes

No DTO

Page 13: GWT no-dto
Page 14: GWT no-dto

Utilitaires

Guava-gwt : Google common

https://code.google.com/p/guava-libraries/

Page 15: GWT no-dto

Validation

• Bean-validation : contraintes

http://beanvalidation.org/

https://developers.google.com/web-toolkit/doc/latest/DevGuideValidation

Page 16: GWT no-dto

ToString Equals HashCode

Lombock : Génération Code

http://projectlombok.org/

GWT-TEH : Annotations

https://github.com/wokier/GWT-TEH

Page 17: GWT no-dto

Persistance

Objectify : Appengine BigTable

https://code.google.com/p/objectify-appengine/

Gilead : Hibernate

http://sourceforge.net/projects/gilead/

Page 18: GWT no-dto

Log

GWT Logging

https://developers.google.com/web-toolkit/doc/latest/DevGuideLogging

GWT Usefull Logging

https://code.google.com/p/gwt-usefull-logging/

gwt-log

https://code.google.com/p/gwt-log/

Page 19: GWT no-dto
Page 20: GWT no-dto

Conclusion

Performances

Temps de dévelopement

No-dto

Ubiquity Set-get Factory (à la main)

Dozer

Reflection Factory

Page 21: GWT no-dto

Exemple

Demo

http://gwt-nodto-quickie.appspot.com/

Code

https://github.com/wokier/GwtNoDtoQuickie

Page 22: GWT no-dto

Questions / Réponses

Page 23: GWT no-dto

Merci

Francois Wauquier@wokier

Artisan du SI