Her İki Ekip için API'yi Belgeleme
Android ve iOS geliştiricilerinin kullanımı aynı şekilde anlaması için KDoc yazın.
Her İki Ekip için API'yi Belgeleme, CoddyKit'te ücretsiz bir Kotlin Multiplatform Academy dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Kotlin Multiplatform Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Kotlin Multiplatform Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Docs Are Part of the API
Both Android and iOS devs call your shared code, so clear documentation is as important as the functions themselves. 📝
Meet KDoc
KDoc is Kotlin's documentation comment. You write it right above a declaration, and tools turn it into readable reference pages.
/** Returns a friendly greeting for [name]. */
fun greet(name: String) = "Hi, " + nameExplain the Why
Code shows what happens; good docs explain the why and the intended use. State what a caller should expect, not how it works inside.
Document Parameters
Use the @param tag to describe each input. Callers from both apps then know exactly what to pass without reading the source.
/**
* @param rate tax rate as a fraction, like 0.2
*/Document Return Values
The @return tag describes what comes back. A clear return note prevents wrong assumptions about units, ranges, or null.
/** @return total price including tax, never negative */Link With Brackets
Wrap names in square brackets to create links, like [Quote]. Readers jump straight to related types in the generated docs.
/** Builds a [Quote] from a base price. */Show a Usage Sample
A tiny example beats paragraphs of prose. One snippet showing a real call answers most questions before they are asked.
Document Only the Public API
Spend your effort on the public surface. Internal helpers can stay lightly commented since no outside team will call them.
Mind the iOS Reader
Swift developers read your KDoc too, so describe behavior in plain terms. Avoid JVM jargon that means nothing on the iOS side.
Generate Docs With Dokka
Dokka reads your KDoc and produces a browsable site. Both teams get one shared reference instead of guessing from the code.
Keep Docs in Sync
Outdated docs mislead more than no docs. Update the KDoc in the same change as the code so the two never drift apart.
Quick Check
Let's check your documentation know-how.
Recap
Write KDoc on your public API, explain the why, tag params and returns, add a sample, and let Dokka share it with both teams. 🎉
Sıkça Sorulan Sorular
“Her İki Ekip için API'yi Belgeleme” dersi ücretsiz mi?
Evet — “Her İki Ekip için API'yi Belgeleme” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Kotlin Multiplatform Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Kotlin Multiplatform Academy kursu toplamda 4 dersten oluşur.
“Her İki Ekip için API'yi Belgeleme” dersinde ne öğreneceğim?
Android ve iOS geliştiricilerinin kullanımı aynı şekilde anlaması için KDoc yazın. Kotlin Multiplatform Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Kotlin Multiplatform Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Kotlin Multiplatform Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.
“Her İki Ekip için API'yi Belgeleme” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Kotlin Multiplatform Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Kotlin Multiplatform Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Küçük Bir Genel API Tasarlama
- internal ve public Görünürlük
- Modül İçindeki Paketleri Düzenleme
- Her İki Ekip için API'yi Belgeleme