Spring Boot? • Another project built of top of Spring. • Main goals: ◦ Decrease friction by taking an opinionated approach to building applications ◦ Reduce configurations ◦ Streamline deployment approach
any Servlet 3.0+ API (such as TomCat) ◦ Supports standalone Netty and Jetty, too. • Includes a cross-platform HTTP Client that includes: ◦ Authentication (includes OAuth 1a and 2) ◦ Cookies ◦ WebSockets ◦ JSON Processing https://ktor.io/
Validate and transpile Kotlin code to Javascript • Targets ECMAScript 5.1 ◦ Plans in the work to support ECMAScript 2015 Kotlin/JS Kotlin All The Things
Kotlin Kotlin Module: myModule class Person(val name: String) { fun hello() = println("Hello $name!") @JsName("helloWithGreeting") fun hello(greeting: String) = println("$greeting $name!") } JavaScript var person = new myModule.Person("Dmitry"); myModule.hello(); myModule.helloWithGreeting("Servus");
App • Scaffold a kotlin react app • Based on the “create-react-app” command • Maintained by JetBrains ◦ https://github.com/JetBrains/create-react-kotlin-app
LLVM based backend • Supports two-way interoperability ◦ Executable on multiple platforms ◦ Static Library with C headers for C/C++ ◦ Use existing static/dynamic libraries ◦ Supports Objective-C types • Produces executables and libraries/frameworks. Kotlin Native Kotlin All The Things
the Kotlin tooling to 1.3+ Or • Download the compiler: https://github.com/JetBrains/kotlin/releases/tag/v1.3.70 • Extract and add to your path. Kotlin Native Kotlin All The Things
// select projection matrix glMatrixMode(GL_PROJECTION) // set the viewport glViewport(0, 0, windowWidth, windowHeight) // set matrix mode glMatrixMode(GL_PROJECTION) // reset projection matrix glLoadIdentity() val aspect = windowWidth.toDouble() / windowHeight // set up a perspective projection matrix gluPerspective(45.0, aspect, 1.0, 500.0) // specify which matrix is the current matrix glMatrixMode(GL_MODELVIEW) glShadeModel(GL_SMOOTH) ... }
// select projection matrix glMatrixMode(GL_PROJECTION) // set the viewport glViewport(0, 0, windowWidth, windowHeight) // set matrix mode glMatrixMode(GL_PROJECTION) // reset projection matrix glLoadIdentity() val aspect = windowWidth.toDouble() / windowHeight // set up a perspective projection matrix gluPerspective(45.0, aspect, 1.0, 500.0) // specify which matrix is the current matrix glMatrixMode(GL_MODELVIEW) glShadeModel(GL_SMOOTH) ... }
natively across platforms ◦ Gradle Plugin ◦ Compile for multiple “targets” ◦ Common + Platform specific code ▪ Expect in common code, Actual in platform code. • Still experimental • It’s not meant to share all code Kotlin Multiplatform Kotlin All The Things
class Platform actual constructor() { actual val platform: String = "iOS" } > androidMain actual class Platform actual constructor() { actual val platform: String = "Android" }
• Kotlin - One Language, All Tiers: Developing Multiplatform Projects • Dmitry Jemerov • Much more flexible • You can “expect” top level functions and extension functions, too. • Allows you to reuse existing implementation if needed.
a great community. • Kotlin became popular on the JVM, but that’s not the only platform for the language. • Multiplatform projects enable us to use Kotlin natively everywhere.