1 of 87

O U R S P O N S O R S

October 10th, 2023

Kotlin Beginners Night

- What is Kotlin?

- Igniting your Android Journey

VIE

2 of 87

Sponsors

2

VIE

3 of 87

Housekeeping

http://kotlin.wien

-XenableGarbageCollection

3

VIE

4 of 87

News

  • Find us on LinkedIn

4

VIE

5 of 87

Community Interview

VIE

6 of 87

1 Volunteer

7 easy Questions

Your favourite topic

In German or English

6

VIE

7 of 87

Community Interview

Who are you in one sentence?

How long have you been working with Kotlin?

What are you working on (in Kotlin)?

How is Kotlin used in this project?

Tell us about a Kotlin win.

Tell us about a Kotlin fail.

Any problems/wins using Java Libraries?

Kotlin Frameworks / Features:

  • Arrow
  • AtomicFu
  • Coroutines
  • Exposed
  • Gradle DSL
  • HTML DSL
  • Kodein
  • KotlinX-IO
  • Kotlin Serialization
  • Ktor
  • Ktorm
  • MockK
  • TornadoFx

7

VIE

8 of 87

otlin

Introduction for Programmers

Rohini Wani & Rainer Kern 2023

9 of 87

Covered Topics

Brief History and language Evolution

Kotlin Syntax and features:

Variables, Type Inference and Control Flow

Nullability

Class Declaration and Data classes

Object Declaration

Functions (Top level, Extension, Higher Order, Default arguments)

Functional (Single Abstract Method) Interface

Smart Casts

Destructuring Declaration

Kotlin X Serialization

9

10 of 87

“Hello World”

Statically typed, hybrid programming language

Runs on the JVM with full bidirectional interoperability

Runs natively on Android (generates 1.6 Bytecode)

Possibility to compile to Javascript using LLVM

Kotlin Native for iOS, MacOs and Windows

Developed by Jetbrains

Open source compiler and tools

10

11 of 87

YAJL - Yet another JVM Language!

Jetbrains is a well known company with good tooling support

Nothing really new - just the best of all of them

It’s about the Java ecosystem not the language

It’s (1..6).forEach{ println("very") } easy to learn

Feels like Java 2.0 (Java on steroids)

11

12 of 87

log -pretty --date=short

2010 Start of Development by JetBrains

2012 Open Source under Apache 2

2016 Release of v 1.0 in Feb

2017 Android Native

2019 v. 1.3.52

2022 v. 1.7.10

2023 v. 1.9.10

12

13 of 87

14 of 87

Introduction to Kotlin

  • Syntax similar to JAVA / C#
  • Expressiveness makes more readable.
  • Conciseness makes more understandable.
  • Flexibility - It allows developers to declare the functions at the top level
  • No static declaration (can cause problems to Java devs)
  • Has Coroutines

14

// Java

public final String foo = "bar";

// Kotlin

val foo = "bar"

// Java

System.out.println("bar");

// Kotlin

println("bar")

package com.systemkern.demo

fun main(args: Array<String>) {

val name = if (args.length > 0) args[0] else ”Kotlin”

println("Hello $name")

}

15 of 87

Syntax

16 of 87

Defining Variables

16

17 of 87

17

18 of 87

Language Features

19 of 87

Type Inference

19

20 of 87

20

21 of 87

Nullability

21

22 of 87

Nullability (2)

22

23 of 87

Class declaration

23

24 of 87

Object Declarations

24

25 of 87

Pojos

25

26 of 87

Pojos (2)

26

27 of 87

Explicit Properties

27

28 of 87

Idiomatic Properties

28

29 of 87

Data Classes

29

30 of 87

Data Classes (2)

30

31 of 87

Multiple Classes per File

31

32 of 87

Simple Application

32

33 of 87

Top Level Functions (like in JS)

33

34 of 87

Default Arguments

34

35 of 87

Infix functions

35

36 of 87

Higher Order Functions

36

37 of 87

Extension properties

37

38 of 87

Extension Properties (2)

38

39 of 87

Extension Properties (3)

In the object oriented world, these extension functions and properties are insanely powerful

but ...

39

40 of 87

More Smart Casts

40

41 of 87

More Smart Casts (2)

41

42 of 87

More Smart Casts (3)

42

43 of 87

Deconstructing Data Classes

43

44 of 87

44

45 of 87

Collection Api

45

46 of 87

  • Kotlin @ Google IO 2017
    • youtube.com/watch?v=X1RVYt2QKQE
  • Try Kotlin Online
    • try.kotlinlang.org
  • Learn Kotlin
  • Kotlin Vienna User Group
    • kotlin.wien
  • Talking Kotlin podcast
    • Talkingkotlin.com
  • kotlinlang.slack.com
  • KEEP (Kotlin Evolution & Enhancement Process)

46

47 of 87

Igniting Your Android Journey:

Exploring the Realm of Mobile Development.

Jeremiah Polo

Android Developer

