Highlights
- Learn Basics of Kotlin with Objects, variables and structure
- Understand Object-Oriented Programming for Kotlin
- Explore Functions, arguments and syntax
- Utilise Function-oriented programming
- Use Extensions: properties and functions
- Learn Domain Specific Language
- Work with collections and texts
- Learn Generic with Covariance, contravariance and invariance
- Understand Reflection: types, classes, functions, properties and Kotlin references
- Apply Interoperability Between Kotlin and Java
- Acquire skill in Android KTX for Android Backend and Java
- Develop Android Apps or Java Backend applications with Kotlin
Course Details
Basics of Kotlin
- Objects and variables
- Type inference
- Nullability and smart casting
- Composite data types
- Control structures
- Comments
Object-Oriented Programming For Kotlin
- Classes and properties, interfaces, abstract classes, enums, overriding methods and properties
- Primary constructors and initialization blocks
- Secondary constructors
- Data classes
- Object expressions
- Object declarations and companion objects
- Nested classes
- Visibility modifiers
- Sealed classes
Functions
- Vararg parameters
- Single-expression functions
- Default arguments and named argument syntax
- Top-level functions and properties
- Local functions
Function-oriented programming For Kotlin
- Functional type
- Anonymous functions
- Lambda expressions
- Simpler lambda notation
- Lambda functions under the hood
- Higher-Order Functions
- Last lambda in argument convention
- Inline functions
- Java Single Abstract Method lambda interface and usage of them in Java methods
Extensions
- Extension functions
- Extension properties
- Function type with receiver, function literal with receiver, referencing extension functions
- Predefined functional literals with a receiver
Domain Specific Language
- Function types with receiver
- Lambda expressions with receiver
- Making your own DSL
Working with collections and texts
- Collection literals
- Basic collection processing functions
- Collection predicates
- Making collection flat and grouping it
- Accumulating collections
- Converting between collection types
- Functions used to process texts and to accumulate collections to texts
Generics
- Covariance, contravariance, and invariance
- Common issues with bounded wildcards in Java
- Declaration-site variance, use-site variance, and type projection
- Declaring single and multiple constraints on types
Interoperability Between Kotlin and Java
- Guidelines for mixed language codebases
- Calling Java libraries from Kotlin
- Preparing Kotlin to be used from Java
- Annotations to work with Java annotation processing libraries
kotlin contracts
- Contracts feature in Kotlin to alleviate compiler errors
Coroutines
- Understanding suspend functions
- Structured concurrency
- Scope creation
- Essential Kotlin Coroutines use-cases
Labs (Android)
- Variety of Kotlin structures
- How to use functions at different levels
- How classes changed in Kotlin and how it influences Android development
- What are object expression and object declaration
- Functional programming features in Kotlin
- What exactly are Data classes
- How to use Sealed classes
- You will understand deeply Kotlin type system
- How to define and use Extension functions
- How to do expressive and efficient collection processing in Kotlin
- What are and how to use Scope functions (let, apply, run, also, with, takeIf, takeUnless)
- What are generic variance modifiers, how to use them and what are the limitations
- Why inline classes are useful and important
- How to create and use Kotlin property and interface delegates
- How to use and create Kotlin DSL
- How to write Kotlin code in an idiomatic way
- What are Kotlin code conventions and guideline
Labs (Java/Backend)
- Basic Kotlin structures
- Functions on different levels and functional style
- Kotlin OO programming in Android
- Data classes
- Sealed classes
- Object expression, object declaration and companion object
- Kotlin type system
- Extension functions
- Functional programming in Kotlin
- Collections and string processing
- Scope functions (let, apply, run, also, with, takeIf, takeUnless)
- Generic classes and functions, making own collection processing function
- Kotlin generic type parameter declarations and modifiers
- Kotlin property and interface delegates
- Reflection in Kotlin, and how to use Java reflection in Kotlin
- DSL usage and creation
- Interoperability between Kotlin and Java
- Basics of Kotlin coroutines
- Rules of idiomatic Kotlin
- Kotlin style guides
Who should attend
Feedback
4.8 out of 5 average
"I really enjoyed the practice work on the Android coding classes and Android app. I also thought that the basic Kotlin was taught thoroughly and with simplicity by the excellent trainer."
DCF, Senior Developer, Kotlin, February 2021
“JBI did a great job of customizing their syllabus to suit our business needs and also bringing our team up to speed on the current best practices. Our teams varied widely in terms of experience and the Instructor handled this particularly well - very impressive”
Brian F, Team Lead, RBS, Data Analysis Course, 20 April 2022