2016Volodymyr Tsukur @ JEEConf
hot and spicy Java
with Lombok. live ▶︎
REST
Volodymyr Tsukur partner @
software
engineering
manager @
flushdia vtsukur
program
committee @
boilerplate -
code included in
many places with
little or no changes
whiskey
party!
SHOW TIME !
what is
Lombok?
it is an island
Lombok = chili
Red Hot Chilli JAVA!
.java .class
javac
.java .class
javac
magic?
.java
.class
javac
AST
.java
.class
javac
@
@
-cp
AST
@
@
@
.java
.class
javac
@
@
-cp
AST
@
@
@
.java
.class
javac
AST
build tool
does NOT matter,
compilation does!
LET’S DRINK
CODE IT !
@Cleanup
@Synchronized
@SneakyThrows
less boilerplate
easy to use
extensible
min debug impact
refactoring
WYSIWYG
extensions’ support
easy to misuse
use delombok
design goes first
too much magic is bad
Google Auto
https://github.com/google/auto
alternatives?
drinking time!
References
• https://github.com/rzwitserloot/lombok
• https://groups.google.com/forum/#!forum/project-lombok
• https://www.parleys.com/tutorial/project-lombok-boilerplate-busters
• http://www.ibm.com/developerworks/library/j-lombok/
• http://jnb.ociweb.com/jnb/jnbJan2010.html
• http://royvanrijn.com/blog/2016/03/adding-var-val-to-java/
• http://blog.dripstat.com/type-inference-in-java-jep-286-can-be-disastrous/
https://github.com/vtsukur/lombok-whiskey-demo
Images
1. Project Lombok logo: https://github.com/rzwitserloot/lombok/blob/master/src/installer/lombok/installer/lombok.png
2. Java logo: http://www.cloudkafka.com/images/java.svg
3. Twitter icon: https://g.twimg.com/dev/documentation/image/Twitter_logo_blue_48.png
4. GitHub icon: https://github.com/favicon.ico
5. GitHub icon: https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png
6. Ciklum logo: https://www.ciklum.com/wp-content/themes/theme/img/logo.png
7. Zoomdata logo: https://www.ciklum.com/wp-content/uploads/2015/07/zPVBqQWY8m0i2jXDCG0v7A-Logo_-_Zoomdata.png
8. Easyhunt logo: http://easyhunt.com/static/images/easyhunt_logo.png
9. Frost Digital logo: http://digitalagencynetwork.com/wp-content/uploads/2015/09/frost-digital-mobile-agency-stockholm-sweden.png
10. JEEConf logo: http://jeeconf.com/wp-content/themes/jeeconf/images/jee-logo.png
11. Code wallpaper: http://www.joshmatthews.net/cusec16/pictures/shutterstock_124758646-copy.jpg
12. Wikipedia logo: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Wikipedia-word.svg/174px-Wikipedia-word.svg.png
13. Whiskey party: http://sdcrawl.com/wp-content/uploads/2015/09/0Y2A9753_2-1024x512.jpg
14. College party: http://www.slate.com/content/dam/slate/articles/business/adreportcard/111007_brandbox_americanpie.jpg.CROP.rectangle3-large.jpg
15. Whiskey collection: http://blog.lesroches.edu/wp-content/uploads/Whiskey.jpg
16. Lombok Island wallpaper: https://baiqrosmala.files.wordpress.com/2015/05/lombok-beach-21-hd-images-wallpapers.jpg
17. Chili: https://sophieholic.files.wordpress.com/2011/08/img_7584.jpg
18. Binary tree icon: http://icons.iconarchive.com/icons/custom-icon-design/flatastic-5/512/Binary-tree-icon.png
19. Processor icon: http://www.free-icons-download.net/images/processor-icon-61552.png
20. Right arrow arc icon: http://www.iconarchive.com/download/i95473/iconsmind/outline/Arrow-To.ico
21. File icon: https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/document.png
22. Binary file icon: http://icons.iconarchive.com/icons/mart/glaze/128/binary-icon.png
23. Ant logo: https://ant.apache.org/manual/images/ant_logo_large.gif
24. SBT logo: https://raw.githubusercontent.com/1science/docker-sbt/latest/logo.png
25. Ivy logo: http://ant.apache.org/ivy/images/ivy-lierre.png
26. Gradle logo: http://gradle.wpengine.netdna-cdn.com/wp-content/uploads/2015/10/gradle-logo-horizontal2.svg
27. Maven logo: https://maven.apache.org/images/maven-logo-black-on-white.png
28. Eclipse logo: https://eclipse.org/artwork/images/v2/logo-800x188.png
29. IntelliJ IDEA logo: based on the screenshot of IntelliJ IDEA 15 application icon in Finder
30. Netbeans logo: https://upload.wikimedia.org/wikipedia/en/thumb/0/01/NetBeans.svg/1280px-NetBeans.svg.png
31. Springbank wallpaper: http://www.whiskyintelligence.com/wp-content/uploads/2013/10/Royal_SpecialLabelWhisky_SpringbankCaskRoom_MR.jpg
32. Jack Daniel's: https://s-media-cache-ak0.pinimg.com/736x/ae/a5/c7/aea5c7a814222e11f383f8f44424b527.jpg

