Leanpub Header

Skip to main content

Practical Kotlin Deep Dive Course

Unlocking the 'How' and 'Why' behind Kotlin fundamentals and internal mechanisms.

Takes you from "how to use Kotlin" into "how Kotlin really works," revealing internal implementations, demystifying bytecode and compiler behavior, and uncovering the internals that shape the language. With hands-on Code Playgrounds for immediate practice and 158 interactive assessments to test and reinforce your understanding, this course doesn't just show you why everything is the way it is, it challenges you to prove you've mastered it.

 ISBN: 979-8243872744 

최저가

$129.00

$149.00

지불할 금액

$149.00

저자들의 수입

$119.20
$

...또는 크레딧으로 구매하세요!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
EPUB
WEB
147,503단어 수
소개

소개

About the Course

Practical Kotlin Deep Dive Course unpacks the "how" and "why" behind Kotlin from core language fundamentals and internal mechanisms to the design of its APIs. It spans Kotlin basics, the standard library, coroutines, kotlinx libraries, compiler internals, and Kotlin Multiplatform.

This course goes beyond surface-level APIs by diving into Kotlin's internals: it walks through real Kotlin function implementations, demystifies generated bytecode, and explains how the Kotlin compiler interprets the language. It also draws directly from KEEP proposals, JetBrains YouTrack discussions, and compiler source code to connect concepts to their origins and design rationale. The result is an approach that helps you reason about Kotlin instead of simply memorizing APIs.

This progression ensures that you understand not only how to use Kotlin effectively, but also why the language was designed the way it is, giving you insights that translate directly into better code.

For continuous growth, the course includes curated references and additional resources so you can keep exploring beyond its modules. Complex or less common terms are explained with accessible context, making advanced material approachable for newcomers while offering fresh insights to seasoned developers.

The advanced sections go beneath the surface, covering internal structures of Kotlin functions, algorithms, how the Kotlin compiler behaves, and implementation details that matter in real-world projects. Senior engineers will find thought-provoking details to sharpen their expertise, while mid-level developers gain insights for leveling up their Kotlin knowledge and building a stronger analytical mindset.

Unlike passive reading, this course challenges you to actively engage with the material through 158 interactive assessments and hands-on Code Playgrounds. Each lesson features a Code Playground with ready-to-run Kotlin examples, step-by-step explanations, and open-ended challenges that let you practice concepts immediately after learning them. The assessments include coding exercises that test your understanding, quizzes that reinforce core concepts, and advanced challenges that analyze real code scenarios. Each chapter concludes with a comprehensive recap of key terms and concepts, followed by assessments designed to solidify your knowledge before moving forward.

Whether you're optimizing performance-critical code, handling complex coroutine tasks, exploring multiplatform development, or writing your own compiler plugins, this course challenges you to go beyond tutorials. Learn to reason about language design, understand internal mechanisms, and approach Kotlin development with clarity, curiosity, and confidence.

Upon successfully completing this course, you will receive a Kotlin Deep Dive Certificate, a digital certificate that validates your comprehensive understanding of Kotlin. This certificate includes:

  • Official Recognition: A professionally designed digital certificate image.
  • Personal Signature: Signed by Jaewoong Eum (skydoves), Google Developer Expert for Android, Kotlin, and Firebase.
  • Completion Verification: Demonstrates that you have passed all quizzes and exercises throughout the course.

This course has been built top of the same content of the Practical Kotlin Deep Dive book, with the same ISBN number (979-8243872744)

Share this course

강사진

강사진 소개

자료

