ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - jwstegemann/fritz2: Easily build reactive web-apps in Kotlin based on flows and coroutines.
Easily build reactive web-apps in Kotlin based on flows and coroutines. - jwstegemann/fritz2
Visit Site

GitHub - jwstegemann/fritz2: Easily build reactive web-apps in Kotlin based on flows and coroutines.

GitHub - jwstegemann/fritz2: Easily build reactive web-apps in Kotlin based on flows and coroutines.

fritz2

Actions Status Awesome Kotlin Badge Download IR Examples API Docs Slack chat

fritz2 is an extremely lightweight, well-performing, independent library for building reactive web apps in Kotlin, heavily depending on coroutines and flows.

fritz2 includes an intuitive way to build and render HTML elements using a type-safe dsl. You can easily create lightweight reactive HTML components which are bound to an underlying model and automatically change whenever the model data changes:

render {
    val model = storeOf("init value")
    
    div("some-css-class") {
        input {
            value(model.data)
            changes.values() handledBy model.update 
        }
        p {
            +"model value = "
            model.data.renderText()
        }
    }
}

fritz2 implements precise data binding. This means that when parts of your data model change, exactly those and only those DOM-nodes depending on the changed parts will automatically change as well. No intermediate layer (like a virtual DOM) is needed. fritz2 requires no additional methods to decide which parts of your component have to be re-rendered. fritz2 also supports two-way data binding out-of-the-box to update your model by listening on events:

State management in fritz2

Utilizing Kotlin's multiplatform-abilities, you'll write the code of your data classes only once and use it on your client and server (i.e. in a SpringBoot- or Ktor-Backend). This is also true for your model-validation-code, which can quickly become far more complex than your data model.

Key Features

  • easy reactive one- and two-way data binding (even for lists and deep nested structures)
  • hassle-free state-handling
  • model-validation and message handling
  • http and websockets
  • hash-based routing
  • history / undo
  • processing state ("spinning wheel")
  • webcomponents
  • easy to learn
  • documentation
  • examples i.e. implementing the specification of TodoMVC

How to try it?

Overall Goals

  • staying lightweight
  • keeping dependencies as low as possible
  • providing tags, attributes, events for HTML from specification (w3c, mozilla, ...)
  • making it as easy as possible to write reactive web-apps in pure kotlin

Inspiration

fritz2 is hugely inspired by the great Binding.scala framework. Later we discovered that a lot of those concepts are described independently in Meiosis. Also, fritz2 relies heavily on the great Kotlin coroutines library.

Leave us a star...

If you like the idea of a lightweight pure Kotlin implementation for building reactive web-apps, please give us a star. Thank you!

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory