Been thinking that it'd be nice to have fritz2 pub...
# fritz2
b
Been thinking that it'd be nice to have fritz2 public api available in common sourceSet. This would future proof the framework for potential expansion into kotlin wasm once that's stable
j
Also, aligning APIs with Jetpack compose could be interesting. The frameworks are similar enough that might be feasible. Right now that is only available for Android and Desktop. But SwiftUI seems similar and Fritz2 is kind of in the same family of reactive component based frameworks that you could consider covering the entire spectrum. Swapping out kotlin-js for wasm at some point would be interesting. However, you need access to browser APIs when rendering. And views literally are extension functions on RenderContext, which provides you basically all the HtmlElements in the Browser.
b
That's not an issue, I already have a POC of that with current kotlin wasm. Plus there are plans for direct wasm dom access as well Github.com/mpetuska/kvdom
They could even reuse that kvdom-dom module as a dom api stand in in common sourceSet
n
I don't recommend aligning Fritz2 APIs with Jetpack Compose since that would lock Fritz2 into the Android development way of doing things which conflicts with Web development, and there would be a reliance on a Google technology that could be deprecated in two years time. Google don't do long term commitments on technologies they develop/maintain.
👌 1
j
Depends, I don't expect Compose development to stay Android centric if Jetbrains succeeds with their Desktop variant. They've already experimented with a browser variant as well; showing that it is possible at least but they are not doing that yet. IOS would seem like it would be more of the same. So, I wouldn't dismiss it outright. The big picture is that for cross platform UI development Flutter (Google) and react native (Facebook) are the only two options right now. React like frameworks such as compose, swift ui, and Fritz2 seem to be popping up a lot lately. And Kotlin is nicely positioned in that it can target all these platforms. It just lacks a native UI toolkit. A platform neutral compose like API would enable a lot of code sharing. As it is, I'm actually packaging up our Fritz2 app using Cordova 😉 right now. Kind of works but I won't pretend it's great. It's a matter of time before somebody will have to sit down and do a proper app. I lack a mobile team; so Cordova+Fritz2 it is for now.