sharing
play

Sharing [Kotlin code across platforms] is caring! Eugenio Marletti - PowerPoint PPT Presentation

KotlinConf Sharing [Kotlin code across platforms] is caring! Eugenio Marletti @workingkills app app iOS Android frontend backend tools sharing


  1. KotlinConf Sharing [Kotlin code across platforms] is caring! Eugenio Marletti @workingkills

  2. “ ” ” “ “ ” ” “ “app”

  3. “ “ “ ” ” ” “ “app” ” iOS Android frontend backend tools

  4. sharing

  5. sharing code

  6. sharing code

  7. sharing business logic

  8. sharing bugs

  9. sharing bugs

  10. sharing fixes

  11. sharing effort

  12. C++ J2ObjC / GWT JavaScript

  13. THE ALGORITHM™

  14. C++ ObjC++ THE ALGORITHM™ JavaScript TypeScript

  15. C++ ObjC++ JavaScript iOS !" JavaScriptCore TypeScript Android !" WebView

  16. ̺ ̨͇̯ ̔̍̀̏̌̕ ̵ ͒ ̘͖̯ C++ ObjC++ JavaScript ͔͎̗̬̼̓̒̄̍̓͐̒̎̕ b ̡̫̰͙͚͋͋̓́̇͟ V ͐̇͞ ̓̿̔̿̓ ̚ iOS !" JavaScriptCore TypeScript w ̛͊͆̍͑ i ͒̅̉͊̌̇ ͟ ̨̭̳̱͕ Android !" W ͊̊̏̃͑̽̃̕ ̶ȩ̧̟̝͔ ̯̦ę͕͔͉̜̗͔͎ ̴̯̯̻̪̦ ̡͓̰̲̳͟ ̥̯ ͢ ͟

  17. C++ ObjC++ JavaScript iOS !" JavaScriptCore TypeScript Android !" ?

  18. C++ ObjC++ JavaScript THE ALGORITHM™ TypeScript Florent Bécart Kotlin @fbecart

  19. multi-platform

  20. (before 1.2) -Xmulti-platform header impl

  21. (before 1.2) -Xmulti-platform header impl

  22. (from 1.2) -Xmulti-platform expect actual

  23. ANDROID WebView legacy.js BACKEND JS iOS JavaScriptCore

  24. ANDROID WebView shared.kt legacy.js BACKEND JS iOS JavaScriptCore shared-test.kt legacy-test.js

  25. ANDROID WebView shared.kt legacy.js BACKEND JS iOS JavaScriptCore shared-test.kt legacy-test.js

  26. ANDROID WebView shared.kt legacy.js BACKEND JS iOS JavaScriptCore shared-test.kt legacy-test.js

  27. ANDROID WebView shared.kt legacy.js BACKEND JS iOS JavaScriptCore shared-test.kt legacy-test.js

  28. ANDROID WebView JVM shared.kt BACKEND JS iOS JavaScriptCore shared-test.kt legacy-test.js

  29. /** * A day number, offset from 01/01/2012 !" export type Day = number

  30. /** * A day number, offset from 01/01/2012 !" typealias Day = Int

  31. export class Value { class Value { constructor(value) { constructor(value: Double) { this.value = value this.value = value } } readonly value: number val value: Double toString() { override fun toString(): String { return String(this.value) return this.value.toString() } } companion object { static add = (v1 : Value, v2 : Value): Value !$ { fun add(v1 : Value, v2 : Value): Value { return new Value(v1.value + v2.value) return Value(v1.value + v2.value) } } static isZero = (valueWithVariance: Value): boolean !$ { fun isZero(valueWithVariance: Value): Boolean { return 0 !!% valueWithVariance.value return .0 !!% valueWithVariance.value } } static subtract = (v1 : Value, v2 : Value): Value !$ { fun subtract(v1 : Value?, v2 : Value?): Value { let value = 0 var value = .0 if (v1 !& v2) { value = v1.value - v2.value } if (v1 !' null !& v2 !' null) { value = v1.value - v2.value } return new Value(value) return Value(value) } } } } }

  32. < insert more talking here >

  33. Eugenio Marletti @workingkills BIT.LY/SHARING-KOTLIN-IS-CARING

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend