voxxed days belgrade - spring boot & kotlin, a match made in heaven

17
SPRING BOOT AND KOTLIN, A MATCH MADE IN HEAVEN @NICOLAS_FRANKEL

Upload: nicolas-frankel

Post on 08-Jan-2017

575 views

Category:

Software


1 download

TRANSCRIPT

SPRING BOOT AND KOTLIN, A MATCH MADE IN HEAVEN@NICOLAS_FRANKEL

@nicolas_frankel #kotlin #springboot 2

ME, MYSELF AND I By day• Consultant

By night• Developer• Blogger• Book author• Teacher/trainer

@nicolas_frankel #kotlin #springboot 3

HYBRIS, AN SAP COMPANY

@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

@nicolas_frankel #kotlin #springboot

@nicolas_frankel #kotlin #springboot 7

WHY SPRING BOOT?Convention over configuration• Kickstart a project in minutes,

not daysOut-of-the-box features•Actuator

@nicolas_frankel #kotlin #springboot 8

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

@nicolas_frankel #kotlin #springboot 1 5

ENOUGH TALK…

Time for DEMO

@nicolas_frankel #kotlin #springboot 1 6

KEY TAKEAWAYS

@nicolas_frankel #kotlin #springboot 1 7

Q&A

http://blog.frankel.ch/@nicolas_frankel http://frankel.in/https://git.io/vVSLG