Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Migrate Enterprise Apps to Kotlin

Migrate Enterprise Apps to Kotlin

AMahdy Abdelaziz

September 26, 2018
Tweet

More Decks by AMahdy Abdelaziz

Other Decks in Programming

Transcript

  1. M I G R AT I N G E N

    T E R P R I S E A P P S T O K O T L I N ! @ A M A H D Y 7 5 S T O R Y A N D P H I L O S O P H Y Software is eating the world and what most of us see of it is the user interface. The user interface has become the key component of how the users experience the business behind it. Competition is lost or won due to user experience. Simplicity is king and the users get frustrated by anything ugly, slow or not working on the device they happen to use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight. Together we want to build a user interface that puts a smile on the user’s face. Vaadin is the technology that empowers developers to build the best web-apps for business purposes. Our priority over everything else is developer productivity because we believe that by simplifying the developer experience and saving the developer’s time, they are best able to focus on building great user interfaces. Our brand is what we want everyone to think about us. When everyone - both us and the people around us - have a consistent understanding of what Vaadin is and what we stand for, it enables that image to spread and amplify. This book defines what we want that image to be. It defines what the Vaadin brand is. I hope that You are as excited and proud of living and breathing the Vaadin brand as I am. You are the one who is shaping what everyone thinks about Vaadin - using this brand as a tool and a guideline every day. Let’s fight for simplicity for both the users and the developers! Joonas Lehtinen Founder & CEO Vaadin I N T R O D U C T I O N
  2. N O T T H E U S U A

    L K O T L I N 1 0 1
  3. K O T L I N F O R P

    R O U S E R S
  4. M I G R AT E A P P S

    T O K O T L I N
  5. M I G R AT E A P P S

    T O K O T L I N Apps: • Big or enterprise Apps • Apps in production • Real world examples
  6. K O T L I N M I G R

    AT I O N 1 0 1
  7. Kotlin fun sum(a: Int, b: Int) = a + b

    fun sum(a: Int, b: Int): Int = a + b
  8. N O T T H E U S U A

    L K O T L I N 1 0 1
  9. H A N D S O N M I G

    R AT I O N T O K O T L I N
  10. Artifact Size Kilobytes 0 2000 4000 6000 8000 Groovy (v2.4.15)

    Clojure (v1.9.0) Scala (v2.12.5) Kotlin (v1.2.31)
  11. GitHub Stars Stars (thousands) 0 5 10 15 20 25

    Ceylon Groovy Clojure Scala Kotlin
  12. • Object Oriented + Statically typed • Lambda + Properties

    • Null safety • Get rid of boilerplate • Functional programing • Seamless Java inter-op • Targets JS/Android/Native
  13. • Java - The Platform (JVM) • Java - The

    Language This thing called Java
  14. • The Java Virtual Machine and its tooling ecosystem •

    Tested, trusted and supported on multiple platforms • Very versatile and successful • Held back by legacy baggage Java - The Platform
  15. • Tightly coupled to Java, the platform • Good, old,

    well known, well tested • Fairly good but not excellent type system • Some not-so-great default behavior (e.g final vs non-final) Java - The Language
  16. Kotlin fun sum(a: Int, b: Int) = a + b

    fun sum(a: Int, b: Int): Int = a + b
  17. Steps summary • Refactor the architecture. • Create a new

    Kotlin project. • Don’t modify your main project.
  18. Steps summary • Start with the backend. • Start with

    less dependent classes (e.g. Data Models). • Seek alternative libraries.
  19. W H AT A B O U T T H

    E F R O N T E N D ?
  20. Choosing the language primarily depends on the use you need

    it for. Scala is a good 7it for projects with a need for a mix of functional and OOP style programming languages. If you just wanted Java to be less frustrating — but still be Java — then there is nothing better than Kotlin out there. https://dzone.com/articles/kotlin-vs-scala-vs-java
  21. 5 S T O R Y A N D P

    H I L O S O P H Y Software is eating the world and what most of us see of it is the user interface. The user interface has become the key component of how the users experience the business behind it. Competition is lost or won due to user experience. Simplicity is king and the users get frustrated by anything ugly, slow or not working on the device they happen to use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight. Together we want to build a user interface that puts a smile on the user’s face. Vaadin is the technology that empowers developers to build the best web-apps for business purposes. Our priority over everything else is developer productivity because we believe that by simplifying the developer experience and saving the developer’s time, they are best able to focus on building great user interfaces. Our brand is what we want everyone to think about us. When everyone - both us and the people around us - have a consistent understanding of what Vaadin is and what we stand for, it enables that image to spread and amplify. This book defines what we want that image to be. It defines what the Vaadin brand is. I hope that You are as excited and proud of living and breathing the Vaadin brand as I am. You are the one who is shaping what everyone thinks about Vaadin - using this brand as a tool and a guideline every day. Let’s fight for simplicity for both the users and the developers! Joonas Lehtinen Founder & CEO Vaadin I N T R O D U C T I O N ?? ?
  22. T H A N K Y O U ! @

    A M A H D Y 7 5 S T O R Y A N D P H I L O S O P H Y Software is eating the world and what most of us see of it is the user interface. The user interface has become the key component of how the users experience the business behind it. Competition is lost or won due to user experience. Simplicity is king and the users get frustrated by anything ugly, slow or not working on the device they happen to use at the time. We at Vaadin fight for simplicity and invite everyone to join this fight. Together we want to build a user interface that puts a smile on the user’s face. Vaadin is the technology that empowers developers to build the best web-apps for business purposes. Our priority over everything else is developer productivity because we believe that by simplifying the developer experience and saving the developer’s time, they are best able to focus on building great user interfaces. Our brand is what we want everyone to think about us. When everyone - both us and the people around us - have a consistent understanding of what Vaadin is and what we stand for, it enables that image to spread and amplify. This book defines what we want that image to be. It defines what the Vaadin brand is. I hope that You are as excited and proud of living and breathing the Vaadin brand as I am. You are the one who is shaping what everyone thinks about Vaadin - using this brand as a tool and a guideline every day. Let’s fight for simplicity for both the users and the developers! Joonas Lehtinen Founder & CEO Vaadin I N T R O D U C T I O N