48 of 87

Covered Topics

  1. Introduction to Android
  2. Setup developer space
  3. Android Basic
  4. Future of Mobile (KMM)
  5. Seeking help and resources
  6. QA

49 of 87

Introduction to android

50 of 87

Why Android

  • Open source : For the curious, access the source code of Android OS. �
  • Large consumer base: Android runs on 3B+ active devices, as of 2021 �
  • Easy penetration to the market. Play Store reviews takes a small amount of time as compared to Apple Store.

51 of 87

Why Android

  • Earn from it: As a developer, business subscriptions…

  • Easy to learn: Great amount of free courses, tutorial and guides from the source (Google)

52 of 87

Setup development space

53 of 87

Android Studio

  • The official Integrated Development Environment (IDE) for Android app development.
  • Integrated with Syntax highlighter, Emulator, e.tc…
  • Required JDK( Java Development Kit) - Provides the environment and tools to develop application that run on java virtual machine (JVM)
  • Required Android SDKs: Collection of tools and libraries for android development. .

54 of 87

Android Basics

55 of 87

Android Developer tools

UI

Logic

Build Config

Kotlin

Kotlin

Kotlin Scripts (Kts.)

Java

Java

Groovy

xml

56 of 87

Android Project Directory

  • App directory
    • Manifest
    • Java
    • Res
  • Gradle

57 of 87

Android Project Directory

  • App directory
    • Manifest
    • Java
    • Res
  • Gradle

58 of 87

Tools and Language

  • Kotlin -> UI and Logic
  • Xml -> UI
  • Gradle -> Build process

59 of 87

Components of Android Application

  • Activities
  • Services
  • Broadcast receivers
  • Content Providers

60 of 87

Demo on Compose + Kotlin

61 of 87

Android App Development lifecycle

Planning/ �Inception

Design

Development &�Testing

Deployment

62 of 87

Planning / Inception

  • Requirement gathering

  • Shortcomings and mitigations

63 of 87

Design

  • Design phase on how the app will/ should look like

  • Considering Material Design : Provides look and feel guides to making android applications

64 of 87

Development and Testing

  • Implementation phase
  • Transferring the concept from design to code(Look and feel)
  • UI logic -> Interaction
  • Testing

65 of 87

UI

Composables

Layout

Events

66 of 87

Data

Repositories

ViewModels

67 of 87

Testing

Logic

UI

68 of 87

Deployment & Monitoring

  • Providing the app to the users (Play Store: )
    • Internal testing
    • Open testing
    • Production

- Manually or using use of automation tools

- Fastlane, Github Action, �- Monitoring how the app performs. � - Crashlytics

69 of 87

Future of Mobile development

70 of 87

Kotlin Multi Platform

71 of 87

Kotlin Multi Platform

  • 1 Language to rule them all
  • Sharing code between platforms
  • Native capabilities: Ui in compose + Swift
  • Faster development

72 of 87

Demo on KMM

73 of 87

Next Steps

74 of 87

Keep building

75 of 87

Keep building

  • Start a project/projects
    • Personal tool, game.
  • Share what you build
  • Deep dive into the tools
  • Material design
  • Explore courses, blogs and tools

76 of 87

Engage in the community

  • Join community forums like Stackoverflow, github.
  • Attend meetups: virtual or physical. Network to get opportunities like internship mentorship

77 of 87

Keep learning

  • Official android developer resources
  • Tech news e.g Kotlin weekly
  • Engaging with people from community
  • Keep learning

78 of 87

Seeking help and resources

79 of 87

Source: Google Developer Relations

  • Google developer guides (https://developer.android.com/guide)
  • Mad skills videos (https://www.youtube.com/playlist?list=PLWz5rJ2EKKc91i2QT8qfrfKgLNlJiG1z7)
  • Android codelabs(

https://developer.android.com/courses/jetpack-compose/course)

  • Google Samples (

https://developer.android.com/jetpack/compose/samples)

  • @AndroidDevelopers youtube

80 of 87

Community

  • Android heads
  • GDG Vienna
  • Kotlin Vienna
  • Twitter #AndroidDev
  • Droidcon

81 of 87

Blogs

  • Kotlin Weekly

82 of 87

Courses

83 of 87

Q.A

84 of 87

Sources

85 of 87

Sources

86 of 87

Upcoming Schedule 2023

Oct: DevFest Vienna 14th October

Oct: Java Vienna: "distributed workload 23rd October� scheduler with Kafka" & TBA

Nov: Androidheads Vienna: Meet up 2nd November

Nov: Java Vienna: "Keycloak.X & quarkus" & 13th November� "Java containerization deep dive"

Nov: Domain Drive with Kotlin @ openDEVS 14th November

Dec: Weihnachtspunsch powered by APSA 12th December

86

VIE

87 of 87

Contact us

If you have any questions or want to get in touch with us, you are more than welcome to do so!

Our contact information:

meetup@kotlin.wien

87

VIE