https://kotlinlang.org logo
#getting-started
Title
# getting-started
r

Raphael Ndonga

08/02/2020, 11:43 AM
Hello devs! Any advice for a kotlin android developer who wants to get started using KTOR?
t

tseisel

08/02/2020, 11:58 AM
Do you plan on creating server side applications with Ktor, or just integrate the Ktor Http client into your apps ?
r

Raphael Ndonga

08/02/2020, 12:05 PM
@tseisel actually, I'm planning something like this: In the same way that i save data to my local database with room, I could save the data to some online server, and also read from it. I'm making a leap of faith that KTOR could somehow help me with that but I'm not sure entirely how.
@tseisel I'd really appreciate your help
t

tseisel

08/02/2020, 12:17 PM
From what I know, I'd say that Ktor is good for handling communication with clients via HTTP (and optionally other protocols like WebSockets). Aside from that, Ktor does not force you to use any framework. It does not have a built-in database solution. You could have a look at Exposed, a SQL framework built by JetBrains.
👍 1
If you like the power of Room for generating tables and queries, you could try Spring Data JDBC, which has similar features. Note that if you use Spring Boot, you probably won't be able to use Ktor with it
If you only need basic CRUD operations (create, read, update, delete), then you'd probably want to use Spring Data REST
r

Raphael Ndonga

08/02/2020, 12:22 PM
@tseisel yes! CRUD operations are exactly what i need. Thank you
3 Views