코스 자료

  • Introduction

  • Preface

  • Who This Course Is For

  • What This Course Covers

  • How to Use This Course

  • Course Structure

  • Code Playground

  • Quizzes and Exercises

  • Earning Your Certificate

  • Staying Current

  • [Chapter 1] Kotlin Language

  • Chapter Overview

  • The Type System

  • Null Safety in Kotlin

  • The Core Principle: A Tale of Two Types

  • 1. Non-Nullable Types

  • 2. Nullable Types

  • Safely Working with Nullable Types

  • 1. The Safe Call Operator (?.)

  • 2. The Elvis Operator (?:)

  • 3. The Not-Null Assertion Operator (!!)

  • 4. Smart Casts and Safe Casts

  • Interoperability with Java and Platform Types

  • Summary

  • The Any, Unit, and Nothing Types

  • Any: The Root of the Type Hierarchy

  • Unit: Representing the Absence of a Meaningful Value

  • Nothing: The Type That Has No Values

  • 1. For Functions That Never Return

  • 2. As the Bottom of the Type Hierarchy

  • Summary

  • Structural and Referential Equality

  • Summary

  • 💡 Pro Tips for Mastery: How does structural equality (==) work internally?

  • The First Line of Defense: The Safe Call Operator (?.)

  • The Null-Handling Bridge: The Elvis Operator (?:)

  • The Final Verdict: The Referential Null Check (b === null)

  • Why This Design is Great

  • Bonus: The null + null Operation

  • Why This is Important

  • Summary

  • Code Playground

  • Properties and Visibility

  • Variables: var vs val

  • Summary

  • 💡 Pro Tips for Mastery: Why is the val variable and property read-only and not immutable?

  • Summary

  • Visibility Modifiers

  • Public

  • Private

  • Protected

  • Internal

  • Summary

  • 💡 Pro Tips for Mastery: How internal visibility modifier is compiled to Java Bytecode?

  • The init Block

  • Key Features of the init Block

  • Example of the init Block

  • Benefits of Using the init Block

  • Important Considerations

  • Summary

  • 💡 Pro Tips for Mastery: What are the downsides of init block?

  • 1. Unintended Side Effects

  • 2. Limited Flexibility

  • 3. Tightly Coupled Initialization Logic

  • 4. Performance Impact

  • 5. Challenging Debugging

  • Best Practices to Mitigate Downsides

  • Summary

  • 💡 Pro Tips for Mastery: How init block is compiled to Java Bytecode?

  • Backing Fields and Backing Properties

  • Backing Fields

  • Backing Properties

  • Key Differences

  • Summary

  • Code Playground

  • Data and Sealed Classes

  • Data Classes

  • Key Characteristics

  • Key Features of Data Classes

  • Differences Between Data Class and Regular Class

  • Summary

  • 💡 Pro Tips for Mastery: Data class inheritance

  • 💡 Pro Tips for Mastery: The visibility of the copy function of data classes

  • 💡 Pro Tips for Mastery: Unveiling a data class in Java Bytecode

  • Conclusion

  • Sealed Classes

  • Key Characteristics of Sealed Classes

  • When to Use Sealed Classes

  • 💡 Pro Tips for Mastery: Sealed class inheritance

  • 💡 Pro Tips for Mastery: What are the differences between sealed classes and sealed interfaces?

  • Inheritance

  • Flexibility and Use Cases

  • Sealed Class Example

  • Sealed Interface Example

  • Sealed interfaces and sealed classes freedom

  • Summary

  • Code Playground

  • Enum and Value Classes

  • Enum Classes

  • Adding Properties and Methods

  • Using Enum Constants

  • Commonly Used Properties and Methods

  • Use Cases

  • Summary

  • 💡 Pro Tips for Mastery: Generic values() and valueOf() for enums

  • Advantages

  • Backward Compatibility

  • Impact on Reflection and Libraries

  • Summary

  • 💡 Pro Tips for Mastery: Decommission Enum.values() and replace it with Enum.entries

  • 💡 Pro Tips for Mastery: What are the differences between a sealed class and an enum class?

  • Example Code

  • Key Features

  • Use Cases

  • Summary

  • Value Classes

  • Key Features

  • Syntax Example

  • Benefits of Value Classes

  • Constraints of Value Classes

  • The Real-World Use Case

  • Summary

  • 💡 Pro Tips for Mastery: What are the differences between value classes and inline classes?

  • Inline Classes

  • Value Classes

  • Inline classes are user-defined value classes

  • @JvmInline annotation for value classes

  • Summary

  • 💡 Pro Tips for Mastery: How value class is compiled to Java Bytecode

  • 💡 Pro Tips for Mastery: @JvmExposeBoxed - Bringing Kotlin’s value classes for Java

  • @JvmExposeBoxed

  • Code Playground

  • Objects and Companions

  • Inner and Nested Classes

  • Declaring an Inner Class

  • Accessing the Outer Class Instance

  • Differences Between Nested and Inner Classes

  • Use Cases of Inner Classes

  • Drawbacks of Inner Classes

  • Summary

  • 💡 Pro Tips for Mastery: Decompiling differences for inner class vs. nested class in Java Bytecode

  • Object Declarations

  • Key Characteristics

  • Example of an Object

  • Use Cases

  • Differences Between Object and a Regular Class

  • Summary

  • 💡 Pro Tips for Mastery: Object declarations vs. expressions

  • Object Declarations: The Singleton Pattern, Simplified

  • Object Expressions: Anonymous, One-Time Instances

  • What are the key differences?

  • Summary

  • 💡 Pro Tips for Mastery: What is a data object?

  • Key Features

  • Example of a Data Object

  • Use Cases

  • Data Class vs. Object vs. Data Object

  • KEEP’s Data objects Proposal

  • Summary

  • 💡 Pro Tips for Mastery: How Kotlin’s object is compiled to Java Bytecode

  • Companion Objects

  • Key Characteristics of Companion Objects

  • Interoperability with Java and @JvmStatic

  • When to Use Companion Objects

  • Key Benefits

  • Summary

  • Code Playground

  • Delegation Patterns

  • Delegated Properties

  • How Delegated Properties Work

  • Common Use Cases for Delegated Properties

  • Local delegated properties

  • Summary

  • 💡 Pro Tips for Mastery: Internal mechanisms of Lazy

  • The Internal State Management: UNINITIALIZED_VALUE

  • 💡 Pro Tips for Mastery: How lazy() delegate property is compiled to Java Bytecode?

  • Lazy Initialization vs lateinit

  • Key Differences

  • Local and top-level lateinit vars

  • Summary

  • 💡 Pro Tips for Mastery: How can you check if a lateinit property has been initialized?

  • Lateinit property isInitialized intrinsic

  • 💡 Pro Tips for Mastery: How lateinit is compiled to Java Bytecode

  • Code Playground

  • Functions and Lambdas

  • Higher-Order Functions

  • Syntax

  • Example: Passing a Function as a Parameter

  • Example: Returning a Function

  • Real-World Use Cases

  • Advantages of Higher-Order Functions

  • Summary

  • 💡 Pro Tips for Mastery: How are higher-order functions compiled into Java bytecode?

  • Transformation into Function Interfaces

  • Lambda Conversion

  • Optimizations Using InvokeDynamic

  • Inline Functions and Bytecode Optimization

  • Summary

  • Lambda Expressions

  • Shorthand Syntax

  • Usage with Higher-Order Functions

  • Capturing Variables from the Scope

  • Summary

  • Code Playground

  • Inline and Reified

  • The inline Keyword

  • How inline Works

  • Benefits of Using inline

  • Enabling Advanced Language Features: Non-Local Returns

  • Reified Generics with inline

  • When Not to Use inline

  • Summary

  • 💡 Pro Tips for Mastery: What is an inline property? What advantages can you take from it?

  • Advantages of Inline Properties

  • Limitations

  • Inline for property accessors

  • Summary

  • 💡 Pro Tips for Mastery: How do functions like repeat(), map(), and filter() accept suspending functions in their lambdas despite not having coroutine-aware signatures?

  • Why Inline Functions Enable This Behavior

  • Summary

  • The reified Keyword

  • Key Use Cases

  • Benefits of Using reified

  • Limitations of reified

  • Example: Using reified for Filtering a List by Type

  • Summary

  • 💡 Pro Tips for Mastery: How inline and reified functions are compiled to Java Bytecode

  • Functional (SAM) Interfaces

  • SAM Conversion

  • Key Features of Functional Interfaces

  • Summary

  • 💡 Pro Tips for Mastery: A philosophy of SAM conversion

  • The Philosophical Bridge: A Function is an Object (and Vice Versa)

  • Kotlin’s Implementation: A Commitment to Interoperability

  • The Evolution in Java and the Continuing Relevance in Kotlin

  • Summary

  • Code Playground

  • Extensions and DSL

  • Extension Functions

  • Pros of Extensions

  • Cons of Extensions

  • Summary

  • 💡 Pro Tips for Mastery: How are Kotlin extension functions compiled into Java bytecode?

  • Advantages of This Compilation Approach

  • Limitations

  • Summary

  • 💡 Pro Tips for Mastery: JvmSynthetic annotation

  • 1. Kotlin Extension Functions: A Syntactic Sugar over Static Methods

  • 2. The @JvmSynthetic Annotation: Hiding from Java

  • 3. Case Study: internal Functions and @JvmSynthetic

  • Summary

  • Domain-Specific Languages (DSL)

  • How Kotlin DSL Works

  • Another Example of HTML Builder

  • Advantages of This Approach

  • Summary

  • Code Playground

  • Chapter 1 Recap

  • Chapter Summary

  • Key Terms

  • Important Concepts

  • What to Remember

  • [Quiz] Kotlin Language

  • Exercise: Kotlin Language Fundamentals

  • Quiz: Advanced Kotlin Concepts

    3회 시도 가능

  • [Advanced Quiz] Kotlin Language

  • Advanced Quiz: Kotlin Language Mastery

    3회 시도 가능

  • [Chapter 2] Kotlin Standard Library

  • Chapter Overview

  • Collections and Transformations

  • Collection Types

  • Read-Only Collection Types

  • Mutable Collection Types

  • Understanding Mutability of Read-Only and Mutable Collections

  • Summary

  • 💡 Pro Tips for Mastery: What are the differences between listOf() and emptyList()?

  • listOf()

  • emptyList()

  • Summary

  • Transformation Operators

  • map and mapIndexed

  • flatMap and flatten

  • groupBy and associateBy

  • zip and unzip

  • filter, filterNot, and filterIndexed

  • The Role of inline

  • Summary

  • Code Playground

  • Iterators and Sequences

  • Iterators

  • Key Features of Iterator

  • Examples of Using Iterator

  • MutableIterator

  • Key Features of MutableIterator

  • Examples of Using MutableIterator

  • Summary

  • Sequences

  • Creating a Sequence

  • Transforming Sequences

  • The Terminal Operation

  • Summary

  • Code Playground

  • Collection Retrieval

  • Retrieving Parts of Collections

  • subList

  • slice

  • take and takeLast

  • drop and dropLast

  • windowed

  • chunked

  • Summary

  • Code Playground

  • Ordering and Sorting

  • Defining Object Ordering

  • Sorting Functions

  • Reversing the Order

  • Randomizing the Order

  • Summary

  • Code Playground

  • Scope Functions

  • Understanding Scope Functions

  • let

  • run

  • with

  • apply

  • also

  • Choosing the Right Scope Function

  • Summary

  • Code Playground

  • Chapter 2 Recap

  • Chapter Summary

  • Key Terms

  • Transformation Operations

  • Collections vs Sequences

  • Scope Functions

  • Important Concepts

  • What to Remember

  • [Quiz] Standard Library

  • Exercise: Kotlin Standard Library

  • Quiz: Collection Operations and Algorithms

    3회 시도 가능

  • [Advanced Quiz] Standard Library

  • Advanced Quiz: Standard Library Mastery

    3회 시도 가능

  • [Chapter 3] Coroutines

  • Chapter Overview

  • Coroutines Basics

  • Coroutines

  • How Coroutines Work

  • Launching Coroutines

  • Suspending Functions

  • Summary

  • 💡 Pro Tips for Mastery: Coroutines Terminology

  • Summary

  • Continuation

  • How Continuations Work

  • How Kotlin Compiler Transforms Suspend Functions

  • Summary

  • Coroutines vs Threads

  • 1. Management and Creation

  • Threads (OS Kernel Management)

  • Coroutines (User-Space Management)

  • 2. Scheduling and Context Switching

  • Threads (Preemptive Multitasking)

  • Coroutines (Cooperative Multitasking)

  • 3. State, Memory, and Blocking

  • Threads (Stackful and Blocking)

  • Coroutines (Stackless and Suspending)

  • Comparison Example

  • Relationship Between Coroutines and Threads

  • Summary

  • 💡 Pro Tips for Mastery: What are the differences between multi-threading and multi-processing?

  • Memory Management

  • Execution Model

  • Resource Utilization

  • Fault Tolerance

  • Scalability

  • Summary

  • 💡 Pro Tips for Mastery: Coroutine Execution and Mutable State Management

  • Why Mutable State Sharing Is Risky

  • Safe Data Sharing in Single-Threaded Dispatchers

  • Handling Multi-threaded Environments

  • How Threads Interact with Coroutines

  • Summary

  • Code Playground

  • Coroutine Builders

  • Coroutine Builders

  • 1. launch

  • 2. async

  • 3. runBlocking

  • 4. produce (for Channels)

  • 5. actor (for Actors Model)

  • Summary

  • 💡 Pro Tips for Mastery: What are the differences between launch and async?

  • The Core Difference: Return Value and Intent

  • Error Handling and Structured Concurrency

  • Summary

  • Code Playground

  • Advanced Coroutine Builder Concepts

  • 💡 Pro Tips for Mastery: Why should you use runBlocking with caution?

  • When To Use runBlocking?

  • Summary

  • 💡 Pro Tips for Mastery: Internal mechanisms of the AbstractCoroutine

  • How Completion and Resumption Works: resumeWith

  • Structured Concurrency: The Parent-Child Link

  • Summary

  • Code Playground

  • Coroutine Context and Job

  • Coroutine Context

  • Elements of Coroutine Context

  • Creating a Custom Coroutine Context

  • Accessing Coroutine Context

  • Summary

  • 💡 Pro Tips for Mastery: CoroutineContext interface

  • Core Operations in Coroutine Context

  • Elements in Coroutine Context

  • Standard Library Context Elements

  • Accessing Coroutine Context

  • Summary

  • Job

  • Internal Mechanisms of Job

  • Structured Concurrency: The Parent-Child Link and Completion/Waiting

  • Summary

  • 💡 Pro Tips for Mastery: What’s a SupervisorJob?

  • When to Use a SupervisorJob

  • Real-world Use Case

  • Internals of SupervisorJob

  • Summary

  • Code Playground

  • Coroutine Scope

  • Coroutine Scope

  • Common Coroutine Scopes

  • (1) GlobalScope

  • (2) MainScope

  • (3) viewModelScope (Lifecycle-Aware Scopes)

  • (4) lifecycleScope (Lifecycle-Aware Scopes)

  • Example: Creating a Custom Coroutine Scope

  • Summary

  • 💡 Pro Tips for Mastery: Why should you use GlobalScope carefully?

  • The Dangers of Unstructured Concurrency

  • Legitimate (But Rare) Use Cases

  • The Correct Alternative: Structured Scopes

  • Summary

  • 💡 Pro Tips for Mastery: What is the coroutineScope() function?

  • Error and Cancellation Handling

  • When to Use coroutineScope()

  • coroutineScope() internals

  • Summary

  • 💡 Pro Tips for Mastery: What is the supervisorScope() function?

  • Why Use supervisorScope

  • Summary

  • Code Playground

  • Dispatchers and Channels

  • What kind of coroutine dispatchers exist, and what’s their purpose?

  • Choosing the Right Dispatcher

  • CoroutineDispatcher

  • Summary

  • 💡 Pro Tips for Mastery: Differences between CPU-intensive tasks and I/O tasks

  • CPU-Intensive Tasks

  • I/O-Intensive Tasks

  • Thread Behavior

  • CPU-Intensive Tasks vs. I/O-Intensive Tasks

  • Summary

  • 💡 Pro Tips for Mastery: Internals of Dispatchers

  • The Shared Engine: CoroutineScheduler and SchedulerCoroutineDispatcher

  • Dispatchers.Default: The CPU-Bound Workhorse

  • Dispatchers.IO: I/O-Bound Specialist

  • Dispatchers.Main: The Platform-Specific UI Thread

  • Dispatchers.Unconfined: The Unpredictable Executor

  • Summary

  • What are channels and how do they work?

  • 1. Rendezvous Channel (capacity = Channel.RENDEZVOUS or 0)

  • 2. Buffered Channel (capacity > 0)

  • 3. Conflated Channel (capacity = Channel.CONFLATED)

  • 4. Unlimited Channel (capacity = Channel.UNLIMITED)

  • Summary

  • 💡 Pro Tips for Mastery: Internals Mechanisms of Channel

  • Code Playground

  • Coroutine Control and Exception Handling

  • What are the join() and yield() functions?

  • 1. join() Function

  • 2. yield() Function

  • Key Differences

  • Summary

  • How do you handle exceptions in coroutines?

  • 1. try-catch Block

  • 2. Delegate Exception Propagation with CoroutineExceptionHandler

  • 3. SupervisorJob

  • Summary

  • 💡 Pro Tips for Mastery: The special nature of CancellationException

  • Re-throwing CancellationException for Graceful Exit

  • The runCatching Problem

  • When NOT to Rethrow CancellationException

  • Flow’s Approach: A Model to Follow

  • Summary

  • 💡 Pro Tips for Mastery: Handling exception propagation when using async

  • How to Handle

  • Summary

  • Code Playground

  • Flow Basics

  • What are the differences between cold flow and hot flow?

  • Cold Flow

  • Hot Flow

  • Key Differences Between Cold Flow and Hot Flow

  • Summary

  • 💡 Pro Tips for Mastery: Internal mechanisms of Flow and AbstractFlow

  • The flow { … } Builder: The Standard Implementation

  • The AbstractFlow Base Class: Enforcing Context Preservation

  • How Intermediate Operators Work

  • Summary

  • Explain the differences between StateFlow and SharedFlow

  • StateFlow

  • SharedFlow

  • Key Differences Between StateFlow and SharedFlow

  • Summary

  • 💡 Pro Tips for Mastery: Internal Mechanisms of StateFlow

  • The State-Holding Mechanism

  • The Update Mechanism: updateState() and Synchronization

  • The Collection Mechanism: collect() and StateFlowSlot()

  • Summary

  • 💡 Pro Tips for Mastery: Internal Mechanisms of SharedFlow

  • The Core Data Structure: A Circular Buffer and Indices

  • The emit Mechanism: A Synchronized State Update

  • The collect Mechanism: The Subscriber’s State Machine

  • Summary

  • Code Playground

  • Flow Operators

  • What does the Flow.flowOn() operator do?

  • Summary

  • 💡 Pro Tips for Mastery: Internal Mechanisms of flowOn

  • The ChannelFlowOperatorImpl: The Coroutine Boundary

  • Summary

  • How Flow.buffer() operator works?

  • When to Use buffer()

  • Summary

  • 💡 Pro Tips for Mastery: Internal Mechanisms of Flow.buffer()

  • The ChannelFlowOperatorImpl Mechanism: A Producer-Consumer Model

  • Summary

  • How Kotlin’s internal mechanisms optimize Flow with FusibleFlow and ChannelFlow

  • The Solution: FusibleFlow and Operator Fusion

  • ChannelFlow: The Concrete Fusible Implementation

  • The ChannelFlowOperator and the Fast Path

  • Summary

  • Code Playground

  • Flow Transformations

  • What are the differences between launchIn(Scope) and Scope.launch()?

  • scope.launch { flow.collect() }

  • flow.launchIn(scope)

  • Summary

  • What are Flow transformation operators: flatMapLatest, flatMapMerge, flatMapConcat?

  • flatMapConcat: The Sequential Model

  • flatMapMerge: The Concurrent Model

  • flatMapLatest: The Cancellation Model

  • Key Differences

  • Summary

  • What are callbackFlow and channelFlow, and their internal mechanisms?

  • callbackFlow

  • channelFlow

  • Key Differences

  • Summary

  • Code Playground

  • Chapter 3 Recap

  • Chapter Summary

  • Key Terms

  • Coroutine Builders

  • Dispatchers

  • Context Combination

  • Flow Operators

  • StateFlow vs SharedFlow

  • Important Concepts

  • What to Remember

  • [Quiz] Coroutines

  • Exercise: Coroutines Fundamentals

  • Quiz: Advanced Coroutines and Flow

    3회 시도 가능

  • [Advanced Quiz] Coroutines

  • Advanced Quiz: Coroutines Mastery

    3회 시도 가능

  • [Chapter 4] KotlinX Libraries

  • Chapter Overview

  • KotlinX Essentials

  • Kotlinx Serialization

  • How Serialization Works

  • Customizing Serialization

  • JSON Configuration

  • Polymorphic Serialization

  • Multiplatform Support

  • Summary

  • Kotlinx Datetime

  • The Need for kotlinx-datetime

  • Working with Time Zones

  • Date Arithmetic

  • Duration and Period

  • Parsing and Formatting

  • Comparison with Java Time

  • Summary

  • Kotlinx Collections Immutable

  • The Problem with Read-Only Collections

  • Truly Immutable Collections

  • Persistent Collections

  • Builders for Efficient Bulk Operations

  • When to Use Immutable Collections

  • Performance Considerations

  • Summary

  • Other Notable KotlinX Libraries

  • kotlinx-atomicfu

  • kotlinx-io

  • kotlinx-benchmark

  • Dokka

  • kotlinx-rpc

  • Kover

  • Summary

  • Code Playground

  • Chapter 4 Recap

  • Chapter Summary

  • Key Terms

  • kotlinx-serialization

  • kotlinx-datetime

  • kotlinx-collections-immutable

  • Important Concepts

  • What to Remember

  • [Quiz] KotlinX Libraries

  • Exercise: Immutable Collections

  • Quiz: KotlinX Ecosystem

    3회 시도 가능

  • [Advanced Quiz] KotlinX Libraries

  • Advanced Quiz: KotlinX Libraries Mastery

    3회 시도 가능

  • [Chapter 5] Kotlin Compiler and Plugins

  • Chapter Overview

  • Annotation Processing

  • Annotation Processors, KAPT, and KSP

  • Annotation Processor (Java APT)

  • KAPT (Kotlin Annotation Processing Tool)

  • KSP (Kotlin Symbol Processing)

  • Performance Comparison

  • Key Differences

  • Migration from KAPT to KSP

  • Summary

  • Kotlin Compiler Architecture

  • Structure of the Kotlin Compiler

  • High-Level Architecture

  • Frontend

  • Backend

  • Backend Processing Stages

  • Key Differences: Frontend vs. Backend

  • The Role of IR

  • Summary

  • The K2 Compiler

  • Why K2?

  • Key Improvements

  • FIR Compilation Phases

  • K2 for Plugin Authors

  • Migration to K2

  • Compatibility Considerations

  • Summary

  • Frontend Intermediate Representation (FIR)

  • FIR in the K2 Compiler

  • Why FIR?

  • FIR Element Hierarchy

  • FIR Resolution Phases

  • Working with FIR: Symbols and Providers

  • Building FIR Elements

  • FIR Scopes

  • ConeKotlinType: The Type System

  • Summary

  • Intermediate Representation and Backends

  • IR and the Kotlin Backend

  • The Role of IR

  • IR Tree Structure

  • Key IR Element Types

  • IR Lowering: High-Level to Low-Level

  • Platform-Specific Backends

  • IR Plugin Context

  • IR Transformation Patterns

  • IR Serialization

  • Summary

  • Writing Kotlin Compiler Plugins

  • How to Write a Kotlin Compiler Plugin

  • Plugin Architecture Overview

  • Step 1: Define Your Annotation

  • Step 2: Create the Command Line Processor

  • Step 3: Create the Component Registrar

  • Step 4: Register Services (SPI)

  • Step 5: Implement K2 FIR Extension

  • Step 6: Implement IR Generation Extension

  • Step 7: Create Gradle Plugin

  • Step 8: Usage in Projects

  • Summary

  • Real-World Compiler Plugin Examples

  • Compiler Plugin Use Cases

  • Kotlinx Serialization

  • Jetpack Compose

  • Parcelize

  • All-Open and No-Arg Plugins

  • SAM-with-Receiver

  • When to Consider Writing a Compiler Plugin

  • Summary

  • Chapter 5 Recap

  • Chapter Summary

  • Key Terms

  • Compiler Architecture

  • KAPT vs KSP

  • FIR Resolution Phases

  • IR Lowering Transformations

  • Compiler Plugin Structure

  • Real-World Plugin Examples

  • Important Concepts

  • What to Remember

  • [Quiz] Compiler Plugins

  • Quiz: Compiler Architecture and Plugins

    3회 시도 가능

  • [Advanced Quiz] Compiler Plugins

  • Advanced Quiz: Compiler Plugins Mastery

    3회 시도 가능

  • [Chapter 6] Kotlin Multiplatform

  • Chapter Overview

  • KMP Fundamentals

  • Kotlin Multiplatform Overview

  • Key Features of Kotlin Multiplatform

  • Key Advantages

  • Kotlin Multiplatform Architecture

  • Summary

  • Expect and Actual Declarations

  • Expect Declarations

  • Actual Implementations

  • What Can Be Expected/Actual

  • Default Implementations with Expected Classes

  • Compiler Guarantees

  • When to Use Expect/Actual vs Other Approaches

  • Summary

  • Concurrency and Asynchronous Programming

  • Kotlin Coroutines: The Primary Solution

  • Platform-Specific Dispatchers

  • Structured Concurrency in Multiplatform

  • Alternative Asynchronous Solutions

  • Summary

  • HTTP Network Communication

  • Ktor Client

  • Platform-Specific Engines

  • Ktorfit

  • Summary

  • Compose Multiplatform

  • How Compose Multiplatform Works

  • Writing Shared UI

  • Supported Platforms and Stability (2025)

  • Resources and Platform Integration

  • Platform-Specific UI When Needed

  • Navigation and Architecture

  • Trade-offs to Consider

  • Summary

  • Source Set Structure

  • Source Sets in Kotlin Multiplatform

  • Default Source Set Hierarchy

  • Project Structure

  • Gradle Configuration

  • Intermediate Source Sets

  • Dependencies Per Source Set

  • Summary

  • Kotlin/Native

  • Memory Management and Platform Interoperability

  • Kotlin/Native Memory Management

  • Interoperability with Objective-C and Swift

  • Controlling Swift/Objective-C Exposure

  • Using iOS Frameworks from Kotlin

  • Coroutines and Swift Async/Await

  • Performance Considerations

  • Summary

  • Testing Strategies

  • Testing in Kotlin Multiplatform

  • Common Test Structure

  • Test Source Set Configuration

  • Testing Coroutines

  • Platform-Specific Tests

  • Testing with Fakes and Mocks

  • Running Tests

  • Integration Testing

  • Summary

  • Dependency Injection Strategies

  • Dependency Injection in Kotlin Multiplatform

  • Why DI Matters in Multiplatform

  • Metro: Compile-Time DI with Kotlin Compiler Plugin

  • Koin: KSP-Based Compile-Time DI

  • Kodein-DI: Flexible Runtime Container

  • Manual Dependency Injection

  • Choosing the Right Approach

  • Constructor Injection Pattern

  • Summary

  • Chapter 6 Recap

  • Chapter Summary

  • Key Terms

  • Source Set Hierarchy

  • Kotlin to Swift/Objective-C Mapping

  • Interop Annotations

  • Testing in KMP

  • Platform-Specific Dependencies

  • Important Concepts

  • What to Remember

  • [Quiz] Kotlin Multiplatform

  • Exercise: KMP Fundamentals

  • Quiz: Advanced Multiplatform Development

    3회 시도 가능

  • [Advanced Quiz] Kotlin Multiplatform

  • Advanced Quiz: Kotlin Multiplatform Mastery

    3회 시도 가능

  • Final Words

  • Glossary

  • Kotlin Language

  • Standard Library

  • Coroutines

  • KotlinX Libraries

  • Compiler and Plugins

  • Kotlin Multiplatform

