Hey K:spider_web:bweb users! JetBrains <just post...
# kobweb
d
Hey K🕸️bweb users! JetBrains just posted a survey for "Compose Multiplatform for Web" (direct link to survey for convenience: https://surveys.jetbrains.com/s3/Compose-Multiplatform-Web) Even though Kobweb is Compose HTML, I filled it out, and it seemed there were definitely relevant questions. And JB surveys are usually pretty quick -- a handful of radio buttons and optional text fields if you want to say more. So if you have tried out Kobweb before, regardless if you finished a site or just dabbled with and then abandoned one, consider filling out the survey! (I'd love for JB to get some strong signal from Compose HTML users.)
👍 2
s
Cheers. I put in a good word for Kobweb! 🙂
d
Thank you @stantronic!
c
Oh, they brought back the paragraph about Compose HTML at the end of the README: https://github.com/JetBrains/compose-multiplatform?tab=readme-ov-file#libraries
d
Yeah they did that pretty early on, in response to community resistance shortly after the whole Compose Web -> Compose HTML rename happened
c
Ah, I never noticed it was back
I really do hope Kobweb becomes the face of Compose HTML, IMO it's the most promising approach for most backend companies who have React or Angular frontends
At least where I work at, Kotlin/WASM has no chance of getting adopted for at least ~5 years due to browser support and stuff
d
I appreciate that! I'm hoping that JB sees it that way as well.
There are still some scary corners to Kobweb (around file size, build times, and splitting up your website into separate sections so that you don't have to load EVERYTHING all at once), which I think I'd need official support to figure out if / how they can be solved.
c
Have you looked into the ES6 format?
d
I've added a note to do that 🙂
c
I think I remember that Kotlin supports it now
d
I'm definitely thinking splitting things up is a post-1.0 feature; I don't think most people in these early days need it yet.
👍 1
You can also do what one of our users is doing and use subdomains as a way to break up your site
c
It's a complex feature… it sounds like it would be easy, because splitting the codebase is easy, but then you have to consider the libs you are importing…
d
Yeah
It might actually increase your download sizes
because now you can't run dead code elimination on the Kotlin/JS runtime for example
So it ironically might not be a great feature. However, I don't have the time or expertise to really drill into it.
c
Yeah. For Formulaide, I'm considering splitting it into: • login form • guest app • regular user app • admin app which are all different JS files
d
That seems reasonable!
c
You'd still be loading the entire app, but at least guests, which have a very limited set of actions, don't have to load all the editors and stuff from the other roles
I don't know how much it'll reduce the bundle size, though. If the different roles don't have that much difference in reach into libraries, DCE won't do much and they'll just end up being the same size 😅
d
Yeah, exactly
It could matter if your different site sections start growing significantly
which sometimes happens when you pull in some KMP dependencies.
c
Well, in this case, guests are basically read-only. But everything uses Ktor and Compose HTML
👍 1
Maybe I should just have the login screen be pure JS, this way the entire JS bundle can load while the user is typing
d
Stuff like that would be great to explore for sure
s
Can kotlin do any DCE out of the box? Or does it just leave that to tools like webpack etc.?
d
I'm actually not 100% sure. Definitely webpack is doing a DCE step, maybe there are others.
c
I believe the Kotlin compiler does DCE, but don't quote me on that
AFAIK it only removes unused code, it doesn't do minification etc itself?
If you want more detailed info, I would ask in #javascript or #compiler
👍 1
s
c
I assume kobweb uses IR?
Yes, Compose only works on IR
👍 2