I just released Doodle . A pure Kotlin UI framework for the Web. The difference compared to other frameworks is that it is not a nicer way to write HTML/CSS. Doodle apps actually don’t use browser concepts at all.
Doodle is written entirely in Kotlin and so are its apps. Doodle Applications do not use HTML, CSS styles or Javascript libraries. In fact, apps are not aware of the Browser (or Browser concepts) at all, and can be written entirely as common (cross-platform) code in multi-platform setups.
Creating expressive, intuitive apps is natural with Doodle. It makes complex rendering easy with powerful, vector-oriented rendering, provides fully customizable layouts and simplifies pointer and keyboard handling.
Simply define your View hierarchy, business logic and go.
It is easy to build beautifully detailed UIs with Doodle. All rendering in Doodle is vector-oriented; so ellipses, paths, lines, gradients, affine transforms etc. are as simple to use as images and rectangles.
Doodle has several libraries and a collection of modules. This allows selective adoption of various features and helps with bundle size. Apps written with Doodle are also dependency-injected; and there are no global objects or state to make mocking challenging.
class HelloWorld(display: Display): Application {
init {
display.children += object: View() {
init { size = display.size }
override fun render(canvas: Canvas) {
canvas.text("Hello, world!",
at = Origin,
brush = ColorBrush(Black))
}
}
}
override fun shutdown() {}
}
fun main() {
application {
HelloWorld(display = instance())
}
}
It’s not quite like Flash since it ships pure JS when compiled. It uses SVG, but only for shapes that can’t easily be rendered with regular html elements.
I don’t currently have a project that could use it. But I’d love to see what others might do with it, and hear feedback on how to continue improving it.
Doodle now supports Desktop and leverages Skia for fast, accurate rendering. This means apps can target desktop via the JVM.
Support is still early and not ready for production. There are some missing features–like Accessibility, and others that
are partially implemented (i.e. drag-drop). However, overall support is sufficiently complete to begin testing with. So please
try this out and report bugs.
A key goal for Doodle is to provide as much cross-platform code sharing as possible. That’s why Web and Desktop share the same
rendering model, and therefore widgets. All widgets written in common code can be used on both platforms.
Desktop and Web share the same rendering model and widgets
Apps written in common code can be fully shared between Web and Desktop
Kotlin 1.5.0 Support
Kotlin support has been moved from 1.4.x to 1.5.30.