https://kotlinlang.org logo
Title
a

Alexey Polyusov

08/23/2022, 8:57 PM
Hi guys! 🙂 I want to write an app that can be viewed in a web browser. I want to draw a lot of lines, squares etc on some canvas and make animations. I want to make some file processing (10-15 mb per file). I wish to load the entire file into RAM to speed things up. Not sure if I need multithreading. I have NO knowledge of JS\CSS\HTML at all, but I know Kotlin. What framework\library should I use for this task? Thanks!
b

Big Chungus

08/23/2022, 9:38 PM
I'm affraid kotlin is not a silver bullet. You'll still need to learn at least basic js/css/html to be able to work with kotlin.js in a browser environment.
v

Vampire

08/23/2022, 10:00 PM
And JS is single-threaded, so no, you don't need multithreading. But maybe you want to use coroutines.
t

Tóth István Zoltán

08/24/2022, 2:30 AM
Well, you can use web workers for multithreading. You may try my application template. This is quite straightforward: clone project, run customization in gradle, put everything in Home.kt, run jsBrowserRun and that's it. Evertything is written in README.md and there is quite extensive documentation on the web. No JS/HTML/CSS needed. This also includes a server (based on Ktor) with a minimal user management but you can easily comment that out. https://github.com/spxbhuhb/zakadabar-application-template
n

Nick

08/24/2022, 5:25 AM
You can also check out Doodle. It doesn't use JS/CSS/HTML in any APIs. So your app won't need them. But it gives you a Canvas abstraction for drawing. This means lines etc. are very easy to create. This shows how simple it is to create a 3D cube. It also supports animations, as you can see in the search bar (focus/unfocus) of this example app. The code for this is straight forward.
a

Alexey Polyusov

08/24/2022, 7:06 AM
thank you guys!