blog: Slides.

Change-Id: Iba0bb5bb52a7e85fadbf56161c6fc38d576c6c7c
diff --git a/blog/pom.xml b/blog/pom.xml
index 586b66d..ca5c806 100644
--- a/blog/pom.xml
+++ b/blog/pom.xml
@@ -5,19 +5,28 @@
   <groupId>eu.mulk.demos</groupId>
   <artifactId>blog</artifactId>
   <version>1.0.0-SNAPSHOT</version>
+
   <properties>
-    <compiler-plugin.version>3.8.1</compiler-plugin.version>
     <maven.compiler.parameters>true</maven.compiler.parameters>
     <maven.compiler.source>15</maven.compiler.source>
     <maven.compiler.target>15</maven.compiler.target>
+
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+    <asciidoctor-plugin.version>2.1.0</asciidoctor-plugin.version>
+    <compiler-plugin.version>3.8.1</compiler-plugin.version>
+
+    <asciidoctorj.version>2.4.3</asciidoctorj.version>
+    <asciidoctorj-revealjs.version>4.1.0</asciidoctorj-revealjs.version>
+    <hibernate-types.version>2.10.3</hibernate-types.version>
     <quarkus-plugin.version>1.12.0.Final</quarkus-plugin.version>
+    <quarkus.platform.version>1.12.0.Final</quarkus.platform.version>
+    <revealjs.version>3.9.2</revealjs.version>
+    <surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
+
     <quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
     <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
-    <quarkus.platform.version>1.12.0.Final</quarkus.platform.version>
-    <surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
-    <hibernate-types.version>2.10.2</hibernate-types.version>
   </properties>
 
   <dependencyManagement>
@@ -29,7 +38,6 @@
         <type>pom</type>
         <scope>import</scope>
       </dependency>
-
       <dependency>
         <groupId>com.vladmihalcea</groupId>
         <artifactId>hibernate-types-52</artifactId>
@@ -113,6 +121,35 @@
           <target>15</target>
         </configuration>
       </plugin>
