You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by jo...@apache.org on 2022/06/23 16:26:18 UTC

[isis] 02/02: ISIS-3073 eventbus diagram split up into: domain, persistence, ui

This is an automated email from the ASF dual-hosted git repository.

joergrade pushed a commit to branch ISIS-3073
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 5532c660426c9d03925971962249fff2f577bdff
Author: Jörg Rade <jo...@kuehne-nagel.com>
AuthorDate: Thu Jun 23 18:25:30 2022 +0200

    ISIS-3073 eventbus diagram split up into: domain, persistence, ui
---
 .../modules/resources/pages/eventbus_domain.adoc   | 76 ++++++++++++++++++++++
 ...us_lifecycle.adoc => eventbus_persistence.adoc} | 16 ++++-
 ...{eventbus_terminology.adoc => eventbus_ui.adoc} |  8 +--
 3 files changed, 93 insertions(+), 7 deletions(-)

diff --git a/antora/components/docs/modules/resources/pages/eventbus_domain.adoc b/antora/components/docs/modules/resources/pages/eventbus_domain.adoc
new file mode 100644
index 0000000000..82c79e0ab1
--- /dev/null
+++ b/antora/components/docs/modules/resources/pages/eventbus_domain.adoc
@@ -0,0 +1,76 @@
+# eventbus_domain
+.eventbus_domain
+[plantuml,file="eventbus_domain.png"]
+
+--
+@startuml
+
+skinparam nodesep 20
+
+together {
+    (Domain\nService) as DS
+    (Domain\nObject) as DO
+    (Domain\nEvent) as DE
+}
+(Member) as MB
+together {
+    (Property) as P
+    (Action) as A
+    (Collection) as C
+}
+P -u-> MB : is a
+A -u-> MB : is a
+C -u-> MB : is a
+
+DO -d-> MB : has
+DS -d--> A : has
+
+DE -d-> MB : can be \n declared \n for
+
+(Execution) as EX
+P -->  EX : change \n is an
+A --> EX : invocation \n is an
+
+(Event\nBus) as EB
+(Spring) as SPRING
+SPRING .l.> EB : provides/\nmanages
+EX -> EB : is published as: \n * before event (executing)\n * after event (executed)
+
+(Event\nListener) as EL
+EL --> EB : listens
+EL -u-> MB : can check/modify: \nvisibility (hide), \nusability (disable), \nvalidity (validate)
+
+note right of DE
+Phases are:
+* EXECUTING / EXECUTED
+* VALIDATING
+* DISABLING
+* HIDING
+end note
+
+note bottom of EX #pink
+When an Action is invoked or a Property is changed, events are published via the bus.
+This implies that DomainEvents have been declared on the member before?
+end note
+
+note bottom of EB #pink
+* How are events for phases VALIDATING, DISABLING, HIDING created?
+* How are events published on the bus?
+end note
+
+note right of EL #pink
+* How are 'subscriptions' created?
+* Are they declared via DomainEvents as well?
+end note
+@enduml
+--
+
+We call the change of a DomainObject's Property or the invocation of a DomainObject's or DomainServices' Action an Execution.
+Executions are broadcast as events on the event-bus.
+The framework provides several publisher/subscriber models to listen for specific execution data (readonly).
+In addition developers can declare Domain Events specific to Actions, Properties and Collections, that allow event listeners to modify visibility (whether is visible) or usability (whether can change).
+In addition there are UI Events, that allow listeners to modify the viewer's use of title, icon, css-class and layout file.
+The event-bus is provided/managed by Spring.
+
+event listener can check: visibility (hide), usability (disable), validity (validate) ... aka "see it, use it, do it".
+It can also listen to executing (before) and executed (after).
diff --git a/antora/components/docs/modules/resources/pages/eventbus_lifecycle.adoc b/antora/components/docs/modules/resources/pages/eventbus_persistence.adoc
similarity index 71%
rename from antora/components/docs/modules/resources/pages/eventbus_lifecycle.adoc
rename to antora/components/docs/modules/resources/pages/eventbus_persistence.adoc
index 8ef60c5441..8e065f0779 100644
--- a/antora/components/docs/modules/resources/pages/eventbus_lifecycle.adoc
+++ b/antora/components/docs/modules/resources/pages/eventbus_persistence.adoc
@@ -1,10 +1,12 @@
-# eventbus_lifecycle
-.eventbus_lifecycle
-[plantuml,file="eventbus_lifecycle.png"]
+# eventbus_persistence
+.eventbus_persistence
+[plantuml,file="eventbus_persistence.png"]
 --
 @startuml
 
 (Event\nBus) as EB
+(Spring) as SPRING
+SPRING .l.> EB : provides/\nmanages
 (Event\nListener) as EL
 EL --> EB : listens
 
@@ -38,5 +40,13 @@ RS -u-> UNG :emits
 RS -u-> UED :emits
 RS -u-> RNG :emits
 
+note top of RNG
+JDO/Datanucleus
+does not support
+something like a
+"Removed Event".
+Hence not implemented.
+end note
+
 @enduml
 --
diff --git a/antora/components/docs/modules/resources/pages/eventbus_terminology.adoc b/antora/components/docs/modules/resources/pages/eventbus_ui.adoc
similarity index 92%
rename from antora/components/docs/modules/resources/pages/eventbus_terminology.adoc
rename to antora/components/docs/modules/resources/pages/eventbus_ui.adoc
index 6f96cd3180..92beb36e80 100644
--- a/antora/components/docs/modules/resources/pages/eventbus_terminology.adoc
+++ b/antora/components/docs/modules/resources/pages/eventbus_ui.adoc
@@ -1,6 +1,6 @@
-# eventbus_terminology
-.eventbus_terminology
-[plantuml,file="eventbus_terminology.png"]
+# eventbus_ui
+.eventbus_ui
+[plantuml,file="eventbus_ui.png"]
 --
 @startuml
 
@@ -55,4 +55,4 @@ The event-bus is provided/managed by Spring.
 
 event listener can check: visibility (hide), usability (disable), validity (validate)  ... aka "see it, use it, do it".  It can also listen to executing (before) and executed (after).
 
-UIEvent is not published on the EventBus, correct?
\ No newline at end of file
+UIEvent is not published on the EventBus, correct?