Kotlin Fundamentals Course
Description
Kotlin is a general purpose, free, open source, statically typed “pragmatic” programming language initially designed for the JVM (Java Virtual Machine) and Android that combines object-oriented and functional programming features. It is focused on interoperability, safety, clarity, and tooling support. Programming using Kotlin course is for developers who want to learn the syntax and semantics of the language which is quickly replacing java as the primary language for building Android applications. This course would be a good first course for Java or Non Java programmers to get a good head start in Kotlin.
Course Objectives
1. Learn syntax of Kotlin Basics
2. Learn Object Oriented Programming using Kotlin
3. Learn basics of functional programming
4. Learn the Kotlin Way (Kotlin way of doing things vs Java)
5. Learn about Co-routines, new way of thinking about asynchronous code
6. Learn about Java and Kotlin interop
Duration: 3 days, 6 sessions of 4 hours each
Pre-Requisites:
Java Language Programming Knowledge
Basic Android SDK Knowledge
MODULES
Session 1: (4 hours)
1. Introduction to IntelliJ IDE
1.1. Setting up Kotlin in IntelliJ
2. Getting Started with Kotlin
2.1. Constants, Variables, and Data Types
2.2. Operators
2.3. Strings
2.4. Control Flow
2.4.1. Logical Operators
2.4.2. if and when expressions
2.5. Nullable Types
2.5.1. Effectively handling Nullable Types
2.5.2. Nullability
2.6. Loops in Kotlin
2.7. Control structures
3. Functions
3.1. Single Expression functions
3.2. Functions and Parameters
3.3. Functions and Return Values
3.4. Varargs,
3.5. Default Values for Parameters
3.6. Named Parameters
Session 2: (4 Hours)
4. Classes
4.1. Classes and Inheritance
4.2. Constructors
4.3. Properties and Fields
4.4. methods
4.5. Visibility Modifiers
4.6. Data Classes
4.7. Nested Classes
4.8. Enum Classes
4.9. Type Checks and Casts
4.10. this expressions
4.11. abstract class
4.12. sealed class
5. Interface
5.1. Creating an Interface
5.2. Interface Oriented Programming
5.3. Delegation in Kotlin
Session 3: (4 hours)
6. Objects
6.1. Object Declaration
6.2. Object Expression
6.3. Using object to implement interfaces
6.4. Object as Singleton
6.5. Companion Object
7. Collections
7.1. Arrays
7.2. Collections
7.3. Filter and map
Session 4: (4 hours)
8. Error Handling
8.1. Exceptions in Kotlin
9. Generics
9.1. Generic Type Parameters
9.2. generic functions and classes
9.3. Type erasure and reified type parameters
9.4. Declaration-site and use-site variance
Session 5: (4 hours)
10. High Order Functions
10.1. Functions as parameters
10.2. Functions as return
10.3. Lambdas
10.4. Anonymous classes vs Lambda Expressions
10.5. Inline Functions
10.6. Extension Functions
11. Delegation in Kotlin
Session 6: (4 hours)
12. Kotlin Way
12.1. Kotlin Idioms
12.2. Kotlin Standard Library
12.2.1. Collections and Collection Functions
12.2.2. Scope Functions
12.3. Porting Java code to Kotlin
12.4. Writing Extension functions
13. Interop
13.1. Calling Java from Kotlin
13.2. Calling Kotlin from Java