voxxed days belgrade - spring boot & kotlin, a match made in heaven
TRANSCRIPT
@nicolas_frankel #kotlin #springboot 2
ME, MYSELF AND I By day• Consultant
By night• Developer• Blogger• Book author• Teacher/trainer
@nicolas_frankel #kotlin #springboot 4
HCP STARTUP CHALLENGE Preparation Workshop• October 4th, 10:00 AM• StartIt Centar,
Savska 5,11000 Beograd, Serbia
http://www.hcpstartupchallenge.com/
@nicolas_frankel #kotlin #springboot 7
WHY SPRING BOOT?Convention over configuration• Kickstart a project in minutes,
not daysOut-of-the-box features•Actuator
9
KOTLIN
@nicolas_frankel #kotlin #springboot
Open SourceCompiles to• JVM bytecode• JavaScript (experimental)
A "simpler Scala"
@nicolas_frankel #kotlin #springboot
1 0
KOTLIN MAIN FEATURES
@nicolas_frankel #kotlin #springboot
Functional and object-orientedStatically typedNull safetyNo checked exceptionsNamed & optional argumentsLambdasExtension functionsJava compatibility(And more...)
@nicolas_frankel #kotlin #springboot
1 1
KOTLIN MAIN BENEFITS
@nicolas_frankel #kotlin #springboot
More expressive than JavaImproved OOFunctional too
1 2
HELLO KOTLIN!package hello // no semicolons
// namespace-level functions// types on the right// no special syntax for arrays// optional return typefun main(args: Array<String>) { println("Hello Kotlin!")}
@nicolas_frankel #kotlin #springboot@nicolas_frankel #kotlin #springboot
@nicolas_frankel #kotlin #springboot 1 3
THE KILLER FEATURE: EXTENSIONSExtension methodsExtension properties
@nicolas_frankel #kotlin #springboot 1 4
EXTENSION METHODAdd new methods on an existing typeCalled like a method on the typeTranslated to static Util method in the bytecode