--- title: Using Vaadin with Kotlin order: 1100 layout: page --- [[getting-started.kotlin]] = Using Vaadin with Kotlin You can use Vaadin with the link:https://kotlinlang.org/[Kotlin] language as well. Kotlin offers awesome tooling which includes a plugin for Intellij IDEA, Eclipse and Netbeans. The plugin includes the possibility to convert any Java class to Kotlin, therefore the easiest way is to generate the sample link:https://vaadin.com/maven[Java Vaadin Maven project] and then convert the [filename]#MyUI# class to Kotlin, by pressing kbd:[Ctrl+Alt+Shift+K]. The Kotlin plugin will convert the class and include Kotlin Maven plugin to your [filename]#pom.xml#. The link:https://github.com/mvysny/karibu-dsl[Karibu-DSL] library offers a more Kotlin-like API for Vaadin. The library will allow you to create your UI in a hierarchical way. For more details please see link:https://kotlinlang.org/docs/reference/type-safe-builders.html[Kotlin Type-Safe Builders]. There is a link:https://github.com/mvysny/karibu-helloworld-application[Karibu Helloworld Application] sample which demonstrates this technique. It is a standard Gradle project, thus you only need to `git clone` the project and open it in your IDE. The hierarchical code looks as follows: [source, kotlin] ---- @Theme("mytheme") class MyUI : UI() { private lateinit var layout: VerticalLayout @Override override fun init(vaadinRequest: VaadinRequest) { layout = verticalLayout { val name = textField { caption = "Type your name here:" } button("Click Me", { println("Thanks ${name.value}, it works!") layout.label("Thanks ${name.value}, it works!") }) } } } ---- It is also possible to use Kotlin to access your database, allowing you to build full-blown web applications. For details please see the link:http://www.vaadinonkotlin.eu/[Vaadin-on-Kotlin] library. Just follow the Getting Started tutorial there - the tutorial will guide you step-by-step. parameter-better-distinction Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Security/CryptoTest.php
blob: b65a9a36985b72eefd8873414853e4c7e14439af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100