Kotlin – Tips, Tricks, and Techniques

Kotlin – Tips, Tricks, and Techniques

English | MP4 | AVC 1920×1080 | AAC 48KHz 2ch | 2h 22m | 383 MB

Build powerful and efficient Android apps with proven techniques and tricks to increase productivity

Do you want to see an increase in your productivity as an Android developer? With this course, you will discover new possibilities with Kotlin and improve your app development process.

In this course, you will work with interesting tools and techniques on examples which you can adopt straightaway. You will speed up your development with less coding and get faster results.

By the end of this course, you will be able to write faster, cleaner code and make your life easy as a Kotlin developer.

A comprehensive course—packed with step-by-step instructions, working examples, and helpful tips and techniques—on working with Kotlin. This course is divided into clear chunks so you can learn at your own pace and focus on your own area of interest.

What You Will Learn

  • Convert functions to a single line to save coding time
  • Apply the new Android Kotlin KTX extensions to make app development more concise, pleasant, and idiomatic.
  • Use the Kotlin Bytecode tool to improve app startup and performance
  • Implement extension functions and properties to add additional Kotlin features
  • Remove the most error-prone null points in Java by coding with Kotlin
  • Use lateinit and lazy properties to enhance app performance
  • Use default and named arguments to make code error-free
  • Create secondary constructors for reduced and simplified code.
  • Use Lambdas with higher-order functions
Table of Contents

Techniques to Reduce Development Time and Code
1 The Course Overview
2 Using an Expression Body to Reduce a Function to a Single Line
3 Making Code More Readable with when Blocks
4 Simplifying Functions with Named Arguments and Default Parameters
5 Using Extension Functions and Properties to Add More Features
6 Multiple Method Calls on an Object for Easier Readability

Tips to Make Code More Robust and Error-Free
7 Recommended Methods to Avoid NullPointerExceptions
8 Using let for Handling Null Expressions
9 Kotlin Methods for Eliminating Nulls from a Collection
10 Recommended Methods for Thread Safe Calls
11 Using Singletons for Thread Safe Code

Tips to Create and Use Classes Easier and Faster
12 Simplifying Class Properties with Constructor Parameters
13 Using Secondary Constructors for Additional Flexibility
14 Implementing Custom Behavior for Fields for Adding Functionality
15 Using Object Expressions for Thread Safe Calls
16 Using Companion Objects to Replace Java Static Fields

Features to Use to Support Functional Programming
17 Using Lambdas to Simplify Defining Functions
18 Using Higher Order Functions for Clean Code Abstraction
19 Using Immutable Collections to Support Safe Multithreading
20 Using Filter and Map to Quickly Manipulate Collections
21 Using Data Classes to Conveniently Package and Protect Data

Optimizations to Improve App Startup and Performance
22 Using the Kotlin Bytecode Tool to Observe Additional Overhead
23 Using Late and Lazy Properties to Delay Initialization
24 Inlining Higher Order Functions to Avoid Additional Java Calls
25 Applying const to Companion Object Properties to Avoid Generating Extra Methods
26 Using Sequences to Avoid Creating Temporary Lists

KTX Extensions for Easier Access to Android APIs
27 Using Core KTX Module for Easier Use of Android APIs
28 Using SQLite KTX Module to Simplify Database Transactions
29 Using Fragment KTX Module to Simplify Fragment Transactions
30 Using Collection KTX Module for Extensive Collection Support
31 Using Work KTX Module for Simplifying Asynchronous Requests