Introducing Kweb: A unique new approach to building rich web applications
But why yet another web framework, don’t we have enough already?
KWeb fixes this.
How does it work?
In this regard it is somewhat similar to Vaadin, although unlike Vaadin it doesn’t incorporate a large widget library, and it’s much simpler to integrate into a project (just add the dependency).
Uniquely, KWeb takes advantage of the new coroutines functionality in the upcoming Kotlin 1.1 to handle asynchronously waiting for responses from the client in a way that’s almost transparent to the user of KWeb, without tying up threads (a definite no-no if you plan on having more than a handful of people visiting your website at a delay).
What does it look like?
In this example I create a very simple to-do list, which supports addition and removal of items. It’s actually quite a small amount of code, but I’ve included detailed comments so it appears longer.
You’ll notice that at no point do you need to think about communication between the browser and the server, this is the magic of Kweb.
How do I try it?
Check out our Github page and follow the instructions there.
Kweb is still at the prototype stage. We’ve been making rapid progress on it but there is still a lot to do, so please try it, take a look at the code, and if you’d like to help please join our Slack channel #kweb on kotlinlang (you may need to sign up for kotlinlang first).