vok

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.

For example, this is all you need to write to delete an object from you database:

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

Nor JavaEE nor Spring is needed; all complex features are deliberately left out, which makes Vaadin-on-Kotlin a perfect
starting point for beginning programmers: you will write only server-side Kotlin code.
JavaScript and CSS are needed only if you decide
to style up your application or write your own custom rich component.

Note that VoK is not just 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:

Rich JavaScript front which runs in the browser and provides the UI with which the user interacts; and

The server-side part providing API you use to develop your webapps.

The components use Vaadin to handle the communication
between the client-side front and server-side part; for example, the component
Grid is basically a scrollable table which shows tabular data
The client-side front of the Grid component fetches
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. To you as programmer, 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
(see example demo; just press the “Generate test data” button at the top to get some data).

Thanks to this approach, VoK feels more like 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 tends to have several files (database migrations, Gradle build script, themes, logger configuration etc) and our project will be no exception. Therefore, 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 tends to have several files (database migrations, Gradle build script, themes, logger configuration etc) and our project will be no exception. Therefore, it makes sense to
have an archetype app with all of those files already provided.

Further Reading

The browser renders HTML and JavaScript constructed by the components orchestrated by the Vaadin framework. Vaadin offers the possibility to orchestrate
interactive components entirely server-side using a rich Java API. The Karibu-DSL library wraps Vaadin APIs to provide more pleasant Kotlin experience.

Server-side code is typically written using the Kotlin language. This is where your app logic resides and this is where you will add your code.

The database access is handled by the VoK-ORM library: a very simple and powerful layer over a SQL database. You can of course decide not to use
VoK-ORM and use JPA; you can even decide not to use SQL at all and use a NoSQL database.

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: