Skip to content

Commit

Permalink
[ Cleanup ] Updated docu
Browse files Browse the repository at this point in the history
  • Loading branch information
repplix committed Apr 1, 2023
1 parent 0872694 commit 7e9869e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
5 changes: 2 additions & 3 deletions docs/jexxa_architecture.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ a|`ApplicationCore`
| This package includes your technology-agnostic business application, that is or will be implemented by the developing team.

a|`Infrastructure`
a| This package includes the glue code to bind your technology-agnostic business application to the package `Jexxa-Infrastructure` ir any other third part library.
a| This package includes the glue code implemented by your developing team. It binds your technology-agnostic business application to concrete technology stacks. If you use `Jexxa-Infrastructure` this glue code is an ultra-thin facade.

a|`Jexxa-Infrastructure`
| This package provides implementation of so-called __application infrastructure patterns__ such as transactional outbox or messaging. These components are typically used to implement the application specific `Infrastructure`. Jexxa provides unified access to these components by utilizing the strategy pattern.
Expand All @@ -233,7 +233,7 @@ a| This package includes the core of Jexxa and is responsible for binding the fr

* Bind driving adapter to the application core, or in more detail to the `Inbound Ports` and validate conventions as described in <<Dependency Injection (DI)>>.

* Manages the lifecycle of both ports and adapters. The details are described in Section <<Inversion of Control (IoC)>>.
* Manages the lifecycle of all components. The details are described in Section <<Inversion of Control (IoC)>>.

|===

Expand Down Expand Up @@ -357,7 +357,6 @@ a| Jexxa provides a fast fail approach regarding conventions. The conventions ar

== Inversion of Control (IoC)

=== Dependency Injection (DI)
=== Dependency Injection (DI)

Jexxa provides a simple DI mechanism to instantiate inbound ports of a business application and to inject required dependencies. Within Jexxa we only support _implicit constructor injection_ for following reason:
Expand Down
35 changes: 15 additions & 20 deletions docs/jexxa_architecture.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,17 +464,16 @@ <h1>Jexxa - A hexagonal software architecture for your application</h1>
<li><a href="#_inversion_of_control_ioc">5. Inversion of Control (IoC)</a>
<ul class="sectlevel2">
<li><a href="#_dependency_injection_di">5.1. Dependency Injection (DI)</a></li>
<li><a href="#_dependency_injection_di_2">5.2. Dependency Injection (DI)</a></li>
<li><a href="#_scope">5.3. Scope</a>
<li><a href="#_scope">5.2. Scope</a>
<ul class="sectlevel3">
<li><a href="#_visibility_of_ports_and_adapters">5.3.1. Visibility of Ports and Adapters</a></li>
<li><a href="#_threading">5.3.2. Threading</a></li>
<li><a href="#_allocation_scope_of_dependencies">5.3.3. Allocation scope of Dependencies</a></li>
<li><a href="#_visibility_of_ports_and_adapters">5.2.1. Visibility of Ports and Adapters</a></li>
<li><a href="#_threading">5.2.2. Threading</a></li>
<li><a href="#_allocation_scope_of_dependencies">5.2.3. Allocation scope of Dependencies</a></li>
</ul>
</li>
<li><a href="#_transactions">5.4. Transactions</a>
<li><a href="#_transactions">5.3. Transactions</a>
<ul class="sectlevel3">
<li><a href="#_transaction_outbox_pattern">5.4.1. Transaction Outbox Pattern</a></li>
<li><a href="#_transaction_outbox_pattern">5.3.1. Transaction Outbox Pattern</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -813,7 +812,7 @@ <h2 id="_general_building_blocks"><a class="anchor" href="#_general_building_blo
<p><code>Infrastructure</code></p>
</div></div></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>This package includes the glue code to bind your technology-agnostic business application to the package <code>Jexxa-Infrastructure</code> ir any other third part library.</p>
<p>This package includes the glue code implemented by your developing team. It binds your technology-agnostic business application to concrete technology stacks. If you use <code>Jexxa-Infrastructure</code> this glue code is an ultra-thin facade.</p>
</div></div></td>
</tr>
<tr>
Expand Down Expand Up @@ -841,7 +840,7 @@ <h2 id="_general_building_blocks"><a class="anchor" href="#_general_building_blo
<p>Bind driving adapter to the application core, or in more detail to the <code>Inbound Ports</code> and validate conventions as described in <a href="#_dependency_injection_di">Dependency Injection (DI)</a>.</p>
</li>
<li>
<p>Manages the lifecycle of both ports and adapters. The details are described in Section <a href="#_inversion_of_control_ioc">Inversion of Control (IoC)</a>.</p>
<p>Manages the lifecycle of all components. The details are described in Section <a href="#_inversion_of_control_ioc">Inversion of Control (IoC)</a>.</p>
</li>
</ul>
</div></div></td>
Expand Down Expand Up @@ -1037,10 +1036,6 @@ <h2 id="_inversion_of_control_ioc"><a class="anchor" href="#_inversion_of_contro
<div class="sectionbody">
<div class="sect2">
<h3 id="_dependency_injection_di"><a class="anchor" href="#_dependency_injection_di"></a>5.1. Dependency Injection (DI)</h3>