Leanpub의 60일 간 100%만족 보장

구매일로부터 60일안에 어떤 결제든 클릭 두번으로 전액 환불을 받을 수 있습니다.

전체 약관 확인하기

$10 구매 시 $8 수익, $20 구매 시 $16 수익

$7.99 이상 구매 시 80% 로열티를 지급하며, $0.99에서 $7.98 사이 구매 시 50센트의 고정 수수료를 제외한 80% 로열티를 지급합니다. $10 판매 시 $8를, $20 판매 시 $16를 얻게 됩니다. 따라서 만약 귀하의 책이 $20에 환불되지 않은 상태로 5000부가 판매된다면, $80,000의 수익을 얻게 됩니다.

(네, 일부 저자들은 이미 Leanpub에서 그 이상을 벌어들였습니다.)

실제로 저자들은 Leanpub에서 집필, 출판 및 판매를 통해 1,400만 달러 이상을 벌어들였습니다.

Leanpub에서의 집필에 대해 자세히 알아보기

무료 업데이트. DRM(디지털 저작권 관리)는 없습니다.

당신이 Leanpub의 책을 산다면, 작가가 책을 업데이트 하는 한 책에 대한 무료 업데이트를 받을 수 있습니다! 많은 작가들은 Leanpub을 작성 중인 책을 출판하기 위해 이용합니다. 모든 독자들은 책을 언제 구매하건, 얼마나 지불하였건(무료 구매도 포합됩니다) 관계없이 무료 업데이트를 받습니다.

