- Lucas' Newsletter
- Posts
- Daily dispatch #10 - Ktor is a Delight
Daily dispatch #10 - Ktor is a Delight
![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ec2a0be9-e668-4675-86c3-48c798c4b0df/pexels-photo-239548.jpeg?t=1722263367)
And it’s been a delight. As a reference here’s the before and after code.
And I’d have to create those Single responses from RxJava2. Then there was the @GET annotations that made it a mess to put query parameters. Ugly as hell.
Then enters Ktor:
It just looks delightful, it’s clean, it has it’s own Domain Specific Language, so very little Annotations required.
Why I love Ktor
Let’s go over why I love Ktor more than retrofit.
First of all Ktor is multiplatform.
Second, it uses Kotlin Coroutines instead of rxjava2.
So we get to develop a KMM module for our app straight out of the box.
Json to Data Class Plugin
Another useful thing I’ve found is the Json plug-in for Android Studio.
You give it a json response from an api and it generates kotlin data classes for ya.
Check out what it generated for me from this JSON:
The generated Data Classes:
Pretty Cool hm?
Manga Web Portal
On a more entrepreneurial note. I’ve been thinking about a simple app to buy and sell Manga with verified users and sellers.
Could be called Golduru.
I think I could set up a website on firebase and backend on it as well.
Maybe eventually link account with a block chain wallet to help verify scammers as well.
I think there is enough demand in this market to be able to sell this service as an yearly subscription.