<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hands-on Examples on Advanced Beginner</title><link>https://advanced-beginner.github.io/en/docs/kotlin/examples/</link><description>Recent content in Hands-on Examples on Advanced Beginner</description><generator>Hugo</generator><language>en-US</language><managingEditor>d8lzz1gpw@mozmail.com (kimbenji)</managingEditor><webMaster>d8lzz1gpw@mozmail.com (kimbenji)</webMaster><lastBuildDate>Tue, 19 May 2026 18:30:17 +0900</lastBuildDate><atom:link href="https://advanced-beginner.github.io/en/docs/kotlin/examples/index.xml" rel="self" type="application/rss+xml"/><item><title>Environment Setup Deep Dive</title><link>https://advanced-beginner.github.io/en/docs/kotlin/examples/setup/</link><pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kotlin/examples/setup/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Estimated time&lt;/strong&gt;: about 10 minutes&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;Understand the meaning of the core blocks in &lt;code&gt;build.gradle.kts&lt;/code&gt; (plugins, dependencies, kotlin, application)&lt;/li&gt;
&lt;li&gt;Difference between &lt;code&gt;jvmToolchain(17)&lt;/code&gt; and &lt;code&gt;sourceCompatibility&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Tune the collaboration environment with IntelliJ IDEA shortcuts and ktlint integration&lt;/li&gt;
&lt;li&gt;Troubleshooting patterns (class version, dependency refresh, cache invalidation)&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Target audience&lt;/strong&gt;: Developers who have finished the basics of Kotlin environment setup
&lt;strong&gt;Prerequisites&lt;/strong&gt;: &lt;a href="../../quick-start/"&gt;Quick Start&lt;/a&gt; completed (JDK 17 installation, &lt;code&gt;gradle init&lt;/code&gt;, first &lt;code&gt;./gradlew run&lt;/code&gt;)&lt;/p&gt;
&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;Basic installation is in Quick Start&lt;/strong&gt;&lt;br&gt;First-time setup such as JDK 17 installation, creating a Kotlin DSL project with &lt;code&gt;gradle init&lt;/code&gt;, and opening IntelliJ IDEA is covered in &lt;a href="../../quick-start/"&gt;Quick Start&lt;/a&gt;. This page goes one step further — summarizing the core build script options and additional settings useful for collaboration.
&lt;/blockquote&gt;

