# feed

Tomasz Krakowiak

05/11/2021, 12:44 PM
NOTE: Project is not ready for general use yet! Want a pure Kotlin WEB framework with SSR(server-side rendering) and hydration support, that allows you to write your code, like this:
Copy code
val welcome: CBlock = {
    tag(::DIV) {
        css {
            display = Display.none
        +"Hello, "
        tag(::SPAN) {
            val classes = {
                if (it == null) {
                    setOf("username", "usernameAnonymous")
                } else {
                    setOf("username", "usernameLoggedIn")
            bind(SPAN::classes, classes)
            dynamic(currentUser) { +(it?.username ?: "you") }
It's coming! Currently I'm looking for people willing to help me with design and development. No code contribution is necessary, advising on API design is not less valuable for me. See live demo: Code: If you want to help, join #carrat-dev


05/11/2021, 1:35 PM
I do not see comparison with existing frameworks like KVision or simple kotlins-html. Without it, I do not think that people will try it.
The DSL seems to be very confusing.
☝️ 3
☝🏼 1

Tomasz Krakowiak

05/11/2021, 1:45 PM
@altavir I didn't wanted to write too long post about it here. There are quite a few kotlin web frameworks currently. KVision is component framework. Carrat is low level framework for creating and manipulating DOM. KVision is JS only, carrat can render on both client and server. It can also attach on client to server rendered DOM. kotlinx-html can create DOM, but cannot manipulate it. Carrat CBuilder does implement TagConsumer from kotlinx-html, but without using
method, binding is not possible, as it is not possible to implement it efficiently.
@altavir And thanks for feedback about DSL. It requires some work, but currently achieving proper core API design is a priority. As I mentioned it is not ready for general use yet, I am mostly looking for people who would like to help me shape the API.


05/13/2021, 2:43 AM
tag(::DIV) { // . . . } calls out for div { // making this an inline function }