anchor.diff:  Another important tool to ensure your codebase remains maintainable is Isis' internal event bus.
   It is probably best explained by example; the code below says that the "complete" action should emit a `ToDoItem.Completed` event:
   
  -image::https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/240-domain-events.png[link="https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/240-domain-events.png"]
  +image::https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/240-domain-events.png[link="https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/240-domain-events.png"]
   
   Domain service (application-scoped, stateless) can then subscribe to this event:
   
  -image::https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/250-domain-event-subscriber.png[link="https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/250-domain-event-subscriber.png"]
  +image::https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/250-domain-event-subscriber.png[link="https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/250-domain-event-subscriber.png"]
   
   And this test verifies that completing an action causes the subscriber to be called:
   
  -image::https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/260-domain-event-test.png[link="https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/260-domain-event-test.png"]
  +image::https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/260-domain-event-test.png[link="https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/260-domain-event-test.png"]
   
   In fact, the domain event is fired not once, but (up to) 5 times.
   It is called 3 times prior to execution, to check that the action is visible, enabled and that arguments are valid.
  
positive.code: This is great to act as the starting point for identifying new stories; later on when the feature is being implemented, the same fixture script can be re-used within that feature's integration tests.
  (More on tests later).
  
  image::https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/020-install-fixtures.png[link="https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/images/isis-in-pictures/020-install-fixtures.png"]
  
  === Dashboard and View Models
  
  Most of the time the end-user interacts with representations of persistent domain entities, but Isis also supports view models which can aggregate data from multiple sources.
  The todoapp example uses a "dashboard" view model to list todo items not yet done vs those completed.
  
  image::https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/030-dashboard-view-model.png[link="https://raw.github.com/apache/isis/master/adocs/documentation/src/main/asciidoc/pages/isis-in-pictures/images/isis-in-pictures/030-dashboard-view-model.png"]
  
  In general we recommend to initially focus only on domain entities; this will help drive out a good domain model.
  Later on view models can be introduced in support of specific use cases.
  
negative.code: The todoapp uses this feature so that different users' list of todo items are kept separate from one another.
  A user with administrator is able to switch their own "tenancy" to the tenancy of some other user, in order to access the objects in that tenancy:
  
  image::https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/160-switch-tenancy.png[link="https://raw.githubusercontent.com/apache/isis/master/antora/components/toc/modules/ROOT/images/what-is-apache-isis/isis-in-pictures/160-switch-tenancy.png"]
  
  For more details, see the security module's link:https://platform.incode.org/modules/spi/security/spi-security.html[README] (or xref:secman:ROOT:about.adoc[SecMan extension])..
  
  