Is there a reason for Compose for Web (HTML) not b...
# compose-web
j
Is there a reason for Compose for Web (HTML) not being openly advertised anywhere anymore? Or has it just been missed during the rewrite of the readme and the landing page? (both do not link to it or mention it at all)
d
Compose HTML DOM has some solid use-cases, but doesn't share the same feature set, API's and development tools/process that would place it in the K Compose Multiplatform family. Android, iOS, Desktop and Web all render a Material UI to Canvas. HTML does not, and so it doesn't fall under that branding. Expect it to still exist; just not here. As for not being advertised at all, maybe that's even an intentional decision for a limited period, to help clarify the new CMP brand?
s
I think it serves as a point of confusion for a lot of people. Compose for Web isn't done and still has a lot of work. Compose HTML is more of an interop tool with the underlying web platform imo than a tool to build an app in.
j
Compose HTML is separate from compose-multiplatform, but still extremely useful and adding a lot of extra value to the Compose compiler and runtime in general. It not being discoverable at the moment is not the best decision in my opinion. Maybe it should still be mentioned somewhere while making clear that it is not multiplatform.
r
I like this section in kobweb, it explains a lot and give an opiniated feedback
c
Someone just asked the question at the closing keynote at KotlinConf
d
Someone just asked the question at the closing keynote at KotlinConf
What was the gist of the answer?
c
Basically what we expected: they thought it was too confusing. Someone on the panel said they want to spend more time polishing the DOM version, but I don't know if that's planned or just a wish.
The main effort is going towards the shared components via the canvas, but personally I think it's fine. The DOM version works well, sure it's bare-bones but there's everything we need to create libraries easily on top of it
d
Sounds reasonable to me
The pulse I'm reading is that splitting HTML out from the multiplatform makes sense, but there's concern about the HTML libraries being buried a bit too much.
c
Yeah, but I don't think they have the resources to make Compose HTML into a true complete web framework
And well, you're well on the way to make it one :)
d
What did I sign up for.... 😅
Ah well, ain't no getting off of this train we're on
c
Especially when you can see the interest
The community wants it, definitely
d
Seems so yeah! Perhaps the more they deemphasize Compose HTML the more that Kobweb will bubble up to the surface 😛
r
You're the new Compose HTML owner @David Herman is how I'm reading this, lol
d
😭
c
Next year, a talk on Kobweb? 😉
d
Yeah, I'd love to!
c
I want to make one on either Decouple or Pedestal, too. Not sure if it will be next year though, I lack experience
I'll definitely be attending though, I almost made it this year
d
A really great way to get experience is to commit to something and going for it!
I'm so busy right now with Kobweb, I didn't even realize KotlinConf was already here. Hopefully will be more aware next time...!
c
Yeah. I've been invited by an Android user group in Paris to talk about the project, and I know multiple people who organize a small conference in my home town next December, I'm planning on using those to get my name out there
d
Good idea
I should look for some opportunities like that myself in the coming months
c
Thankfully via this Slack I've spoken to a lot of speakers of such conferences, so hopefully I can get advice from them
r
I spoke at Droidcon SF last year. Was my first big conference, and I'll say getting practice at smaller user group meetups was a great way to build up confidence
c
Good to know! I've done a lot of similar things at uni-scale events and I really loved them, I'm hoping to get to know this world better
d
That's a great idea. I also did Toastmasters a couple of times (a while ago now). The first few times you get up in front of people are so hard.
r
Toastmasters is super helpful too
f
I dunno if it's just me but I have this looming sense that Compose for Web (the new one) is destined to fail simply on the basis that it uses canvas instead of the DOM. Mostly because of the points outlined in the Kobweb readme shared earlier. I feel like canvas works if you're wanting to port some actual application software to run in a web browser, but for websites... it just doesn't feel like the right tool. I think this will shy people away from using Compose instead of, for example, React or Vue.
d
Well, I'd think more about Flutter, which I guess is the market share JB is aiming at here.
I could see codebases at startups embracing 100% Kotlin, especially with the allure of multiplatform. And once you're in that boat, being able to tell some business type person that you can write your Kotlin UI once to hit several different targets, then I think you have a compelling story.
c
There's definitely a camp that wants Compose on the DOM. You can see it with Kobweb, Decouple and Redwood
d
@Oleksandr Karpovich [JB] just to check, despite the Compose HTML being de-emphasized, work will continue at least to keep updating compatibility for whenever the latest Compose version is released, right?
m
I also have concerns about if Compose HTML will still be maintained or not. It doesn't need new features since it already works pretty well, but it would be sad if it was deprecated, especially because it serves as a replacement for React on Kotlin/JS. If Compose HTML will be deprecated in the future, then at this point I would rewrite all of my webapps to React or something else, since Compose for Web (with Canvas) is not a good fit for what I'm using it for, especially because you cannot use CfW currently without enabling feature flags in the browser, so you can't release an production app with it yet.
o
just to check, despite the Compose HTML being de-emphasized, work will continue at least to keep updating compatibility for whenever the latest Compose version is released, right?
Yes, the aim is to at least maintain the compatibility with new kotlin versions and new compose runtime versions. As Sebastian replied at the KotlinConf closing panel, Compose Html stays around. Furthermore, I personally would like to see it working with k/wasm. No actual plans for this now, but it's something to look at in the backlog.
h
Any chance to add HTML back to the landing page? I really like it as a React/Angular alternative.
o
Yes. We'll add it back with a proper message to help people understand the difference between Compose for Web and Compose HTML library.
👍 1
e
Hi everyone. We’ve added Compose HTML to the main README page. Tutorials are still available but moved to the
html
folder under
tutorials
.
f
wonderful, thanks!
199 Views