Hot and spicy Java with Lombok. Live!

  • 1.
    2016Volodymyr Tsukur @JEEConf hot and spicy Java with Lombok. live ▶︎
  • 2.
    REST Volodymyr Tsukur partner@ software engineering manager @ flushdia vtsukur program committee @
  • 3.
    boilerplate - code includedin many places with little or no changes
  • 4.
  • 6.
  • 7.
  • 8.
    it is anisland
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
    build tool does NOTmatter, compilation does!
  • 19.
  • 20.
  • 21.
    less boilerplate easy touse extensible min debug impact
  • 22.
  • 23.
    use delombok design goesfirst too much magic is bad
  • 24.
  • 25.
  • 26.
    References • https://github.com/rzwitserloot/lombok • https://groups.google.com/forum/#!forum/project-lombok •https://www.parleys.com/tutorial/project-lombok-boilerplate-busters • http://www.ibm.com/developerworks/library/j-lombok/ • http://jnb.ociweb.com/jnb/jnbJan2010.html • http://royvanrijn.com/blog/2016/03/adding-var-val-to-java/ • http://blog.dripstat.com/type-inference-in-java-jep-286-can-be-disastrous/ https://github.com/vtsukur/lombok-whiskey-demo
  • 27.
    Images 1. Project Lomboklogo: https://github.com/rzwitserloot/lombok/blob/master/src/installer/lombok/installer/lombok.png 2. Java logo: http://www.cloudkafka.com/images/java.svg 3. Twitter icon: https://g.twimg.com/dev/documentation/image/Twitter_logo_blue_48.png 4. GitHub icon: https://github.com/favicon.ico 5. GitHub icon: https://assets-cdn.github.com/images/modules/logos_page/GitHub-Mark.png 6. Ciklum logo: https://www.ciklum.com/wp-content/themes/theme/img/logo.png 7. Zoomdata logo: https://www.ciklum.com/wp-content/uploads/2015/07/zPVBqQWY8m0i2jXDCG0v7A-Logo_-_Zoomdata.png 8. Easyhunt logo: http://easyhunt.com/static/images/easyhunt_logo.png 9. Frost Digital logo: http://digitalagencynetwork.com/wp-content/uploads/2015/09/frost-digital-mobile-agency-stockholm-sweden.png 10. JEEConf logo: http://jeeconf.com/wp-content/themes/jeeconf/images/jee-logo.png 11. Code wallpaper: http://www.joshmatthews.net/cusec16/pictures/shutterstock_124758646-copy.jpg 12. Wikipedia logo: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Wikipedia-word.svg/174px-Wikipedia-word.svg.png 13. Whiskey party: http://sdcrawl.com/wp-content/uploads/2015/09/0Y2A9753_2-1024x512.jpg 14. College party: http://www.slate.com/content/dam/slate/articles/business/adreportcard/111007_brandbox_americanpie.jpg.CROP.rectangle3-large.jpg 15. Whiskey collection: http://blog.lesroches.edu/wp-content/uploads/Whiskey.jpg 16. Lombok Island wallpaper: https://baiqrosmala.files.wordpress.com/2015/05/lombok-beach-21-hd-images-wallpapers.jpg 17. Chili: https://sophieholic.files.wordpress.com/2011/08/img_7584.jpg 18. Binary tree icon: http://icons.iconarchive.com/icons/custom-icon-design/flatastic-5/512/Binary-tree-icon.png 19. Processor icon: http://www.free-icons-download.net/images/processor-icon-61552.png 20. Right arrow arc icon: http://www.iconarchive.com/download/i95473/iconsmind/outline/Arrow-To.ico 21. File icon: https://cdn2.iconfinder.com/data/icons/windows-8-metro-style/512/document.png 22. Binary file icon: http://icons.iconarchive.com/icons/mart/glaze/128/binary-icon.png 23. Ant logo: https://ant.apache.org/manual/images/ant_logo_large.gif 24. SBT logo: https://raw.githubusercontent.com/1science/docker-sbt/latest/logo.png 25. Ivy logo: http://ant.apache.org/ivy/images/ivy-lierre.png 26. Gradle logo: http://gradle.wpengine.netdna-cdn.com/wp-content/uploads/2015/10/gradle-logo-horizontal2.svg 27. Maven logo: https://maven.apache.org/images/maven-logo-black-on-white.png 28. Eclipse logo: https://eclipse.org/artwork/images/v2/logo-800x188.png 29. IntelliJ IDEA logo: based on the screenshot of IntelliJ IDEA 15 application icon in Finder 30. Netbeans logo: https://upload.wikimedia.org/wikipedia/en/thumb/0/01/NetBeans.svg/1280px-NetBeans.svg.png 31. Springbank wallpaper: http://www.whiskyintelligence.com/wp-content/uploads/2013/10/Royal_SpecialLabelWhisky_SpringbankCaskRoom_MR.jpg 32. Jack Daniel's: https://s-media-cache-ak0.pinimg.com/736x/ae/a5/c7/aea5c7a814222e11f383f8f44424b527.jpg