vok

Writing full-stack statically-typed web apps on JVM can't get any simpler

This project is maintained by mvysny

Index Getting Started Guides

VoK Logo

Vaadin-on-Kotlin (or VoK for short) is a web-application framework that includes everything necessary to create database-backed web applications in server-side Kotlin:

button("Create") {
  onLeftClick { db { person.save() } }
}

No JavaEE nor Spring needed; all complex features are deliberately left out, which makes Vaadin-on-Kotlin a perfect starting point for beginner programmers.

With VoK you only write server-side Kotlin code - no JavaScript and no CSS is necessary until much later on, when you decide to style up your application and/or write your own custom rich component.

VoK is not just yet another REST library, or HTTP route mapping library. On the contrary: it is built on Vaadin which provides you with a wide palette of built-in powerful components: lazy paged tables, color pickers, menu components, sliders. All components have two parts:

The components then use Vaadin to handle the communication between the client-side front and server-side part.

Let’s take the Grid component as an example. Grid is basically a scrollable table which shows tabular data (see example demo; just press the “Generate test data” button at the top to see some data).

The client-side front of the Grid component is able fetch the tabular data from the server-side part of the Grid component. Grid configures Vaadin to pass the data properly from server-side Grid part to the client-side Grid front. For you, this process is completely transparent. You develop your webapp using the server-side component API only, in pure server-side Kotlin code; the components then handle client-server communication transparently.

Because of that, VoK feels more of a desktop widget library (such as Swing or JavaFX) than a web page-based framework.

Tutorial

To get started with Vaadin-on-Kotlin, Start Here. To find out more, please visit the following pages:

Vaadin 8-based Quick Starters

Vaadin 8 is a mature and proven web framework. If you need production-grade stability, start here.

Every VoK project tend to have several files (database migrations, Gradle build script, themes, logger configuration etc), it makes sense to have an archetype app with all of those files already provided.

UI Base
A project with one view and no db; perfect for your UI experiments
Component Palette
App which demoes all Vaadin components and the Navigator; no db
VoK Project Base
Skeletal app with support for SQL db; start building your app here
VoK Full Stack
Full-stack with db and a db table editor; a good source of code examples

Vaadin 10-based Quick Starters

Vaadin 10 components are based on the Web Components standard; Vaadin 10-based apps are also themable more easily than Vaadin 8-based apps.

Every VoK project tend to have several files (database migrations, Gradle build script, themes, logger configuration etc), it makes sense to have an archetype app with all of those files already provided.

UI Base
A project with one view and no db; perfect for your UI experiments
VoK Project Base
Skeletal app with support for SQL db; start building your app here
Full Stack App
The "Beverage Buddy" app backed by SQL db; demoes two tables
Full Stack PWA
Full-stack task list app backed by SQL db; for desktop and mobile browsers

Further Reading

For technical description of what Vaadin-on-Kotlin is, please feel free to read the Vaadin-on-Kotlin Github page.

Vaadin-on-Kotlin apps are typically three-tiered:

Vaadin-on-Kotlin apps typically consist of several pieces. To learn more about a particular piece, just click the box below:

Karibu-DSL
Write your UI in structured Kotlin code
VoK-ORM
Unleash your database, with a sprinkle of Kotlin magic
Karibu-Testing
Test your UI with speed and reliability
Vaadin
The Productive UI Framework for Java Web Apps
DynaTest
Create and reuse test batteries in a sane way
Async
Sane async code with coroutines

Complete List Of Examples

The following is a complete list of all example projects demonstrating vok or its parts, in alphabetical order:

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License