Kotlin on the Cloud

Kotlin on the Cloud

Slides for my 'Kotlin on the Cloud' talk at the Google Developer Group Lisboa's Kotlin Night.

Eb987f4f2b2d43faa8b3b5a377713913?s=128

João Carvalho

October 12, 2017
Tweet

Transcript

  1. 3.

    About me • Senior Developer / Team Lead @ Talkdesk

    • Backend Developer • IST Alumni (Student & Developer) • PT.JUG Speaker • Follow me on Twitter @johnkarva
  2. 5.

    “Cloud-native is an approach to building and running applications that

    fully exploits the advantages of the cloud computing delivery model. Cloud-native is about how applications are created and deployed, not where.”
  3. 8.

    12 Factor App 1. Single codebase, multiple deploys 2. Explicit

    Dependencies 3. Store Config in Environment 4. Backing Services as resources 5. Separate Build, Release, Execution 6. Standalone (Volatile) Process 7. Port Binding 8. Multiple Process Types 9. Disposability 10. Environment Parity 11. Logs as Event Streams 12. One-off Admin Tasks
  4. 13.
  5. 14.
  6. 19.
  7. 35.

    public class Person { private String name; private int age;

    public Person(String name, int age) { this.name = name; this.age = age; } (...) }
  8. 36.

    public String getName() { return name; } public void setName(String

    name) { this.name = name; } @Override public boolean equals(Object o) { (Stuff generated by your IDE) } @Override public int hashCode() { int result = name.hashCode(); result = 31 * result + age; return result; }
  9. 37.
  10. 41.

    And much more... • No Semicolons! • Lambda Expressions and

    Inline Functions • Type inference • Named Arguments • Default Values • String Interpolation • Ranges • Immutable Collections (Kind of) • Collection helpers • Infix Functions • DSL Support
  11. 43.
  12. 45.
  13. 46.
  14. 47.
  15. 48.
  16. 49.

    @RestController @SpringBootApplication public class DemoApplication { public static void main(String[]

    args) { SpringApplication.run(DemoApplication.class, args); } @GetMapping("/hello") public String hello() { return "Hello World!"; } }
  17. 52.