&lt;hr&gt;
&lt;h4 id="step-1--core-buildgradlekts-settings"&gt;Step 1 — Core build.gradle.kts Settings&lt;a class="anchor" href="#step-1--core-buildgradlekts-settings"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;This is a build script written in Kotlin DSL. Let&amp;rsquo;s understand the key options.&lt;/p&gt;</description></item><item><title>Basic Examples</title><link>https://advanced-beginner.github.io/en/docs/kotlin/examples/basic/</link><pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kotlin/examples/basic/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Estimated time&lt;/strong&gt;: about 15 minutes&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;Define concise data models with &lt;code&gt;data class&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Use collection functions like &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;sortedBy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Add domain-specific behavior to existing types via extension functions&lt;/li&gt;
&lt;li&gt;Make active use of Kotlin expressions like &lt;code&gt;when&lt;/code&gt;, &lt;code&gt;?:&lt;/code&gt;, &lt;code&gt;?.&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Target audience&lt;/strong&gt;: Developers who have completed Kotlin environment setup
&lt;strong&gt;Prerequisites&lt;/strong&gt;: &lt;a href="https://advanced-beginner.github.io/en/docs/kotlin/examples/setup/"&gt;Environment Setup&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Run Kotlin&amp;rsquo;s core features directly in your installed environment. Each example creates a file under &lt;code&gt;src/main/kotlin/&lt;/code&gt; and runs it.&lt;/p&gt;</description></item><item><title>Spring Boot Integration</title><link>https://advanced-beginner.github.io/en/docs/kotlin/examples/spring-boot-integration/</link><pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kotlin/examples/spring-boot-integration/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Estimated time&lt;/strong&gt;: about 20 minutes&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;Select Kotlin + Spring Web + Spring Data JPA on &lt;code&gt;start.spring.io&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kotlin-spring&lt;/code&gt; and &lt;code&gt;kotlin-jpa&lt;/code&gt; plugins are essential in &lt;code&gt;build.gradle.kts&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The JPA entity &lt;code&gt;open&lt;/code&gt; class issue → resolved automatically by the &lt;code&gt;kotlin-jpa&lt;/code&gt; plugin&lt;/li&gt;
&lt;li&gt;You can write &lt;code&gt;@RestController&lt;/code&gt;, &lt;code&gt;@Service&lt;/code&gt;, &lt;code&gt;@Entity&lt;/code&gt; in Kotlin style&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Target audience&lt;/strong&gt;: Developers with Kotlin basics and Spring Boot experience
&lt;strong&gt;Prerequisites&lt;/strong&gt;: &lt;a href="https://advanced-beginner.github.io/en/docs/kotlin/examples/setup/"&gt;Environment Setup&lt;/a&gt;, Spring Boot basics&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Build a simple user-management REST API by integrating Kotlin with Spring Boot 3.2.x.&lt;/p&gt;</description></item><item><title>Kafka Integration</title><link>https://advanced-beginner.github.io/en/docs/kotlin/examples/kafka-integration/</link><pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kotlin/examples/kafka-integration/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Estimated time&lt;/strong&gt;: about 25 minutes&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;Add the &lt;code&gt;spring-kafka&lt;/code&gt; dependency and configure &lt;code&gt;application.yml&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Publish messages with &lt;code&gt;KafkaTemplate&amp;lt;String, String&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Receive messages with &lt;code&gt;@KafkaListener(topics = [&amp;quot;...&amp;quot;], groupId = &amp;quot;...&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Consumer Group naming convention: &lt;code&gt;{app-name}-group&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Target audience&lt;/strong&gt;: Developers familiar with Kotlin + Spring Boot basics
&lt;strong&gt;Prerequisites&lt;/strong&gt;: &lt;a href="https://advanced-beginner.github.io/en/docs/kotlin/examples/spring-boot-integration/"&gt;Spring Boot Integration&lt;/a&gt;, Kafka basics&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Implement an example that publishes and receives messages using Kotlin and Spring Kafka. This example uses the Kafka instance (KRaft mode, port 9092) in the site&amp;rsquo;s &lt;code&gt;docker/&lt;/code&gt; directory.&lt;/p&gt;</description></item><item><title>Practical Coroutines</title><link>https://advanced-beginner.github.io/en/docs/kotlin/examples/coroutines-practical/</link><pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kotlin/examples/coroutines-practical/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Estimated time&lt;/strong&gt;: about 30 minutes&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;async { }&lt;/code&gt; + &lt;code&gt;await()&lt;/code&gt; — call two APIs in parallel, faster than serial&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;suspend fun&lt;/code&gt; on &lt;code&gt;@GetMapping&lt;/code&gt; enables coroutine controllers in Spring MVC&lt;/li&gt;
&lt;li&gt;&lt;code&gt;withTimeout(ms) { }&lt;/code&gt; — set a timeout; on exceed throws &lt;code&gt;TimeoutCancellationException&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Structured concurrency — when the parent coroutine is cancelled, child coroutines are also cancelled automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Target audience&lt;/strong&gt;: Developers with Kotlin basics and Spring Boot experience
&lt;strong&gt;Prerequisites&lt;/strong&gt;: &lt;a href="https://advanced-beginner.github.io/en/docs/kotlin/examples/spring-boot-integration/"&gt;Spring Boot Integration&lt;/a&gt;, basic coroutine concepts&lt;/p&gt;</description></item><item><title>Multiplatform Intro</title><link>https://advanced-beginner.github.io/en/docs/kotlin/examples/multiplatform-intro/</link><pubDate>Wed, 13 May 2026 00:00:00 +0000</pubDate><author>d8lzz1gpw@mozmail.com (kimbenji)</author><guid>https://advanced-beginner.github.io/en/docs/kotlin/examples/multiplatform-intro/</guid><description>&lt;blockquote class='book-hint '&gt;
&lt;p&gt;&lt;strong&gt;Estimated time&lt;/strong&gt;: about 30 minutes&lt;/p&gt;
&lt;/blockquote&gt;&lt;blockquote class="book-hint info"&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;commonMain&lt;/code&gt; — Kotlin code shared across all platforms&lt;/li&gt;
&lt;li&gt;&lt;code&gt;expect&lt;/code&gt; — declared in the common module; &lt;code&gt;actual&lt;/code&gt; — implemented per platform&lt;/li&gt;
&lt;li&gt;&lt;code&gt;jvmMain&lt;/code&gt;, &lt;code&gt;jsMain&lt;/code&gt; — platform-specific code&lt;/li&gt;
&lt;li&gt;Reuse business logic written once on JVM (backend/Android) and JS (frontend)&lt;/li&gt;
&lt;/ul&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Target audience&lt;/strong&gt;: Intermediate or above Kotlin developers
&lt;strong&gt;Prerequisites&lt;/strong&gt;: &lt;a href="https://advanced-beginner.github.io/en/docs/kotlin/examples/setup/"&gt;Environment Setup&lt;/a&gt;, basic Kotlin syntax&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Use Kotlin Multiplatform (KMP) to share business logic across multiple platforms. We&amp;rsquo;ll write a date formatter as a common module and implement it for both JVM and JS in a mini project.&lt;/p&gt;</description></item></channel></rss>