+
+      <plugin>
+        <groupId>org.asciidoctor</groupId>
+        <artifactId>asciidoctor-maven-plugin</artifactId>
+        <version>${asciidoctor-plugin.version}</version>
+        <configuration>
+          <backend>revealjs</backend>
+          <requires>
+            <require>asciidoctor-revealjs</require>
+          </requires>
+          <attributes>
+            <revealjsdir>
+              https://cdn.jsdelivr.net/npm/reveal.js@${revealjs.version}
+            </revealjsdir>
+          </attributes>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.asciidoctor</groupId>
+            <artifactId>asciidoctorj</artifactId>
+            <version>${asciidoctorj.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.asciidoctor</groupId>
+            <artifactId>asciidoctorj-revealjs</artifactId>
+            <version>${asciidoctorj-revealjs.version}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/blog/SLIDES.adoc b/blog/src/main/asciidoc/SLIDES.adoc
similarity index 85%
rename from blog/SLIDES.adoc
rename to blog/src/main/asciidoc/SLIDES.adoc
index fe5bd01..26d74cf 100644
--- a/blog/SLIDES.adoc
+++ b/blog/src/main/asciidoc/SLIDES.adoc
@@ -11,12 +11,112 @@
 :keywords: mulk
 // Settings
 :icons: font
+:revealjs_theme: simple
+:revealjs_width: 1280
+:revealjs_height: 800
+//:revealjs_width: 1920
+//:revealjs_height: 1200
+//:revealjs_customtheme: SLIDES.css
+:customcss: SLIDES.css
 :source-highlighter: rouge
+//:source-highlighter: highlightjs
 
 
+== Setting the Stage
+
+image:UML.png[]
+
+[.columns]
+=== Posts
+
+[.column]
+--
+[source,java]
+----
+@Entity
+public class Post extends PanacheEntity {
+
+  public String title;
+  public Instant publicationDate;
+  public String body;
+
+  @ManyToOne(fetch = FetchType.LAZY)
+  public Author author;
+
+  @ManyToMany(fetch = FetchType.LAZY)
+  public Set<Category> categories;
+
+  @OneToMany(fetch = FetchType.LAZY,
+             mappedBy = "post")
+  public Set<Comment> comments;
+}
+----
+--
+
+[.column]
+--
+[source,java]
+----
+@Entity
+public class Comment extends PanacheEntity {
+
+  public String authorName;
+  public Instant publicationDate;
+  public String text;
+
+  @Enumerated(EnumType.STRING)
+  public SpamStatus spamStatus;
+
+  @ManyToOne(fetch = FetchType.LAZY)
+  public Post post;
+}
+----
+
+[source,java]
+----
+@Entity
+public class Category extends PanacheEntity {
+
+  public String name;
+}
+----
+--
+
+[.stretch]
+=== Authors, Login Credentials
+
+[source,java]
+----
+@Entity
+public class Author extends PanacheEntity {
+
+  public String name;
+
+  @OneToOne(fetch = FetchType.LAZY,
+            mappedBy = "author")
+  @LazyToOne(LazyToOneOption.NO_PROXY)
+  public BasicCredentials basicCredentials;
+}
+----
+
+[source,java]
+----
+@Entity
+public class BasicCredentials extends PanacheEntity {
+
+  @OneToOne(fetch = FetchType.LAZY)
+  @MapsId
+  public Author author;
+
+  public String username;
+  public String password;
+}
+----
+
+== Cartesian Blowup
+
 [source,sql]
 ----
-Hibernate: 
     select
         post0_.id as id1_4_0_,
         comments1_.id as id1_3_1_,
diff --git a/blog/src/main/asciidoc/SLIDES.css b/blog/src/main/asciidoc/SLIDES.css
new file mode 100644
index 0000000..b3bed7d
--- /dev/null
+++ b/blog/src/main/asciidoc/SLIDES.css
@@ -0,0 +1,3 @@
+.reveal pre code {
+    max-height: 100% !important;
+}
diff --git a/blog/src/main/asciidoc/UML.png b/blog/src/main/asciidoc/UML.png
new file mode 100644
index 0000000..b7bfee8
--- /dev/null
+++ b/blog/src/main/asciidoc/UML.png
Binary files differ
diff --git a/blog/src/main/asciidoc/UML.uml b/blog/src/main/asciidoc/UML.uml
new file mode 100644
index 0000000..120c56a
--- /dev/null
+++ b/blog/src/main/asciidoc/UML.uml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Diagram>
+  <ID>Persistence</ID>
+  <OriginalElement>JavaeeElement:/210c69ce/blog/blog/jpa/JPA/PersistenceModel</OriginalElement>
+  <nodes>
+    <node x="-20.5" y="369.5">Comment#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/comments/Comment.java</node>
+    <node x="205.0" y="-8.5">BasicCredentials#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/authors/BasicCredentials.java</node>
+    <node x="-17.5" y="60.5">Post#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/posts/Post.java</node>
+    <node x="259.5" y="202.5">Category#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/posts/Category.java</node>
+    <node x="19.5" y="2.5">Author#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/authors/Author.java</node>
+  </nodes>
+  <notes />
+  <edges>
+    <edge source="Post#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/posts/Post.java" target="Author#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/authors/Author.java">
+      <point x="0.0" y="-59.5" />
+      <point x="0.0" y="37.5" />
+    </edge>
+    <edge source="Post#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/posts/Post.java" target="Category#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/posts/Category.java">
+      <point x="97.5" y="0.0" />
+      <point x="-60.5" y="0.0" />
+    </edge>
+    <edge source="Comment#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/comments/Comment.java" target="Post#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/posts/Post.java">
+      <point x="0.0" y="-70.5" />
+      <point x="0.0" y="59.5" />
+    </edge>
+    <edge source="Author#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/authors/Author.java" target="BasicCredentials#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/authors/BasicCredentials.java">
+      <point x="60.5" y="0.0" />
+      <point x="-75.0" y="0.0" />
+    </edge>
+  </edges>
+  <settings layout="Orthogonal" zoom="1.0" x="362.5" y="257.0" />
+  <SelectedNodes>
+    <node>Post#file:///Users/mulk/Arbeitskasten/demos/blog/src/main/java/eu/mulk/demos/blog/posts/Post.java</node>
+  </SelectedNodes>
+  <Categories>
+    <Category>Properties</Category>
+    <Category>Embeddables</Category>
+  </Categories>
+</Diagram>
+