Kotlin for Android & Java Developers: Clean Code on Android

Kotlin for Android & Java Developers: Clean Code on Android
Kotlin for Android & Java Developers: Clean Code on Android
English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 9 Hours | 1.48 GB

Become a professional Kotlin developer and write cleaner code in your Android apps than in Java, avoid boilerplate code

Kotlin is a modern language for the JVM, and the only officially supported language on Android besides Java. It’s developed by JetBrains, the makers of IntelliJ on which Android Studio is based. Since Google’s announcement to officially support Kotlin in 2017, interest in the language has radically increased — and with it the number of tutorials, courses, books, and also job offers for Kotlin. It’s a great time to dive into this modern language and get ahead of other Android developers! With its modern language design that incorporates industry best practices, Kotlin allows you to write highly expressive, understandable and safe code — while being 100% interoperable with Java. You can use any Java classes and methods from Kotlin and the other way around. This course shows you what language features I mean, and how you can apply them in order to write world-class code. Learn to use Kotlin the right way to actually improve your Android app code write null-safe, concise, and readable code in Kotlin using functional and object-oriented concepts workaround unnecessary boilerplate code when using Android APIs (e.g. SQLite) using higher-order extension functions, use Android Studio effectively to speed up your development workflow, get your questions answered along the way should you ever get stuck.

What You Will Learn

  • Write clean code with Kotlin
  • Avoid ceremony and boilerplate code around Android APIs
  • Use functional programming to write concise, expressive code
  • Create Android apps with Kotlin
  • Write readable SQLite transactions using extension functions in Kotlin
  • Use the Kotlin Android Extensions to avoid findViewById()
  • Create multiple activities, layouts and menus
Table of Contents

Introduction
1 What You’ll Learn in this Course
2 Make the Most of this Course!
3 Who’s Using Kotlin

Get Ready
4 Introduction
5 Install the Java JDK 8
6 Install Android Studio
7 Set Up a Project in Android Studio
8 Recap

Kotlin Basics
9 Introduction
10 Get Ready for Serious Kotlin Coding (Set up IntelliJ IDEA)
11 Create a main() Function
12 Challenge Reading the User’s Name from the Console
13 Challenge Using Collections and Loops
14 Named Arguments & Default Parameter Values
15 Exceptions
16 Why No Checked Exceptions
17 Recap
18 Variables and Data Types
19 Null Safety in Kotlin
20 Conditionals if Expressions
21 Conditionals when Expressions
22 Collections
23 for Loops
24 while Loops
25 Functions

Functional Programming
26 Introduction
27 Lazy Sequences
28 Case Study Performance of Lazy Sequences
29 Code Along Infinite Lazy Sequence of All Prime Numbers
30 Use let Operator for Scoping and Nullables
31 Use with for Many Calls on the Same Object
32 Use use for Closeable (like try-with-resources)
33 Inline Functions
34 Recap
35 What is Functional Programming
36 Functional Programming II
37 Lambdas & Higher-Order Functions
38 Use map() and flatMap()
39 Use take() and drop()
40 Use zip()
41 Challenge Functional Programming for Data Analysis
42 Chain Functions Together

Object-Orientation in Kotlin
43 Introduction
44 Code Along Inheritance Example
45 Abstract Classes
46 Interfaces
47 Overriding Rules
48 Smart Casts
49 Visibilities
50 Companion Objects for Static Members
51 Object Declarations as Singletons
52 Packages and Imports
53 Generic Classes
54 Classes
55 Generic Functions
56 Covariance
57 Covariance Java vs Kotlin
58 Covariance vs Contravariance out and in
59 Recap
60 Properties with Getters & Setters
61 Primary and Secondary Constructors
62 Methods
63 Extension Functions
64 Data Classes
65 Enums
66 Inheritance

Kotlin for Android — Fundamentals
67 Introduction
68 Create the App Project
69 Understand the Android Versions
70 Create a CardView Layout and Add UI Elements
71 Use the Kotlin Android Extensions
72 Challenge Set Texts and Image Source Programmatically
73 Challenge Solution

Kotlin for Android — Implement a RecyclerView
74 Introduction
75 What is a RecyclerView
76 Create the Data Class Habit
77 Implement the HabitsAdapter – Part I
78 Implement the HabitsAdapter – Part II
79 Implement the HabitsAdapter – Part III

Kotlin for Android — Let Users Create Habits
80 Introduction
81 Code Along An Extension Function for EditText
82 Add a Menu
83 Add a Second Activity
84 Use Intents to Switch Activities
85 Challenge Build the Activity Layout
86 Challenge Solution
87 Let Users Choose an Image
88 Get the Selected Image Back (onActivityResult)
89 Show Error Messages to the User

Kotlin for Android — Use SQLite the Kotlin Way!
90 Introduction
91 Read All Habits from SQLite
92 Challenge Improve SQLiteDatabase.query(…)
93 Challenge Solution
94 Challenge Improve Cursor.getString(…)
95 Challenge Solution
96 Add Files to the Virtual Device (Excursus)
97 Introducing SQLite
98 Define the Contracts
99 Implement the Database Helper
100 Store a Habit to SQLite
101 Implementing Secure Transactions (that support Rollback)
102 Clean Code Improving Transactions in Kotlin
103 Clean Code Further Improving Transactions and Performance
104 Store the Habit in CreateHabitActivity

Bonus
105 Bonus Lecture Where to Go From Here