대부분의 Leanpub에 있는 책들은 PDF(컴퓨터용), EPUB(핸드폰과 태블릿용) 그리고 MOBI(킨들용)으로 제공됩니다. 책이 지원하는 포맷은 이 페이지 우측 상단에서 확인 할 수 있습니다.

Leanpub의 책은 DRM 사본 보호 장치를 드디어 없앴습니다, 그래서 지원가능한 어떤 기기로든 쉽게 구매하신 책들을 읽을 수 있습니다.

Leanpub의 ebook 포맷과 어디서 읽을 수 있는지 더 보기

Leanpub에서 글 쓰고 출판하기

당신은 Leanpub을 이용해 쉽게 글을 쓰고 출판할 수 있고 책과 코스가 작성중이든 완성 되었든 판매할 수 있습니다! Leanpub은 진지한 작가들을 위해 쉽고 우아한 글쓰기와 출판 과정을 작성중인 전자책들에 집중하여 판매 하는 온라인 쇼핑몰과 결합한 강력한 플랫폼 입니다. Leanpub은 작가들에게 마법같은 타자기와도 같습니다. 단지 단순한 텍스트를 쓰고, 출판하기 위해 그냥 버튼만 누르세요. 그만큼이나 쉽다구요.

Leanpub에서 글 쓰는 법 더 보기