Artifact [daf162eb74]
Not logged in

Artifact daf162eb7411d9a74069ef1f3e8eb685b3af7fab:

Wiki page [DCI webapp archetype] by timoteo.ponce 2015-02-15 04:20:56.
D 2015-02-15T04:20:56.354
L DCI\swebapp\sarchetype
P 0e1e7f2e229cfe8cc3ed46210253d477c1aa7f31
U timoteo.ponce
W 2414
<h1>DCI webapp archetype</h1>

Web application template written using concepts derived from Data Context and Interactions 
Architecture.
   <center>
   <img src='/doc/tip/doc/img/dci_overview.png' height="200"/>
   </center>

  *  Spring 3
  *  Scala compiler
  *  Database migrations integrated
  *  REST configuration ready
  *  JSF-2 
  *  Jetty configured for running
  *  Compatible with Tomcat 7
  *  Working with JPA-2
  *  Configuration based on annotations and minimal XML files

<h3>References</h3>

  *  [Getting started]
  *  [Example application]
  *  [Concepts and structure]
  *  [Contribute or fork]
  *  [Licensing]

<h2>OO Problem</h2>

OO is defined as a network of objects interacting within each other, this means that all the functionality of an application written in a OO fashion will be separated and partitioned into multiple responsibilities in many different objects.

Now, this doesn't match what developers and users expect from the system, it doesn't map to the end user's goals and as it grows tends to increase complexity, side effects and therefore risks.

For example, having a simple network with objects A, B, C, B performing an operation:

   <center>
   <img src='/doc/tip/doc/img/oo_problems_01.png' height="200"/>
   </center>

Simple connections, no major issues, now we have a different functionality spread in the same network of objects:
   
    <center>
   <img src='/doc/tip/doc/img/oo_problems_02.png' height="200"/>
   </center>

Can you tell by the objects what do they do? or do you need to explore the network of objects and relationships to see what is currently being done here?

    <center>
   <img src='/doc/tip/doc/img/oo_problems_03.png' height="150"/>
   </center>

There is no functionality in objects, only methods, message passing has been moved to be a second class citizen, this breaks reading, this breaks support tasks and increases complexity.

<h2>DCI</h2>

DCI is an architectural pattern that brings back objects communication to a first class citizen, moving responsibilities to roles and returning data to its original purposes, mostly domain-specific data structures capturing specific business rules in a defined context.

Using this approach we have with the same example of OO:

    <center>
   <img src='/doc/tip/doc/img/dci_for_oo_problems_01.png' height="400"/>
   </center>
Z 5370a4238ddcbec3a2eae4f688bebecf