</div>
<div class="sect2">
<h3 id="_dependency_injection_di_2"><a class="anchor" href="#_dependency_injection_di_2"></a>5.2. Dependency Injection (DI)</h3>
<div class="paragraph">
<p>Jexxa provides a simple DI mechanism to instantiate inbound ports of a business application and to inject required dependencies. Within Jexxa we only support <em>implicit constructor injection</em> for following reason:</p>
</div>
Expand All @@ -1062,18 +1057,18 @@ <h3 id="_dependency_injection_di_2"><a class="anchor" href="#_dependency_injecti
</div>
</div>
<div class="sect2">
<h3 id="_scope"><a class="anchor" href="#_scope"></a>5.3. Scope</h3>
<h3 id="_scope"><a class="anchor" href="#_scope"></a>5.2. Scope</h3>
<div class="paragraph">
<p>Jexxa provides some simple mechanisms to define and control the scopes of ports and adapters which are described in this section.</p>
</div>
<div class="sect3">
<h4 id="_visibility_of_ports_and_adapters"><a class="anchor" href="#_visibility_of_ports_and_adapters"></a>5.3.1. Visibility of Ports and Adapters</h4>
<h4 id="_visibility_of_ports_and_adapters"><a class="anchor" href="#_visibility_of_ports_and_adapters"></a>5.2.1. Visibility of Ports and Adapters</h4>
<div class="paragraph">
<p>By default, you have to tell Jexxa the location of your driven adapter and ports on a package level so that they can be created by Jexxa&#8217;s DI mechanism. This allows an application to specify used ports and adapters on a very fine-grained level.</p>
</div>
</div>
<div class="sect3">
<h4 id="_threading"><a class="anchor" href="#_threading"></a>5.3.2. Threading</h4>
<h4 id="_threading"><a class="anchor" href="#_threading"></a>5.2.2. Threading</h4>
<div class="paragraph">
<p>Currently, Jexxa ensures that only a single thread is active within the application core. This greatly simplifies the development of the application core itself. Furthermore, this approach should be sufficient due to following reasons:</p>
</div>
Expand All @@ -1092,7 +1087,7 @@ <h4 id="_threading"><a class="anchor" href="#_threading"></a>5.3.2. Threading</h
</div>
</div>
<div class="sect3">
<h4 id="_allocation_scope_of_dependencies"><a class="anchor" href="#_allocation_scope_of_dependencies"></a>5.3.3. Allocation scope of Dependencies</h4>
<h4 id="_allocation_scope_of_dependencies"><a class="anchor" href="#_allocation_scope_of_dependencies"></a>5.2.3. Allocation scope of Dependencies</h4>
<div class="paragraph">
<p>The allocation scope defines how many instances of components are created by Jexxa. This is described in <a href="#JexxaScope">Table 6</a>.</p>
</div>
Expand Down Expand Up @@ -1195,15 +1190,15 @@ <h4 id="_allocation_scope_of_dependencies"><a class="anchor" href="#_allocation_
</div>
</div>
<div class="sect2">
<h3 id="_transactions"><a class="anchor" href="#_transactions"></a>5.4. Transactions</h3>
<h3 id="_transactions"><a class="anchor" href="#_transactions"></a>5.3. Transactions</h3>
<div class="paragraph">
<p>Jexxa does not support any two-phase commit protocol for distributed transaction as required when using multiple driven
adapters in a single use case. Traditional enterprise frameworks for example often spawn (by default) a transaction
between the used technology stacks. Main reason was that multiple centralized databases were involved in a single operation that were
even accessed by different applications. Within a microservice, such an approach is an anti-pattern and should be avoided.</p>
</div>
<div class="sect3">
<h4 id="_transaction_outbox_pattern"><a class="anchor" href="#_transaction_outbox_pattern"></a>5.4.1. Transaction Outbox Pattern</h4>
<h4 id="_transaction_outbox_pattern"><a class="anchor" href="#_transaction_outbox_pattern"></a>5.3.1. Transaction Outbox Pattern</h4>
<div class="paragraph">
<p>Instead, a typical business operation reads and updates its own database and publishes at most a domain event. On a technical
layer, you can then use the <a href="https://microservices.io/patterns/data/transactional-outbox.html">transactional outbox pattern</a>
Expand All @@ -1217,7 +1212,7 @@ <h4 id="_transaction_outbox_pattern"><a class="anchor" href="#_transaction_outbo
</div>
<div id="footer">
<div id="footer-text">
Last updated 2023-04-01 08:04:01 +0200
Last updated 2023-04-01 09:52:02 +0200
</div>
</div>
</body>
Expand Down

0 comments on commit 7e9869e

Please sign in to comment.