Skip to content

Commit 1c0d6e6

Browse files
authored
Adr01+02 (#26)
* first two ADRs * updated ADRs
1 parent 6b11467 commit 1c0d6e6

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
== ADR 01: Plugin Programming Language
2+
3+
[options="header"]
4+
|===
5+
| Status | Date | Decided by
6+
| decided | 07.11.20 | rdmueller
7+
|===
8+
9+
=== Problem
10+
11+
IntelliJ is JVM based and plugins can be written in one of many languages which create bytecode for the JVM.
12+
One of those languages have to be selected.
13+
14+
=== Decision
15+
16+
This plugin uses Kotlin as programming language.
17+
18+
=== Alternatives
19+
20+
==== Groovy
21+
22+
As Ralf Müller (rdmueller) is mostly experienced in Groovy, he started to implement the plugin in Groovy.
23+
Since most plugin examples he tried to learn from, are written in Java, he soon switched over to Java.
24+
25+
==== Java
26+
27+
With the experience of Alexander Schwartz (ahus1) - the maintainer of the asciidoctor plugin for IntelliJ - we dropped Groovy and the first proof of concept has been implemented in Java.
28+
29+
==== Kotlin
30+
31+
When Henning Dieterichs (hediet)- the maintainer of the VS Code draw.io plugin - joined the project, he donated his knowledge about draw.io.
32+
Since IntelliJ is a jetbrains project and jetbrains switched to Kotlin some time ago, he switched to Kotlin as langauge for the plugin.
33+
34+
Kotlin is a modern language which adds quite a few new features and shortcuts.
35+
Java Code can be easily transformed to Kotlin through the IntelliJ IDE (`Code` -> `Convert Java File to Kotlin file`).
36+
37+
In addition, the starter template für new plugins is written in Kotlin and thus it is expected that the future will bring more plugins written in Kotlin.
38+
39+
=== Consequences
40+
41+
Contributors might have to learn the details of Kotlin wich might result in code which is not perfect Kotlin code.
42+
43+
Since Kotlin is a relative new language, it seems to be harder to find code examples written in Kotlin.
44+
For the main code, this seems to be not a big deal, since you can convert Java to Kotlin (even automatically in Intellij via `Code` -> `Convert Java File to Kotlin file`).
45+
But for the Groovy DSL, this might be more of a problem.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
== ADR 02: Test-Framework
2+
3+
[options="header"]
4+
|===
5+
| Status | Date | Decided by
6+
| decided | 07.11.20 | rdmueller
7+
|===
8+
9+
=== Problem
10+
11+
For testing, we need a test-framework.
12+
13+
=== Decision
14+
15+
We start out with Spock as test-framework
16+
17+
=== Alternatives
18+
19+
==== JUnit-X vs. Spock
20+
21+
JUnit seems to be the standard test-framework for Java or Kotlin development.
22+
However, Spock seems to be more powerful and lets us use the Behaviour-Driven-Development approach.
23+
24+
=== Consequences
25+
26+
With Spock, we add Groovy as additional language to the project.
27+
This raises the complexity, and we have to see if this is worth it.
28+
Should we notice that we need another test-framework, we can install it as additional one and still keep the Spock tests.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[[section-design-decisions]]
22
== Design Decisions
33

4-
no decision documented yet
4+
include::09_ADR01_language.adoc[leveloffset=+1]
5+
6+
include::09_ADR02_testing.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)