Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Grokking TechTalk #26: Kotlin, Understand the Magic

201 views

Published on

- Discuss and understand how Kotlin's core feature works, compare with its ancestor.

Speaker: Ngô Minh Hiền
- Senior Android Developer
- Android Mobile Team lead @ Wizeline

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Grokking TechTalk #26: Kotlin, Understand the Magic

  1. 1. WIZELINEwww.wizeline.comproprietary+confidentialwww.wizeline.comWIZELINEproprietary+confidential Kotlin Understand the Magic
  2. 2. wizeline.com | confidential - do not distribute 2 • Sr. Android Engineer at Wizeline • Android Mobile Team lead • 8 year of Experiences in Java and Android HIEN NGO HCMC, VN WIZELINE
  3. 3. About Kotlin Understand Kotlin top feature Kotlin Puzzlers QA Kotlin Understand the Magic
  4. 4. SLIDE 4 About Kotlin ● Jul 2011, introduced by JetBrain ● Feb 2016, Kotlin 1.0 released ● Google I/O 2017, Google officially support Kotlin on Android
  5. 5. SLIDE 5Most Loved Languages Most Wanted Languages Source: StackOverFlow 2017 Insight
  6. 6. SLIDE 6 Source: Realm Report
  7. 7. SLIDE 7 About Kotlin ● OOP Programming Language ● Fully Java compatible ● Functional Programming Style ● Basics, Smart, Safety, Minimal, Flexibility
  8. 8. SLIDE 8 About Kotlin ● Multiplatforms with Kotlin ○ Server: Kotlin/JVM, Ktor https://ktor.io/ ○ Web page: Kotlin/JS https://github.com/jetbrains/create-react-kotlin-app ○ Android: Kotlin/JVM ○ iOS: Kotlin/Native https://github.com/JetBrains/kotlin-native/tree/master/samples ● Sample App: https://github.com/JetBrains/kotlinconf-app
  9. 9. WIZELINE.COM Beautiful Future or False Promises
  10. 10. Null Safety
  11. 11. Null Safety - Nullable types and Non-Null Types Eg: String - String? , View - View? var greeting: String = "Hello, World" greeting = null // Compilation Error var nullableGreeting: String? = "Hello, World" nullableGreeting = null // Allowed - Safe call operator: ?. var length = nullableGreeting?.length() - Elvis operator: ?: var currentCompany = user?.profile?.company ?: "Wizeline" - Not null assertion : !! Operator var length = nullableGreeting!!.length()
  12. 12. Null Safety
  13. 13. Null Safety
  14. 14. Null Safety
  15. 15. Null Safety
  16. 16. Null Safety
  17. 17. Null Safety
  18. 18. Data Class
  19. 19. Data Class -
  20. 20. Data Class
  21. 21. Data Class
  22. 22. Extension Function Extend a class with new functionality without having to inherit from the class or use any type of design pattern such as Decorator
  23. 23. Extension Function
  24. 24. Extension Function
  25. 25. Extension Function
  26. 26. Higher Order Functions A function that takes functions as parameters (callbacks), or returns a function
  27. 27. Higher Order Functions
  28. 28. Higher Order Functions
  29. 29. Higher Order Functions
  30. 30. Higher Order Functions
  31. 31. Higher Order Functions
  32. 32. Higher Order Functions
  33. 33. DSL A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains.
  34. 34. DSL Source: Anko Library For Android
  35. 35. DSL
  36. 36. DSL
  37. 37. DSL
  38. 38. SLIDE 39 Many More…. - Coroutines - Type Check and Smart Casts - Collection Processing - Depreciation Handler - Any, Nothing and Unit - Delegation ....
  39. 39. WIZELINE.COM Kotlin Puzzler
  40. 40. sales@wizeline.com THANK YOU Feedback: https://goo.gl/o2oRAQ hien.ngo@wizeline.com

×