Modified: zest/site/content/java/develop/website.html
URL: 
http://svn.apache.org/viewvc/zest/site/content/java/develop/website.html?rev=1689843&r1=1689842&r2=1689843&view=diff
==============================================================================
--- zest/site/content/java/develop/website.html (original)
+++ zest/site/content/java/develop/website.html Wed Jul  8 11:08:41 2015
@@ -48,16 +48,18 @@
 <script type="text/javascript" src="js/tablestyler.js"></script>
 
 
-</head><body><div xml:lang="en" class="article" lang="en"><div 
class="titlepage"><hr /></div><div class="toc"><p><strong>Table of 
Contents</strong></p><dl><dt><span class="section"><a href="#home">1. 
Qi4j</a></span></dt><dd><dl><dt><span class="section"><a 
href="#_what_is_qi4j">1.1. What is Qi4j™?</a></span></dt></dl></dd><dt><span 
class="section"><a href="#intro">2. 
Introduction</a></span></dt><dd><dl><dt><span class="section"><a 
href="#highlights">2.1. Highligts</a></span></dt><dt><span class="section"><a 
href="#introduction-background">2.2. Background</a></span></dt><dt><span 
class="section"><a href="#what-is-cop">2.3. What is 
COP?</a></span></dt><dt><span class="section"><a 
href="#what-s-an-object-anyway">2.4. What’s an Object 
anyway?</a></span></dt><dt><span class="section"><a href="#state-modeling">2.5. 
Qi4j and state modeling</a></span></dt><dt><span class="section"><a 
href="#related">2.6. Related publications &amp; 
projects</a></span></dt></dl></dd><dt><span class=
 "section"><a href="#tutorials">3. Tutorials</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview">3.1. Overview</a></span></dt><dt><span 
class="section"><a href="#two-minutes-intro">3.2. Qi4j in 2 
minutes</a></span></dt><dt><span class="section"><a 
href="#ten-minutes-intro">3.3. Qi4j in 10 minutes</a></span></dt><dt><span 
class="section"><a href="#thirty-minutes-intro">3.4. Qi4j in 30 
minutes</a></span></dt><dt><span class="section"><a 
href="#two-hours-intro">3.5. Qi4j in 2 hours</a></span></dt><dt><span 
class="section"><a href="#howto-depend-on-qi4j">3.6. Depend on Qi4j in your 
build</a></span></dt><dt><span class="section"><a 
href="#howto-assemble-application">3.7. Assemble an 
Application</a></span></dt><dt><span class="section"><a 
href="#tut-composites">3.8. Transient Composites 
Tutorial</a></span></dt><dt><span class="section"><a href="#tut-services">3.9. 
Services Composites Tutorial</a></span></dt><dt><span class="section"><a 
href="#howto-contextual-fragments">3
 .10. Use contextual fragments</a></span></dt><dt><span class="section"><a 
href="#howto-leverage-properties">3.11. Leverage 
Properties</a></span></dt><dt><span class="section"><a 
href="#howto-create-constraint">3.12. Create a 
Constraint</a></span></dt><dt><span class="section"><a 
href="#howto-create-concern">3.13. Create a Concern</a></span></dt><dt><span 
class="section"><a href="#howto-create-sideeffect">3.14. Create a 
SideEffect</a></span></dt><dt><span class="section"><a 
href="#howto-create-entity">3.15. Create an Entity</a></span></dt><dt><span 
class="section"><a href="#howto-configure-service">3.16. Configure a 
Service</a></span></dt><dt><span class="section"><a 
href="#howto-invocation-annotation">3.17. Use 
@Invocation</a></span></dt><dt><span class="section"><a 
href="#howto-use-io">3.18. Use I/O API</a></span></dt><dt><span 
class="section"><a href="#build-system">3.19. Build 
System</a></span></dt><dt><span class="section"><a href="#community-docs">3.20. 
Writing Qi4j Documentati
 on</a></span></dt></dl></dd><dt><span class="section"><a href="#javadocs">4. 
Javadoc</a></span></dt><dd><dl><dt><span class="section"><a 
href="#_javadocs">4.1. JavaDocs</a></span></dt></dl></dd><dt><span 
class="section"><a href="#samples">5. Samples</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview_2">5.1. Overview</a></span></dt><dt><span 
class="section"><a href="#sample-dci">5.2. DCI Sample</a></span></dt><dt><span 
class="section"><a href="#sample-dci-cargo">5.3. DCI Cargo 
Sample</a></span></dt><dt><span class="section"><a href="#sample-forum">5.4. 
Forum Sample</a></span></dt><dt><span class="section"><a 
href="#sample-car-rental">5.5. Car Rental Sample</a></span></dt><dt><span 
class="section"><a href="#sample-sql-support">5.6. SQL Support 
Sample</a></span></dt><dt><span class="section"><a href="#sample-swing">5.7. 
Swing Bindings Sample</a></span></dt></dl></dd><dt><span class="section"><a 
href="#core">6. Core</a></span></dt><dd><dl><dt><span class="section"><a h
 ref="#_overview_3">6.1. Overview</a></span></dt><dt><span class="section"><a 
href="#core-api">6.2. Core API</a></span></dt><dt><span class="section"><a 
href="#core-bootstrap-assembly">6.3. Core Bootstrap</a></span></dt><dt><span 
class="section"><a href="#core-testsupport">6.4. Core Test 
Support</a></span></dt><dt><span class="section"><a 
href="#core-functional">6.5. Core Functional API</a></span></dt><dt><span 
class="section"><a href="#core-io">6.6. Core I/O API</a></span></dt><dt><span 
class="section"><a href="#core-spi">6.7. Core Extension 
SPI</a></span></dt><dt><span class="section"><a href="#core-runtime">6.8. Core 
Runtime</a></span></dt></dl></dd><dt><span class="section"><a 
href="#libraries">7. Libraries</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview_5">7.1. Overview</a></span></dt><dt><span 
class="section"><a href="#library-alarm">7.2. Alarms</a></span></dt><dt><span 
class="section"><a href="#library-circuitbreaker">7.3. Circuit 
Breaker</a></span></dt><d
 t><span class="section"><a href="#library-constraints">7.4. 
Constraints</a></span></dt><dt><span class="section"><a 
href="#library-conversion">7.5. Conversion</a></span></dt><dt><span 
class="section"><a href="#library-eventsourcing">7.6. Event 
Sourcing</a></span></dt><dt><span class="section"><a 
href="#library-eventsourcing-jdbm">7.7. Event Sourcing - 
JDBM</a></span></dt><dt><span class="section"><a 
href="#library-eventsourcing-rest">7.8. Event Sourcing - 
ReST</a></span></dt><dt><span class="section"><a 
href="#library-fileconfig">7.9. FileConfig</a></span></dt><dt><span 
class="section"><a href="#library-http">7.10. HTTP</a></span></dt><dt><span 
class="section"><a href="#library-invocation-cache">7.11. Invocation 
Cache</a></span></dt><dt><span class="section"><a href="#library-jmx">7.12. 
JMX</a></span></dt><dt><span class="section"><a href="#library-locking">7.13. 
Locking</a></span></dt><dt><span class="section"><a 
href="#library-logging">7.14. Logging</a></span></dt><dt><span class=
 "section"><a href="#library-osgi">7.15. OSGi</a></span></dt><dt><span 
class="section"><a href="#library-rdf">7.16. RDF</a></span></dt><dt><span 
class="section"><a href="#library-rest-client">7.17. ReST 
Client</a></span></dt><dt><span class="section"><a 
href="#library-rest-client-primer">7.18. ReST - HATEOAS 
Primer</a></span></dt><dt><span class="section"><a 
href="#library-rest-common">7.19. ReST Common</a></span></dt><dt><span 
class="section"><a href="#library-rest-server">7.20. ReST 
Server</a></span></dt><dt><span class="section"><a 
href="#library-scheduler">7.21. Scheduler</a></span></dt><dt><span 
class="section"><a href="#library-script-groovy">7.22. Groovy 
Scripting</a></span></dt><dt><span class="section"><a 
href="#library-script-javascript">7.23. Javascript 
Scripting</a></span></dt><dt><span class="section"><a href="#lang-scala">7.24. 
Scala Support</a></span></dt><dt><span class="section"><a 
href="#library-servlet">7.25. Servlet</a></span></dt><dt><span 
class="section"><a href
 ="#library-shiro">7.26. Shiro Security</a></span></dt><dt><span 
class="section"><a href="#library-shiro-web">7.27. Shiro Web 
Security</a></span></dt><dt><span class="section"><a 
href="#library-spring">7.28. Spring Integration</a></span></dt><dt><span 
class="section"><a href="#library-sql">7.29. SQL</a></span></dt><dt><span 
class="section"><a href="#library-uid">7.30. UID</a></span></dt><dt><span 
class="section"><a href="#library-uowfile">7.31. 
UoWFile</a></span></dt></dl></dd><dt><span class="section"><a 
href="#extensions">8. Extensions</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview_7">8.1. Overview</a></span></dt><dt><span 
class="section"><a href="#extension-vs-orgjson">8.2. org.json 
ValueSerialization</a></span></dt><dt><span class="section"><a 
href="#extension-vs-jackson">8.3. Jackson 
ValueSerialization</a></span></dt><dt><span class="section"><a 
href="#extension-vs-stax">8.4. StAX ValueSerialization</a></span></dt><dt><span 
class="section"><a href="#extensi
 on-cache-ehcache">8.5. Ehcache Cache</a></span></dt><dt><span 
class="section"><a href="#extension-cache-memcache">8.6. Memcache 
Cache</a></span></dt><dt><span class="section"><a 
href="#extension-es-memory">8.7. Memory EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-file">8.8. File 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-hazelcast">8.9. Hazelcast 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-jclouds">8.10. JClouds EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-jdbm">8.11. JDBM 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-leveldb">8.12. LevelDB EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-mongodb">8.13. MongoDB 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-preferences">8.14. Preferences 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-redis">8.15.
  Redis EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-riak">8.16. Riak EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-sql">8.17. SQL 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-voldemort">8.18. Voldemort 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-index-elasticsearch">8.19. ElasticSearch 
Index/Query</a></span></dt><dt><span class="section"><a 
href="#extension-index-rdf">8.20. OpenRDF Index/Query</a></span></dt><dt><span 
class="section"><a href="#extension-index-solr">8.21. Apache Solr 
Index/Query</a></span></dt><dt><span class="section"><a 
href="#extension-indexing-sql">8.22. SQL Index/Query</a></span></dt><dt><span 
class="section"><a href="#extension-metrics-yammer">8.23. Yammer 
Metrics</a></span></dt><dt><span class="section"><a 
href="#extension-migration">8.24. Migration</a></span></dt><dt><span 
class="section"><a href="#extension-reindexer">8.25. Reindexer</a></
 span></dt></dl></dd><dt><span class="section"><a href="#tools">9. 
Tools</a></span></dt><dd><dl><dt><span class="section"><a 
href="#_overview_8">9.1. Overview</a></span></dt><dt><span class="section"><a 
href="#tools-envisage">9.2. Envisage</a></span></dt></dl></dd><dt><span 
class="section"><a href="#glossary">10. Glossary 
</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h2 class="title" style="clear: both"><a id="home"></a>1. 
Qi4j</h2></div></div></div><div class="toc"><dl><dt><span class="section"><a 
href="#_what_is_qi4j">1.1. What is Qi4j™?</a></span></dt></dl></div><div 
class="important" style="margin-left: 0; margin-right: 10%;"><table border="0" 
summary="Important"><tr><td rowspan="2" align="center" valign="top" 
width="25"><img alt="[Important]" src="images/icons/admon/important.png" 
/></td><th align="left">Important</th></tr><tr><td align="left" valign="top"
 ><p>This is the documentation for <span class="strong"><strong>Qi4j 
 >0</strong></span>. Use the version switcher on the left to browse other
-versions documentation.</p></td></tr></table></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h3 class="title"><a 
id="_what_is_qi4j"></a>1.1. What is Qi4j™?</h3></div></div></div><p>The 
short answer is that Qi4j™ is a framework for domain centric application 
development, including evolved concepts
-from <a class="ulink" 
href="http://en.wikipedia.org/wiki/Aspect-oriented_programming"; 
target="_top">AOP</a>,
-<a class="ulink" href="http://en.wikipedia.org/wiki/Dependency_injection"; 
target="_top">DI</a> and <a class="ulink" 
href="http://en.wikipedia.org/wiki/Domain-driven_design"; 
target="_top">DDD</a>.</p><p>Qi4j™ is an implementation of Composite Oriented 
Programming, using the standard Java platform, without the use of
+</head><body><div xml:lang="en" class="article" lang="en"><div 
class="titlepage"><hr /></div><div class="toc"><p><strong>Table of 
Contents</strong></p><dl><dt><span class="section"><a href="#home">1. 
Zest™</a></span></dt><dd><dl><dt><span class="section"><a 
href="#_what_is_apache_zest">1.1. What is Apache Zest™ 
?</a></span></dt><dt><span class="section"><a href="#_brief_history">1.2. Brief 
History</a></span></dt></dl></dd><dt><span class="section"><a href="#intro">2. 
Introduction</a></span></dt><dd><dl><dt><span class="section"><a 
href="#highlights">2.1. Highligts</a></span></dt><dt><span class="section"><a 
href="#introduction-background">2.2. Background</a></span></dt><dt><span 
class="section"><a href="#what-is-cop">2.3. What is 
COP?</a></span></dt><dt><span class="section"><a 
href="#what-s-an-object-anyway">2.4. What’s an Object 
anyway?</a></span></dt><dt><span class="section"><a href="#state-modeling">2.5. 
Zest™ and state modeling</a></span></dt><dt><span clas
 s="section"><a href="#related">2.6. Related publications &amp; 
projects</a></span></dt></dl></dd><dt><span class="section"><a 
href="#tutorials">3. Tutorials</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview">3.1. Overview</a></span></dt><dt><span 
class="section"><a href="#two-minutes-intro">3.2. Zest™ in 2 
minutes</a></span></dt><dt><span class="section"><a 
href="#ten-minutes-intro">3.3. Zest™ in 10 minutes</a></span></dt><dt><span 
class="section"><a href="#thirty-minutes-intro">3.4. Zest™ in 30 
minutes</a></span></dt><dt><span class="section"><a 
href="#two-hours-intro">3.5. Zest™ in 2 hours</a></span></dt><dt><span 
class="section"><a href="#howto-depend-on-qi4j">3.6. Depend on Zest™ in your 
build</a></span></dt><dt><span class="section"><a 
href="#howto-assemble-application">3.7. Assemble an 
Application</a></span></dt><dt><span class="section"><a 
href="#tut-composites">3.8. Transient Composites 
Tutorial</a></span></dt><dt><span class="sect
 ion"><a href="#tut-services">3.9. Services Composites 
Tutorial</a></span></dt><dt><span class="section"><a 
href="#howto-contextual-fragments">3.10. Use contextual 
fragments</a></span></dt><dt><span class="section"><a 
href="#howto-leverage-properties">3.11. Leverage 
Properties</a></span></dt><dt><span class="section"><a 
href="#howto-create-constraint">3.12. Create a 
Constraint</a></span></dt><dt><span class="section"><a 
href="#howto-create-concern">3.13. Create a Concern</a></span></dt><dt><span 
class="section"><a href="#howto-create-sideeffect">3.14. Create a 
SideEffect</a></span></dt><dt><span class="section"><a 
href="#howto-create-entity">3.15. Create an Entity</a></span></dt><dt><span 
class="section"><a href="#howto-configure-service">3.16. Configure a 
Service</a></span></dt><dt><span class="section"><a 
href="#howto-invocation-annotation">3.17. Use 
@Invocation</a></span></dt><dt><span class="section"><a 
href="#howto-use-io">3.18. Use I/O API</a></span></dt><dt><span class="sectio
 n"><a href="#build-system">3.19. Build System</a></span></dt><dt><span 
class="section"><a href="#community-docs">3.20. Writing Zest™ 
Documentation</a></span></dt></dl></dd><dt><span class="section"><a 
href="#javadocs">4. Javadoc</a></span></dt><dd><dl><dt><span class="section"><a 
href="#_javadocs">4.1. JavaDocs</a></span></dt></dl></dd><dt><span 
class="section"><a href="#samples">5. Samples</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview_2">5.1. Overview</a></span></dt><dt><span 
class="section"><a href="#sample-dci">5.2. DCI Sample</a></span></dt><dt><span 
class="section"><a href="#sample-dci-cargo">5.3. DCI Cargo 
Sample</a></span></dt><dt><span class="section"><a href="#sample-forum">5.4. 
Forum Sample</a></span></dt><dt><span class="section"><a 
href="#sample-car-rental">5.5. Car Rental Sample</a></span></dt><dt><span 
class="section"><a href="#sample-sql-support">5.6. SQL Support 
Sample</a></span></dt><dt><span class="section"><a href="#sample-swing">5.7. S
 wing Bindings Sample</a></span></dt></dl></dd><dt><span class="section"><a 
href="#core">6. Core</a></span></dt><dd><dl><dt><span class="section"><a 
href="#_overview_3">6.1. Overview</a></span></dt><dt><span class="section"><a 
href="#core-api">6.2. Core API</a></span></dt><dt><span class="section"><a 
href="#core-bootstrap-assembly">6.3. Core Bootstrap</a></span></dt><dt><span 
class="section"><a href="#core-testsupport">6.4. Core Test 
Support</a></span></dt><dt><span class="section"><a 
href="#core-functional">6.5. Core Functional API</a></span></dt><dt><span 
class="section"><a href="#core-io">6.6. Core I/O API</a></span></dt><dt><span 
class="section"><a href="#core-spi">6.7. Core Extension 
SPI</a></span></dt><dt><span class="section"><a href="#core-runtime">6.8. Core 
Runtime</a></span></dt></dl></dd><dt><span class="section"><a 
href="#libraries">7. Libraries</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview_5">7.1. Overview</a></span></dt><dt><span 
class="section"><
 a href="#library-alarm">7.2. Alarms</a></span></dt><dt><span 
class="section"><a href="#library-circuitbreaker">7.3. Circuit 
Breaker</a></span></dt><dt><span class="section"><a 
href="#library-constraints">7.4. Constraints</a></span></dt><dt><span 
class="section"><a href="#library-conversion">7.5. 
Conversion</a></span></dt><dt><span class="section"><a 
href="#library-eventsourcing">7.6. Event Sourcing</a></span></dt><dt><span 
class="section"><a href="#library-eventsourcing-jdbm">7.7. Event Sourcing - 
JDBM</a></span></dt><dt><span class="section"><a 
href="#library-eventsourcing-rest">7.8. Event Sourcing - 
ReST</a></span></dt><dt><span class="section"><a 
href="#library-fileconfig">7.9. FileConfig</a></span></dt><dt><span 
class="section"><a href="#library-http">7.10. HTTP</a></span></dt><dt><span 
class="section"><a href="#library-invocation-cache">7.11. Invocation 
Cache</a></span></dt><dt><span class="section"><a href="#library-jmx">7.12. 
JMX</a></span></dt><dt><span class="section"><a hr
 ef="#library-locking">7.13. Locking</a></span></dt><dt><span 
class="section"><a href="#library-logging">7.14. 
Logging</a></span></dt><dt><span class="section"><a href="#library-osgi">7.15. 
OSGi</a></span></dt><dt><span class="section"><a href="#library-rdf">7.16. 
RDF</a></span></dt><dt><span class="section"><a 
href="#library-rest-client">7.17. ReST Client</a></span></dt><dt><span 
class="section"><a href="#library-rest-client-primer">7.18. ReST - HATEOAS 
Primer</a></span></dt><dt><span class="section"><a 
href="#library-rest-common">7.19. ReST Common</a></span></dt><dt><span 
class="section"><a href="#library-rest-server">7.20. ReST 
Server</a></span></dt><dt><span class="section"><a 
href="#library-scheduler">7.21. Scheduler</a></span></dt><dt><span 
class="section"><a href="#library-script-groovy">7.22. Groovy 
Scripting</a></span></dt><dt><span class="section"><a 
href="#library-script-javascript">7.23. Javascript 
Scripting</a></span></dt><dt><span class="section"><a href="#lang-scala">7
 .24. Scala Support</a></span></dt><dt><span class="section"><a 
href="#library-servlet">7.25. Servlet</a></span></dt><dt><span 
class="section"><a href="#library-shiro">7.26. Shiro 
Security</a></span></dt><dt><span class="section"><a 
href="#library-shiro-web">7.27. Shiro Web Security</a></span></dt><dt><span 
class="section"><a href="#library-spring">7.28. Spring 
Integration</a></span></dt><dt><span class="section"><a 
href="#library-sql">7.29. SQL</a></span></dt><dt><span class="section"><a 
href="#library-uid">7.30. UID</a></span></dt><dt><span class="section"><a 
href="#library-uowfile">7.31. UoWFile</a></span></dt></dl></dd><dt><span 
class="section"><a href="#extensions">8. 
Extensions</a></span></dt><dd><dl><dt><span class="section"><a 
href="#_overview_7">8.1. Overview</a></span></dt><dt><span class="section"><a 
href="#extension-vs-orgjson">8.2. org.json 
ValueSerialization</a></span></dt><dt><span class="section"><a 
href="#extension-vs-jackson">8.3. Jackson ValueSerialization</a></spa
 n></dt><dt><span class="section"><a href="#extension-vs-stax">8.4. StAX 
ValueSerialization</a></span></dt><dt><span class="section"><a 
href="#extension-cache-ehcache">8.5. Ehcache Cache</a></span></dt><dt><span 
class="section"><a href="#extension-cache-memcache">8.6. Memcache 
Cache</a></span></dt><dt><span class="section"><a 
href="#extension-es-memory">8.7. Memory EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-file">8.8. File 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-hazelcast">8.9. Hazelcast 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-jclouds">8.10. JClouds EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-jdbm">8.11. JDBM 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-leveldb">8.12. LevelDB EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-mongodb">8.13. MongoDB 
EntityStore</a></span></dt><dt><span class="se
 ction"><a href="#extension-es-preferences">8.14. Preferences 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-redis">8.15. Redis EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-riak">8.16. Riak 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-es-sql">8.17. SQL EntityStore</a></span></dt><dt><span 
class="section"><a href="#extension-es-voldemort">8.18. Voldemort 
EntityStore</a></span></dt><dt><span class="section"><a 
href="#extension-index-elasticsearch">8.19. ElasticSearch 
Index/Query</a></span></dt><dt><span class="section"><a 
href="#extension-index-rdf">8.20. OpenRDF Index/Query</a></span></dt><dt><span 
class="section"><a href="#extension-index-solr">8.21. Apache Solr 
Index/Query</a></span></dt><dt><span class="section"><a 
href="#extension-indexing-sql">8.22. SQL Index/Query</a></span></dt><dt><span 
class="section"><a href="#extension-metrics-yammer">8.23. Yammer 
Metrics</a></span></dt><dt><span class="
 section"><a href="#extension-migration">8.24. 
Migration</a></span></dt><dt><span class="section"><a 
href="#extension-reindexer">8.25. Reindexer</a></span></dt></dl></dd><dt><span 
class="section"><a href="#tools">9. Tools</a></span></dt><dd><dl><dt><span 
class="section"><a href="#_overview_8">9.1. Overview</a></span></dt><dt><span 
class="section"><a href="#tools-envisage">9.2. 
Envisage</a></span></dt></dl></dd><dt><span class="section"><a 
href="#glossary">10. Glossary </a></span></dt></dl></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h2 class="title" 
style="clear: both"><a id="home"></a>1. Zest™</h2></div></div></div><div 
class="toc"><dl><dt><span class="section"><a href="#_what_is_apache_zest">1.1. 
What is Apache Zest™ ?</a></span></dt><dt><span class="section"><a 
href="#_brief_history">1.2. Brief History</a></span></dt></dl></div><div 
class="important" style="margin-left: 
 0; margin-right: 10%;"><table border="0" summary="Important"><tr><td 
rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" 
src="images/icons/admon/important.png" /></td><th 
align="left">Important</th></tr><tr><td align="left" valign="top"><p>This is 
the documentation for <span class="strong"><strong>Zest™ 0</strong></span>. 
Use the version switcher on the left to browse other
+versions documentation.</p></td></tr></table></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h3 class="title"><a 
id="_what_is_apache_zest"></a>1.1. What is Apache Zest™ 
?</h3></div></div></div><p>The short answer is that Apache Zest™ is a 
framework for domain centric application development, including evolved
+concepts from <a class="ulink" 
href="http://en.wikipedia.org/wiki/Aspect-oriented_programming"; 
target="_top">AOP</a>,
+<a class="ulink" href="http://en.wikipedia.org/wiki/Dependency_injection"; 
target="_top">DI</a> and <a class="ulink" 
href="http://en.wikipedia.org/wiki/Domain-driven_design"; 
target="_top">DDD</a>.</p><p>Zest™ is an implementation of Composite Oriented 
Programming, using the standard Java platform, without the use of
 any pre-processors or new language elements. Everything you know from Java 
still applies and you can leverage both
-your experience and toolkits to become more productive with Composite Oriented 
Programming today.</p><p>Moreover, Qi4j™ enables Composite Oriented 
Programming on the Java platform, including both Java and Scala as primary
-languages as well as many of the plethora of languages running on the JVM as 
bridged languages.</p><p><span class="inlinemediaobject"><img 
src="images/intro-qi.png" alt="Qi" /></span></p><p>Qi4j™ is pronounced "chee 
for jay". This website is out of scope to explain the many
+your experience and toolkits to become more productive with Composite Oriented 
Programming today.</p><p>Moreover, Zest™ enables Composite Oriented 
Programming on the Java platform, including both Java and Scala as primary
+languages as well as many of the plethora of languages running on the JVM as 
bridged languages.</p><p>We strongly recommend the <a class="link" 
href="#intro" title="2. Introduction">introduction</a> section.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h3 class="title"><a 
id="_brief_history"></a>1.2. Brief History</h3></div></div></div><p>Apache 
Zest™ started its life in 2007 as Qi4j™, initially at OPS4J’s 
infrastructure and later on GitHub.
+In March 2015, Apache Zest™ was created with the Qi4j™ codebase as the 
base, existing Apache Members as the
+bootstrap Project Management Committee (PMC).</p><p><span 
class="inlinemediaobject"><img src="images/intro-qi.png" alt="Qi" 
/></span></p><p>Qi4j™ is pronounced "chee for jay". This website is out of 
scope to explain the many
 facets and history of Qi, so we refer the interested to read the <a 
class="ulink" href="http://en.wikipedia.org/wiki/Qi"; target="_top">lengthy 
article</a> at
 Wikipedia. For us, Qi is the force/energy within the body, in this case the 
Java platform. Something that makes Java
-so much better, if it is found and channeled into a greater good.</p><p>We 
strongly recommend the <a class="link" href="#intro" title="2. 
Introduction">introduction</a> section.</p></div></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h2 class="title" style="clear: 
both"><a id="intro"></a>2. Introduction</h2></div></div></div><div 
class="toc"><dl><dt><span class="section"><a href="#highlights">2.1. 
Highligts</a></span></dt><dt><span class="section"><a 
href="#introduction-background">2.2. Background</a></span></dt><dt><span 
class="section"><a href="#what-is-cop">2.3. What is 
COP?</a></span></dt><dt><span class="section"><a 
href="#what-s-an-object-anyway">2.4. What’s an Object 
anyway?</a></span></dt><dt><span class="section"><a href="#state-modeling">2.5. 
Qi4j and state modeling</a></span></dt><dt><span class="section"><a 
href="#related">2.6. Related publications &amp; projects</a></s
 pan></dt></dl></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h3 class="title"><a id="highlights"></a>2.1. 
Highligts</h3></div></div></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_principles"></a>Principles</h4></div></div></div><p>Composite Oriented 
Programming builds on some principles that are not addressed by Object Oriented 
Programming at all.</p><div class="itemizedlist"><ul class="itemizedlist" 
type="disc"><li class="listitem">
+so much better, if it is found and channeled into a greater 
good.</p></div></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm132692182224">Return to 
top</a></p><div><h2 class="title" style="clear: both"><a id="intro"></a>2. 
Introduction</h2></div></div></div><div class="toc"><dl><dt><span 
class="section"><a href="#highlights">2.1. Highligts</a></span></dt><dt><span 
class="section"><a href="#introduction-background">2.2. 
Background</a></span></dt><dt><span class="section"><a href="#what-is-cop">2.3. 
What is COP?</a></span></dt><dt><span class="section"><a 
href="#what-s-an-object-anyway">2.4. What’s an Object 
anyway?</a></span></dt><dt><span class="section"><a href="#state-modeling">2.5. 
Zest™ and state modeling</a></span></dt><dt><span class="section"><a 
href="#related">2.6. Related publications &amp; 
projects</a></span></dt></dl></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a hre
 f="#idm132692182224">Return to top</a></p><div><h3 class="title"><a 
id="highlights"></a>2.1. Highligts</h3></div></div></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_principles"></a>Principles</h4></div></div></div><p>Composite Oriented 
Programming builds on some principles that are not addressed by Object Oriented 
Programming at all.</p><div class="itemizedlist"><ul class="itemizedlist" 
type="disc"><li class="listitem">
 Behavior depends on Context
 </li><li class="listitem">
 Decoupling is a virtue
@@ -65,7 +67,7 @@ Decoupling is a virtue
 Business Rules matters more.
 </li><li class="listitem">
 Classes are dead, long live interfaces.
-</li></ul></div><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm9305972064">Return to top</a></p><div><h5 
class="title"><a id="_behavior_depends_on_context"></a>Behavior Depends on 
Context</h5></div></div></div><p>Many objects has life cycles that are more 
extensive than the simple model that Object Oriented Programming model wants
+</li></ul></div><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm132692182224">Return to top</a></p><div><h5 
class="title"><a id="_behavior_depends_on_context"></a>Behavior Depends on 
Context</h5></div></div></div><p>Many objects has life cycles that are more 
extensive than the simple model that Object Oriented Programming model wants
 us to believe. A few simple examples;</p><div class="itemizedlist"><ul 
class="itemizedlist" type="disc"><li class="listitem">
 An egg becomes a chicken which in turn becomes food.
 </li><li class="listitem">
@@ -80,48 +82,48 @@ that Person may live on for a long time.
 LivingPerson class to a DeadPerson class. In Composite Oriented Programming, 
it is the same object with different
 behavior.</p><p>We think that one of the the main flaws in OOP is that it is 
not object oriented at all, but in fact class oriented.
 Class is the first class citizen that objects are derived from. Not objects 
being the first-class citizen to which
-one or many classes are assigned.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h5 class="title"><a 
id="_decoupling_is_virtue"></a>Decoupling is 
Virtue</h5></div></div></div><p>Decoupling is more important than developers in 
general think. If you could have every OOP class decoupled from all
+one or many classes are assigned.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h5 class="title"><a 
id="_decoupling_is_virtue"></a>Decoupling is 
Virtue</h5></div></div></div><p>Decoupling is more important than developers in 
general think. If you could have every OOP class decoupled from all
 other classes, it is easy to re-use that class. But when that class references 
another class and the chain never ends,
 your chances of re-use diminishes quickly.</p><p>Object Oriented Programming 
is suffering a lot from this, and many mechanisms have been introduced over 
time to counter
 this problem. But in reality, the best we can manage is subsystems of 
functionality, which client code can re-use. And
 these subsystems tend to be infrastructure related, since domain models are 
less prone to be similar enough from one
 project to the next, and since OOP in reality constrains the the re-use of 
individual domain classes, we need to re-do
-the domain model from scratch ever time.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h5 class="title"><a 
id="_business_rules_matters_more"></a>Business Rules matters 
more</h5></div></div></div><p>Smart developers often think that low-level, 
infrastructure and framework code is more important and more cool to work
+the domain model from scratch ever time.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h5 class="title"><a 
id="_business_rules_matters_more"></a>Business Rules matters 
more</h5></div></div></div><p>Smart developers often think that low-level, 
infrastructure and framework code is more important and more cool to work
 with, than the simple domain model. But in reality, it is the Domain Model 
that reflects the actual need  and pays the
 bills. Infrastructure is just a necessary evil to get things done.</p><p>If 
most developers could focus on the Business Rules and Domain Model, and not 
having to worry about any infrastructure
 issues, such as persistence, transactions, security or the framework housing 
it all, the productivity would surge. Eric
 Evans has written an excellent book about Domain Driven Design, where he goes 
through the real process that makes the
 money for companies. However, it is very hard to follow that book, since one 
is constantly caught up in constraints
-irrelevant to the domain model, introduced by the underlying framework, from 
the so called smart developers.</p><p><span class="inlinemediaobject"><img 
src="images/classes-are-dead.gif" alt="classes-are-dead.gif" 
/></span></p><p>Qi4j™ is trying to address the flaws of OOP and introduce 
Composite Oriented Programming to the world, without
-introducing new programming languages, or awkward constructs. Heck, we don’t 
even use any XML.</p><p>Qi4j™ is not a framework. It is a new way to write 
code. Other people might create frameworks using Qi4j™, or create a
-framework optimized for Qi4j™, but here at Qi4j™ we concentrate to make 
Qi4j™ behave well in existing frameworks,
-application servers, platforms and environments.</p><p>You are to embark on a 
new journey. Enjoy!</p></div></div></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h3 class="title"><a 
id="introduction-background"></a>2.2. Background</h3></div></div></div><p>Qi4j 
is the first Composite Oriented Programming implementation leveraging the Java 
5 platform, so that everything you
-know from Java 5 still applies. You can mix Qi4j with your ordinary Java code 
as much as you want. All your existing
-Java tools works just like before, and Qi4j does not introduce any new 
programming language, no special development
-tools needed and no XML is required.</p><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_purpose"></a>Purpose</h4></div></div></div><p>Qi4j addresses the 
programming problems from the top-down, starting with the Domain Model and 
Business Rules needs,
+irrelevant to the domain model, introduced by the underlying framework, from 
the so called smart developers.</p><p><span class="inlinemediaobject"><img 
src="images/classes-are-dead.gif" alt="classes-are-dead.gif" 
/></span></p><p>Zest™ is trying to address the flaws of OOP and introduce 
Composite Oriented Programming to the world, without
+introducing new programming languages, or awkward constructs. Heck, we don’t 
even use any XML.</p><p>Zest™ is not a framework. It is a new way to write 
code. Other people might create frameworks using Zest™, or create a
+framework optimized for Zest™, but here at Zest™ we concentrate to make 
Zest™ behave well in existing frameworks,
+application servers, platforms and environments.</p><p>You are to embark on a 
new journey. Enjoy!</p></div></div></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h3 class="title"><a 
id="introduction-background"></a>2.2. 
Background</h3></div></div></div><p>Zest™ is the first Composite Oriented 
Programming implementation leveraging the Java 5 platform, so that everything 
you
+know from Java 5 still applies. You can mix Zest™ with your ordinary Java 
code as much as you want. All your existing
+Java tools works just like before, and Zest™ does not introduce any new 
programming language, no special development
+tools needed and no XML is required.</p><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_purpose"></a>Purpose</h4></div></div></div><p>Zest™ addresses the 
programming problems from the top-down, starting with the Domain Model and 
Business Rules needs,
 and let those requirements flow downwards in the software stack and dictate 
the requirements for underlying layers
 such as persistence, messaging, querying and more. This means that the 
business value developer is left to
 concentrate on the domain models and the actual application bringing the 
value, instead of creating massive amounts
-of glue code to tie underlying technologies together.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_problem_descriptions"></a>Problem 
Descriptions</h4></div></div></div><p>Qi4j didn’t appear out of the blue, 
when the founders of the project had nothing better to do. It is the result of
+of glue code to tie underlying technologies together.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_problem_descriptions"></a>Problem 
Descriptions</h4></div></div></div><p>Zest™ didn’t appear out of the blue, 
when the founders of the project had nothing better to do. It is the result of
 observation of problems in real applications, and the experience from previous 
attempts to address or correct these
-problems, that has led to the Qi4j vision.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_object_oriented_programming_oop"></a>Object Oriented Programming 
(OOP)</h4></div></div></div><p>How can OOP be a problem? We and others have 
observed that there is a fundamental flaw in the OOP model. In fact, we
+problems, that has led to the Zest™ vision.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_object_oriented_programming_oop"></a>Object Oriented Programming 
(OOP)</h4></div></div></div><p>How can OOP be a problem? We and others have 
observed that there is a fundamental flaw in the OOP model. In fact, we
 would like to even state that OOP as it is commonly practiced today is not 
object oriented at all. The object is not
 the primary citizen, instead the class is the primary artifact. In most 
mainstream OOP languages, Objects are derived
 from classes, not that classes are assigned to created objects. Therefore, we 
think it should have been called Class
 Oriented Programming. We can also see this class focus in many of the 
technologies in Java today: in Spring you declare
-class names in application contexts, JSP uses class names to declare beans and 
so forth.</p><p>This in turn leads to that there is no good OOP solution for 
the problem we describe below.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_behavior_depends_on_context_2"></a>Behavior depends on 
Context</h4></div></div></div><p>Once you start thinking of "Behavior depends 
on Context", you have a hard time understanding how people for the last 20
-years or so of Object Oriented Programming (OOP) has ignored this 
fact.</p><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm9305972064">Return to top</a></p><div><h5 
class="title"><a id="_who_am_i"></a>Who am I?</h5></div></div></div><p>When I 
sitting in front of the computer, I am a software developer, but if I go out in 
the jungle, I am suddenly
+class names in application contexts, JSP uses class names to declare beans and 
so forth.</p><p>This in turn leads to that there is no good OOP solution for 
the problem we describe below.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_behavior_depends_on_context_2"></a>Behavior depends on 
Context</h4></div></div></div><p>Once you start thinking of "Behavior depends 
on Context", you have a hard time understanding how people for the last 20
+years or so of Object Oriented Programming (OOP) has ignored this 
fact.</p><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm132692182224">Return to top</a></p><div><h5 
class="title"><a id="_who_am_i"></a>Who am I?</h5></div></div></div><p>When I 
sitting in front of the computer, I am a software developer, but if I go out in 
the jungle, I am suddenly
 hunter-gatherer and prey. A large set of me is the same, but my interaction 
with the surroundings, i.e. the context, is
 very different. I need different interfaces, so to speak, in these two 
different contexts.</p><p>Now, the above example is perhaps a bit extreme, but 
we see it in everyday life of the developer. When an object is
 stored in the database it is of a different class, than when it is transported 
to the client and possibly when it is
 displayed in the GUI. We see the effect of this problem in many of the design 
patterns and so called "best practices"
-in Java EE development. Facades, delegation, data transport objects and many 
more.</p></div></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h4 class="title"><a 
id="_coupling"></a>Coupling</h4></div></div></div><p>The OOP proponents once 
proclaimed that classes can be re-used, since the code is encapsulated with the 
class, so the
+in Java EE development. Facades, delegation, data transport objects and many 
more.</p></div></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm132692182224">Return to 
top</a></p><div><h4 class="title"><a 
id="_coupling"></a>Coupling</h4></div></div></div><p>The OOP proponents once 
proclaimed that classes can be re-used, since the code is encapsulated with the 
class, so the
 class is an independent unit which lends itself well to re-use. In reality, 
however, we have found that classes becomes
 tightly coupled with many other classes in their neighborhood, leading to 
impossibilities of single class re-use. Many
 tricks are introduced to minimize the "Coupling Hell", such as Inversion of 
Control and Dependency Injection. Although
 those tools are good, the underlying problem remains.</p><p>Why do we end up 
with large coupled class network graphs?</p><p>Essentially, it boils down to 
"scope". Classes are too large, their scope is too large, and for each small 
functional
 unit within the class, there will be additional coupling to other classes. And 
this often progresses to the full
-boundary of the entire domain the class remains in.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_application_layer_impedance_mismatch"></a>Application layer impedance 
mismatch</h4></div></div></div><p>Almost all technologies used in modern 
software development, starts by looking at an infrastructural problem and try to
+boundary of the entire domain the class remains in.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_application_layer_impedance_mismatch"></a>Application layer impedance 
mismatch</h4></div></div></div><p>Almost all technologies used in modern 
software development, starts by looking at an infrastructural problem and try to
 solve that the best way. This is often done in a vacuum and layers on top will 
be struggling to map or translate the
 solution into the higher abstraction, and the higher up we get, the harder it 
becomes to ignore the assumptions,
 problems and limitations of the underlying technologies. It is also common 
that the underlying technologies "bleeds"
@@ -131,48 +133,48 @@ often, the most skilled developers end u
 Another interesting consequence is that each layer needs to anticipate every 
single use-case - real, potential or
 perceived - and deal with it in a specifiable and useful manner. This leads to 
overly complex solutions, compared to if
 the system is built from the top layer down, where each layer beneath knows 
exactly what is expected from it, and only
-needs to handle those use-cases.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_abstracting_away_meaning"></a>Abstracting away 
meaning.</h4></div></div></div><p>To paraphrase a famous proverb about a 
hammer: "If all you have are objects, everything looks like a dependency."
+needs to handle those use-cases.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_abstracting_away_meaning"></a>Abstracting away 
meaning.</h4></div></div></div><p>To paraphrase a famous proverb about a 
hammer: "If all you have are objects, everything looks like a dependency."
 We think that increasing abstraction often also increases complexity, and that 
the abstraction benefits are somewhat
 linear whereas the complexity negatives are exponential. So, our conclusion is 
that by making no distinction between
 different kinds of objects, many sound technologies run into incredibly 
difficult problems. The implementation of the
 programming platform (e.g. Java) is of course easier to implement with a hefty 
amount of scope reduction into as few as
 possible abstractions. But that is not the situation for the user. The 
abstraction is then required to be reversed when
 the rubber hits the road, e.g. ORM mapping must be declared explicitly by the 
programmer, often using separate tools
-and languages.</p></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h4 class="title"><a 
id="_solution"></a>Solution</h4></div></div></div><p>We think the solution was 
expressed more than 2500 years ago, first by Indian scholars and slightly later 
by Leucippus
+and languages.</p></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm132692182224">Return to 
top</a></p><div><h4 class="title"><a 
id="_solution"></a>Solution</h4></div></div></div><p>We think the solution was 
expressed more than 2500 years ago, first by Indian scholars and slightly later 
by Leucippus
 and Democritus. We are of course talking about atoms, and by using really 
small building blocks, we can express
 arbitrarily complex structures.
 By reducing the classes into what we in Composite Oriented Programming call 
Fragments, we limit the coupling network
 graph substantially. Re-use of Fragments becomes a reality, and by combination 
of Fragments, we compose larger
-structures, the Composites.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_composition"></a>Composition</h4></div></div></div><p>Composite Oriented 
Programming also view the object, we call it the Composite instance, as the 
first class citizen. The
+structures, the Composites.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_composition"></a>Composition</h4></div></div></div><p>Composite Oriented 
Programming also view the object, we call it the Composite instance, as the 
first class citizen. The
 Composite instance can be cast to any context, meaning a different behavior 
can be applied to the Composite instance,
 without affecting its underlying state. And back. This in turn means that we 
can for instance create a
 ServerContextualInvoiceEntity, transport that across to a client, cast it to a 
GuiContextualInvoiceEntity do the
 modifications to the underlying state, possibly using extra interfaces and 
methods for interacting with the GUI
 environment, and then transport the modified object back to the server, cast 
it back to the
-ServerContextualInvoiceEntity, and then persist the changes.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_domain_driven_design_focus"></a>Domain Driven Design 
focus</h4></div></div></div><p>Composite Oriented Programming is heavily 
influenced by the book "Domain Driven Design" by Eric Evans. And we are
+ServerContextualInvoiceEntity, and then persist the changes.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_domain_driven_design_focus"></a>Domain Driven Design 
focus</h4></div></div></div><p>Composite Oriented Programming is heavily 
influenced by the book "Domain Driven Design" by Eric Evans. And we are
 trying to use his analysis of the problem to provide the mechanisms needed to 
get the job done quicker and more
 reliably. Mr Evans talks about Applications, Layers, Modules, Specifications, 
SideEffects and so forth, and all of
-these should be present in a Composite Oriented Programming implementation, 
and to a large extent it is in Qi4j.</p></div></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h3 class="title"><a 
id="what-is-cop"></a>2.3. What is COP?</h3></div></div></div><p>We found this 
very well written blog entry on the Internet, which very well describes what 
Composite Oriented
+these should be present in a Composite Oriented Programming implementation, 
and to a large extent it is in Zest™.</p></div></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h3 class="title"><a 
id="what-is-cop"></a>2.3. What is COP?</h3></div></div></div><p>We found this 
very well written blog entry on the Internet, which very well describes what 
Composite Oriented
 Programming really is.</p><p>The article uses C# and a "show by example" 
approach to explaining COP, and this shows clearly that COP is not
-Java specific, and although Qi4j was (to our knowledge) first to introduce the 
name, it applies across languages and
+Java specific, and although Zest™ was (to our knowledge) first to introduce 
the name, it applies across languages and
 potentially deserves one or more languages on its own.</p><p>The article is 
re-published here, as allowed by the
 <a class="ulink" 
href="http://msdn.microsoft.com/en-us/windowsmobile/bb264332.aspx"; 
target="_top">Microsoft Permissive License</a>
 , more recently known as
 <a class="ulink" href="http://www.opensource.org/licenses/MS-PL"; 
target="_top">Microsoft Public License</a>. The content below
-is NOT under the usual <a class="ulink" 
href="http://www.opensource.org/licenses/Apache-2.0"; target="_top">Apache 
License</a>.</p><p>We would like to thank Fredrik Kalseth for his explicit 
approval as well.</p><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h4 class="title"><a 
id="_ulink_url_http_iridescence_no_post_composite_oriented_programming_aspx_composite_oriented_programming_ulink"></a><a
 class="ulink" 
href="http://iridescence.no/post/composite-oriented-programming.aspx"; 
target="_top">Composite Oriented 
Programming</a></h4></div></div></div><p>I’ve written a series of post on AOP 
lately (here, here and here), and in the last part I promised to tackle mixins
+is NOT under the usual <a class="ulink" 
href="http://www.opensource.org/licenses/Apache-2.0"; target="_top">Apache 
License</a>.</p><p>We would like to thank Fredrik Kalseth for his explicit 
approval as well.</p><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm132692182224">Return to 
top</a></p><div><h4 class="title"><a 
id="_ulink_url_http_iridescence_no_post_composite_oriented_programming_aspx_composite_oriented_programming_ulink"></a><a
 class="ulink" 
href="http://iridescence.no/post/composite-oriented-programming.aspx"; 
target="_top">Composite Oriented 
Programming</a></h4></div></div></div><p>I’ve written a series of post on AOP 
lately (here, here and here), and in the last part I promised to tackle mixins
 and introductions in a future post. When I was doing my research for just 
that, I came cross a Java framework (just
-humor me :p) called Qi4j (that’s <span class="emphasis"><em>chee for 
jay</em></span>), written by Swedish Richard Öberg, pioneering the idea of 
Composite
+humor me :p) called Zest™ (that’s <span class="emphasis"><em>chee for 
jay</em></span>), written by Swedish Richard Öberg, pioneering the idea of 
Composite
 Oriented Programming, which instantly put a spell on me. Essentially, it takes 
the concepts from Aspect Oriented
 Programming to the extreme, and for the past week I’ve dug into it with a 
passion. This post is the first fruits of
-my labor.</p><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm9305972064">Return to top</a></p><div><h5 
class="title"><a id="_oop_is_not_object_oriented"></a>OOP is Not Object 
Oriented!</h5></div></div></div><p>One of the things that Richard Öberg 
argues, is that OOP is not really object oriented at all, but rather class
-oriented. As the Qi4j website proclaims, "class is the first class citizen 
that objects are derived from. Not objects
+my labor.</p><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm132692182224">Return to top</a></p><div><h5 
class="title"><a id="_oop_is_not_object_oriented"></a>OOP is Not Object 
Oriented!</h5></div></div></div><p>One of the things that Richard Öberg 
argues, is that OOP is not really object oriented at all, but rather class
+oriented. As the Zest™ website proclaims, "class is the first class citizen 
that objects are derived from. Not objects
 being the first-class citizen to which one or many classes are assigned". 
Composite oriented programming (COP) then,
 tries to work around this limitation by building on a set of core principles; 
that behavior depends on context, that
 decoupling is a virtue, and that business rules matter more. For a short and 
abstract explanation of COP,
 <a class="link" href="#introduction-background" title="2.2. Background">see 
this page</a>. In the rest of this post I’ll try and explain some of its 
easily graspable
 benefits through a set of code examples, and then in a future post we’ll 
look at how I’ve morphed the AOP framework
 I started developing in the previous posts in this series into a lightweight 
COP framework that can actually make
-it compile and run.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h5 class="title"><a 
id="_lead_by_example"></a>Lead by Example</h5></div></div></div><p><span 
class="emphasis"><em>Lets pause for a short aside: obviously the examples 
presented here are going to be architectured beyond any rational
+it compile and run.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h5 class="title"><a 
id="_lead_by_example"></a>Lead by Example</h5></div></div></div><p><span 
class="emphasis"><em>Lets pause for a short aside: obviously the examples 
presented here are going to be architectured beyond any rational
 sense, but the interesting part lies in seeing the bigger picture; imagine the 
principles presented here applied on a
 much larger scale and I’m sure you can see the benefits quite clearly when 
we reach the end.</em></span></p><p>Imagine that we have a class Division, 
which knows how to divide one number by another:</p><pre class="programlisting 
brush: c#">public class Division
 {
@@ -207,7 +209,7 @@ intertwined. To what extent is this clas
 calculations? Not very, at least not unless we refactored it. We could make 
the Calculate method and the properties
 virtual, and thus use inheritance to modify the logic of the calculation - and 
since this is a tiny example, it would
 probably look OK. But again, think bigger - how would this apply to a huge 
API? It would easily become quite difficult
-to manage as things got more and more complex.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h5 class="title"><a 
id="_design_by_composition"></a>Design by 
Composition</h5></div></div></div><p>With a COP framework, we can implement 
each aspect as a separate object and then treat them as <span 
class="emphasis"><em>mixins</em></span> which blend
+to manage as things got more and more complex.</p></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h5 class="title"><a 
id="_design_by_composition"></a>Design by 
Composition</h5></div></div></div><p>With a COP framework, we can implement 
each aspect as a separate object and then treat them as <span 
class="emphasis"><em>mixins</em></span> which blend
 together into a meaningful <span class="emphasis"><em>composite</em></span>. 
Sounds confusing? Lets refactor the above example using an as of yet imaginary
 COP framework for .NET (which I’m currently developing and will post the 
source code for in a follow-up post), and
 it’ll all make sense (hopefully!).</p><p>Above, we identified the four 
different aspects in the Division class - so let’s implement each of them. 
First, we
@@ -343,8 +345,8 @@ public interface ISubtraction : ICalcula
 posts. I’ve already implemented a prototype framework that supports the 
above examples, which builds on my
 <a class="ulink" 
href="http://www.iridescence.no/Posts/Implementing-an-AOP-Framework-Part-2.aspx";
 target="_top">previously posted AOP framework</a>, and I’ll
 post the source code for that soon. If you want to dig deeper right now (and 
don’t mind
-a bit of Java), then I suggest you head over to the Qi4j website and poke 
about there.
-<a class="ulink" href="http://rickardoberg.wordpress.com/"; 
target="_top">Richard Öbergs blog</a> also provides great 
insight.</p></div></div></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h3 class="title"><a 
id="what-s-an-object-anyway"></a>2.4. What’s an Object 
anyway?</h3></div></div></div><p>In OOP the main idea is that we should model 
our reality by creating Objects. Objects have state, and they have methods.
+a bit of Java), then I suggest you head over to the Zest™ website and poke 
about there.
+<a class="ulink" href="http://rickardoberg.wordpress.com/"; 
target="_top">Richard Öbergs blog</a> also provides great 
insight.</p></div></div></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h3 class="title"><a 
id="what-s-an-object-anyway"></a>2.4. What’s an Object 
anyway?</h3></div></div></div><p>In OOP the main idea is that we should model 
our reality by creating Objects. Objects have state, and they have methods.
 Methods in an object are used to operate on the internal state and understands 
the domain that is being modeled.</p><p>By contrast, in procedural programming 
the focus is on algorithms, which can use several data structures to perform 
some
 task. The focus is on what is going on, rather than the "objects" 
involved.</p><p>With OOP it becomes more difficult to "read" algorithms, as 
they are spread out in many objects that interact. With
 procedural programming it becomes difficult to encapsulate and reuse 
functionality. Both represent extremes, neither of
@@ -362,7 +364,7 @@ there will be an interface, and for each
 This mixin can be specific for that composite implementation, or it can be 
generic and reused. The key point is that it
 is the OBSERVER of the object, meaning, the algorithm, that gets to decide 
what the object should be able to do.</p><p>This is the same in real life. I 
don’t get to decide how I communicate with you. I have to use english, and I 
have to
 use email, and I have to send it to a specific mailing list. It is the 
algorithm of the interaction between us, the
-Qi4j dev mailing list, that has set these rules, not <span 
class="strong"><strong>I</strong></span> as a participant in this interaction. 
The same should,
+Zest™ dev mailing list, that has set these rules, not <span 
class="strong"><strong>I</strong></span> as a participant in this interaction. 
The same should,
 obviously, be the case for objects.</p><p>So, with the understanding that 
algorithms should define roles for collaborating objects, and objects should 
then
 implement these in order to participate in these algorithms, it should be 
trivial to realize that what has passed for
 OOP so far, in terms of "class oriented programming", where this role-focus of 
objects is difficult to achieve, if not
@@ -370,7 +372,7 @@ even impossible, is just plain wrong. I
 designated as "coordinator", which then delegates to a number of other objects 
in order to implement the various roles.
 This "solution", which is caused by this fundamental flaw in "class oriented 
programming", is essentially a hack, and
 causes a number of other problems, such as the "self schizophrenia" problem, 
whereby there is no way to tell where the
-object really is. There is no "this" pointer that has any relevant 
meaning.</p><p>The Composite pattern, as implemented in COP and Qi4j, gets 
around this by simply saying that the composite, as a
+object really is. There is no "this" pointer that has any relevant 
meaning.</p><p>The Composite pattern, as implemented in COP and Zest™, gets 
around this by simply saying that the composite, as a
 whole, is an object. Tada, we now have a "this" pointer, and a coherent way to 
deal with the object graph as though it
 was a single object. We are now able to get back to the strengths of the 
procedural approach, which allows the
 implementer of the algorithm to define the roles needed for the algorithm. The 
roles can either be specific to an
@@ -378,7 +380,7 @@ algorithm, or they can be shared between
 algorithm is not too tightly encoded in the composites, thereby making the 
algorithms more reusable, and making it less
 necessary to read composite code when trying to understand algorithms. The 
assumption here is that we are going to write
 more algorithms than composites, therefore it has to be easy to ready 
algorithms, and only when necessary dive down into
-composite code.</p><p>When talking about Composites as Objects in Qi4j it is 
most relevant to look at Entities, since these represent physical
+composite code.</p><p>When talking about Composites as Objects in Zest™ it 
is most relevant to look at Entities, since these represent physical
 objects in a model, rather than algorithms or services, or other 
non-instance-oriented things.</p><p>If Entities should implement roles, via 
mixins, in order to interact with each other through algorithms, then the
 majority of their behaviour should be put into those role-mixins. These are 
exposed publically for clients to use.
 However, the state that is required to implement these roles should not be 
exposed publically, as they represent
@@ -410,7 +412,7 @@ general allow our role-oriented approach
 generally reusable, and the state interfaces are usually reusable. This 
minimizes the need for us to go into the mixin
 code and read it. If we have read the mixin code once, and the same mixin is 
reused between objects, then this makes
 it easier for us to understand it the next time we see it being used in 
another algorithm.</p><p>To summarize thus far, we have looked at why OOP so 
far has not worked out, why this is the case, and how COP deals
-with it, and how we can implement a better solution of Entities using Qi4j. 
All is well!</p><p>The next step is to start using these Entities in 
algorithms. Algorithms are usually stateless, or at least they don’t
+with it, and how we can implement a better solution of Entities using Zest™. 
All is well!</p><p>The next step is to start using these Entities in 
algorithms. Algorithms are usually stateless, or at least they don’t
 have any state that survives the execution of the algorithm. There is input, 
some calculation, and then output. In
 other words, our notion of services fit perfectly here!</p><p>Algorithms, 
then, should(/could?) be modeled using services. If an algorithm needs other 
algorithms to compute
 something, that is, if a service needs another service to do something, we can 
accomplish this using dependency
@@ -440,14 +442,14 @@ would need to get the three objects invo
 selected item in a list, and "TaskExecutor to" could be a user designated from 
a popup dialog. These three are then
 taken by the context and used to execute the "delegate" interaction, which 
performs all the steps necessary.</p><p>The interaction method "delegate" is 
testable, both with mocks of the input, and with specific instances of the 
various
 roles. The implementations are also testable, and if the same mixin is used 
over and over for the implementation, then
-only one set of tests is needed for each role interface.</p><p>To summarize we 
have in COP/Qi4j a way to get the best from procedural and object-oriented 
programming. As we have seen
+only one set of tests is needed for each role interface.</p><p>To summarize we 
have in COP/Zest™ a way to get the best from procedural and object-oriented 
programming. As we have seen
 the functionality falls into three categories, the entities implementing 
objects, the services implementing
 interactions, and the user interface implementing the context. This also maps 
well to the ideas of ModelViewController,
 which in turn maps well to the new ideas from Mr Reenskaug (inventor of MVC) 
called DCI: Data-Context-Interaction. As a
-side-effect of this discussion we have therefore also seen how COP/Qi4j can be 
used to implement DCI, which is an
+side-effect of this discussion we have therefore also seen how COP/Zest™ can 
be used to implement DCI, which is an
 important next step in understanding objects and their interactions, the 
fundamentals of which (I believe) are captured
 on this page.</p><p>That’s it. Well done if you’ve read this far 
:-)</p><p>Comments and thoughts to qi4j-dev forum at Google Groups on this are 
highly appreciated. This is very very important topics,
-and crucial to understanding/explaining why COP/Qi4j is so great! 
:-)</p></div><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm9305972064">Return to top</a></p><div><h3 
class="title"><a id="state-modeling"></a>2.5. Qi4j and state 
modeling</h3></div></div></div><p>(From Rickard Oberg’s blog, <a 
class="ulink" 
href="http://www.jroller.com/rickard/entry/qi4j_and_state_modeling"; 
target="_top">http://www.jroller.com/rickard/entry/qi4j_and_state_modeling</a>, 
2009-02-19)</p><p>In the Qi4j project we strive to being able to express our 
domain as directly as possible, with as little translation
+and crucial to understanding/explaining why COP/Zest™ is so great! 
:-)</p></div><div class="section"><div class="titlepage"><div><p xmlns="" 
class="returntotop"><a href="#idm132692182224">Return to top</a></p><div><h3 
class="title"><a id="state-modeling"></a>2.5. Zest™ and state 
modeling</h3></div></div></div><p>(From Rickard Oberg’s blog, <a 
class="ulink" 
href="http://www.jroller.com/rickard/entry/qi4j_and_state_modeling"; 
target="_top">http://www.jroller.com/rickard/entry/qi4j_and_state_modeling</a>, 
2009-02-19)</p><p>In the Zest™ project we strive to being able to express our 
domain as directly as possible, with as little translation
 as possible between how we think about a domain and how it is actually coded.
 This then affects our entire view of how application frameworks should be 
constructed, and what we consider good and
 bad ways of implementing certain features.</p><p>One part which is a good 
example of this is persistent state modeling. In other approaches and 
frameworks one would
@@ -457,11 +459,11 @@ If POJOs are used for both Entities and
 in our heads when talking about them, always keeping mind what the POJO is 
doing in any particular context.
 In Domain Driven Design terms, POJOs are not in our Ubiquitous 
Language.</p><p>From a DDD perspective we want to talk about Entities and 
Values, Properties and Associations.
 If our code does not reflect this, then there is translation going on, and 
translation inevitably leads to information loss.
-In Qi4j, where Composites and not Objects, are the basic construct, we have 
created specialized forms to model these
+In Zest™, where Composites and not Objects, are the basic construct, we have 
created specialized forms to model these
 concepts more explicitly.
 We have EntityComposites and ValueComposites, each with different ways of 
creating them and managing them.
 Both EntityComposites and ValueComposites can then have Properties, as 
first-class objects, but Properties in
-ValueComposites are always immutable.</p><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_entities"></a>Entities</h4></div></div></div><p>Here’s an example of how 
you could define an EntityComposite:</p><pre class="programlisting brush: 
java">interface PersonEntity
+ValueComposites are always immutable.</p><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_entities"></a>Entities</h4></div></div></div><p>Here’s an example of how 
you could define an EntityComposite:</p><pre class="programlisting brush: 
java">interface PersonEntity
         extends EntityComposite
 {
     Property&lt;String&gt; givenName();
@@ -476,7 +478,7 @@ Entities, so that’s all taken care
 So if you speak about Entities in your domain discussions, each having 
Properties, then you can put that down in
 code pretty much as-is.
 This is, to me, a huge advantage over other ways of doing it, including POJO 
modeling (which lose clarity), UML
-modeling (which has roundtrip problems), DSL modeling (which lose tools 
support), and whatnot.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_roles"></a>Roles</h4></div></div></div><p>If you want to get picky about 
it, the above example is probably not how you would model Person. Having a name 
is
+modeling (which has roundtrip problems), DSL modeling (which lose tools 
support), and whatnot.</p></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_roles"></a>Roles</h4></div></div></div><p>If you want to get picky about 
it, the above example is probably not how you would model Person. Having a name 
is
 just one role that a Person has to play, and since Composite Oriented 
Programming is all about using roles and
 context instead of classes you would probably do something like this 
instead:</p><pre class="programlisting brush: java">interface Nameable
 {
@@ -500,12 +502,12 @@ their initial values be set to a default
 For Strings this is the empty string, for primitives they are what you would 
expect.
 For Collections they are set to empty collections of the type indicated.
 "@UseDefaults Property&lt;List&lt;String&gt;&gt; addresses();" would be 
initialized to an empty ArrayList, for example.</p><p>In addition I have set 
surName() to be @Optional.
-In Qi4j we have defined all properties to be not-null as the default, and the 
same goes for all parameters in method
+In Zest™ we have defined all properties to be not-null as the default, and 
the same goes for all parameters in method
 invocations.
 If you explicitly want to allow properties to be null, so that for example 
"Madonna" would be an acceptable name,
 then you can mark it as @Optional.
 We prefer @Optional to @Nullable since it better expresses the intent from a 
domain perspective.
-Avoiding technical terms as much as possible is a another goal (which is damn 
hard to reach!).</p></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h4 class="title"><a 
id="_values"></a>Values</h4></div></div></div><p>If you want to get really 
picky about it, not even the above would be a real example.
+Avoiding technical terms as much as possible is a another goal (which is damn 
hard to reach!).</p></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm132692182224">Return to 
top</a></p><div><h4 class="title"><a 
id="_values"></a>Values</h4></div></div></div><p>If you want to get really 
picky about it, not even the above would be a real example.
 You may want to encapsulate the two properties into one value instead, so that 
you can more easily perform validation
 checks when they are updated. What you want are ValueComposites:</p><pre 
class="programlisting brush: java">interface NameValue
         extends ValueComposite
@@ -524,7 +526,7 @@ But since NameValue extends ValueComposi
 of ValueComposite, and there’s no way to "opt out" of it.</p><p>By 
introducing one more level in the state model you have created an easy way to 
access the name as a whole and hand
 it around the system, instead of as two separate properties.
 Since it is immutable you are also ensured that noone can change it without 
going through the Entity, and you can
-also share instances of the name without having to worry about 
thread-safety.</p></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h4 class="title"><a id="_privatizing_state"></a>Privatizing 
state</h4></div></div></div><p>The above is already a great step ahead in terms 
of how you can model your state more easily than having to use POJOs
+also share instances of the name without having to worry about 
thread-safety.</p></div><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm132692182224">Return to 
top</a></p><div><h4 class="title"><a id="_privatizing_state"></a>Privatizing 
state</h4></div></div></div><p>The above is already a great step ahead in terms 
of how you can model your state more easily than having to use POJOs
 to sort of "fake" the features I’m describing above, and there’s also a 
ton of cool features and consequences of the
 whole thing I’m skipping here, for brevity.
 One of the problems with POJO models that usually come up is that your getters 
and setters get exposed to clients,
@@ -532,7 +534,7 @@ and so functionality tend to not be put
 the Entity into a bunch of places.
 What should have been a neat and tidy little package is instead a anorectic 
little thing whose guts lay splashed
 around your code, looking all soggy and unappetizing.</p><p>What to do about 
this?
-One of the great inventions of Qi4j, I believe, is the notion of private 
mixins.
+One of the great inventions of Zest™, I believe, is the notion of private 
mixins.
 That we can have mixins in an object which are explicitly HIDDEN from usage 
outside of it.
 How can we use this for state modeling?
 What you’d want to do is to model the state of an Entity as a private mixin, 
which is hidden from clients, and then
@@ -574,10 +576,10 @@ So you can make a UI widget for listing
 a PersonEntity or Nameable.</p><p>For extra credit you could move the 
construction of "fullName" into a method on the NameValue, so that the value is
 not only a dumb data container, but can also perform useful operations on 
itself.
 And for the performance aware, don’t worry, the mixin is lazy-loaded, so if 
the particular usecase handling the
-Entity doesn’t need the "Listable" interface the mixin will never be 
instantiated.</p><p>And so much more…</p><p>The above is just a small taste 
of what you can do with state modeling in Qi4j.
+Entity doesn’t need the "Listable" interface the mixin will never be 
instantiated.</p><p>And so much more…</p><p>The above is just a small taste 
of what you can do with state modeling in Zest™.
 There is also support for associations and many-associations, the notion of 
aggregates, and a complete pluggable
 system for persistence and indexing/querying of data.
-To end with, here’s a sample of how some other state modeling concepts can 
be expressed in Qi4j:</p><pre class="programlisting brush: java">interface 
PersonEntity
+To end with, here’s a sample of how some other state modeling concepts can 
be expressed in Zest™:</p><pre class="programlisting brush: java">interface 
PersonEntity
         extends EntityComposite
 {
     Association&lt;PersonEntity&gt; father();
@@ -593,10 +595,10 @@ interface BookNoteEntity
     Association&lt;BookEntity&gt; book();
 }
 
-</pre><p>I hope they are self-explanatory.</p><p>My hope is that with 
Composite Oriented Programming and Qi4j we can come one step closer to being 
able to express our
-domain as clearly as possible in code.</p></div></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h3 class="title"><a 
id="related"></a>2.6. Related publications &amp; 
projects</h3></div></div></div><p>Qi4j addresses a wide range of concepts, the 
related publications and projects you’ll find in this section span accross
+</pre><p>I hope they are self-explanatory.</p><p>My hope is that with 
Composite Oriented Programming and Zest™ we can come one step closer to being 
able to express our
+domain as clearly as possible in code.</p></div></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h3 class="title"><a 
id="related"></a>2.6. Related publications &amp; 
projects</h3></div></div></div><p>Zest™ addresses a wide range of concepts, 
the related publications and projects you’ll find in this section span accross
 all theses concepts. Please note that this is not an exhaustive list but only 
some pointers to help you understand which
-principles Qi4j is based on.</p><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_publications"></a>Publications</h4></div></div></div><p>In chronological 
order, related publications:</p><div class="itemizedlist"><ul 
class="itemizedlist" type="disc"><li class="listitem"><p class="simpara">
+principles Zest™ is based on.</p><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_publications"></a>Publications</h4></div></div></div><p>In chronological 
order, related publications:</p><div class="itemizedlist"><ul 
class="itemizedlist" type="disc"><li class="listitem"><p class="simpara">
 <span class="strong"><strong>Object-oriented Software 
Construction</strong></span>
 </p><p class="simpara">by Bertrand Meyer - 1988</p><p class="simpara">"<span 
class="emphasis"><em>The comprehensive reference on all aspects of object 
technology, from design principles to O-O techniques, Design by
 Contract, O-O analysis, concurrency, persistence, abstract data types and many 
more. Written by a pioneer in the field,
@@ -690,7 +692,7 @@ information. This simple notion leads to
 </p><p class="simpara">by Martin Fowler - WIP</p><p class="simpara">"<span 
class="emphasis"><em>Capture all changes to an application state as a sequence 
of events.</em></span>"</p><p class="simpara"><a class="ulink" 
href="http://martinfowler.com/eaaDev/EventSourcing.html"; 
target="_top">http://martinfowler.com/eaaDev/EventSourcing.html</a></p></li><li 
class="listitem"><p class="simpara">
 <span class="strong"><strong>Event Collaboration</strong></span>
 </p><p class="simpara">by Martin Fowler - WIP</p><p class="simpara">"<span 
class="emphasis"><em>Multiple components work together by communicating with 
each other by sending events when their internal state
-changes.</em></span>"</p><p class="simpara"><a class="ulink" 
href="http://martinfowler.com/eaaDev/EventCollaboration.html"; 
target="_top">http://martinfowler.com/eaaDev/EventCollaboration.html</a></p></li></ul></div></div><div
 class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h4 class="title"><a 
id="_projects"></a>Projects</h4></div></div></div><p><span 
class="emphasis"><em>Pêle-mêle</em></span>, inspiring, inspired, alternatives 
or simply related:</p><div class="itemizedlist"><ul class="itemizedlist" 
type="disc"><li class="listitem"><p class="simpara">
+changes.</em></span>"</p><p class="simpara"><a class="ulink" 
href="http://martinfowler.com/eaaDev/EventCollaboration.html"; 
target="_top">http://martinfowler.com/eaaDev/EventCollaboration.html</a></p></li></ul></div></div><div
 class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm132692182224">Return to top</a></p><div><h4 class="title"><a 
id="_projects"></a>Projects</h4></div></div></div><p><span 
class="emphasis"><em>Pêle-mêle</em></span>, inspiring, inspired, alternatives 
or simply related:</p><div class="itemizedlist"><ul class="itemizedlist" 
type="disc"><li class="listitem"><p class="simpara">
 <span class="strong"><strong>AspectJ</strong></span>
 </p><p class="simpara">"<span class="emphasis"><em>An aspect-oriented 
extension to the Java programming language.</em></span>"</p><p 
class="simpara"><a class="ulink" href="http://www.eclipse.org/aspectj/"; 
target="_top">eclipse.org/aspectj</a></p></li><li class="listitem"><p 
class="simpara">
 <span class="strong"><strong>Spring Framework</strong></span>
@@ -715,22 +717,22 @@ the CQRS principles.</em></span>"</p><p
 <span class="strong"><strong>The Fractal Project</strong></span>
 </p><p class="simpara">"<span class="emphasis"><em>Fractal is a modular, 
extensible and programming language agnostic component model that can be used 
to design,
 implement, deploy and reconfigure systems and applications, from operating 
systems to middleware platforms and to
-graphical user interfaces.</em></span>"</p><p class="simpara"><a class="ulink" 
href="http://fractal.ow2.org/"; 
target="_top">fractal.ow2.org</a></p></li></ul></div></div></div></div><div 
class="section"><div class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h2 class="title" style="clear: 
both"><a id="tutorials"></a>3. Tutorials</h2></div></div></div><div 
class="toc"><dl><dt><span class="section"><a href="#_overview">3.1. 
Overview</a></span></dt><dt><span class="section"><a 
href="#two-minutes-intro">3.2. Qi4j in 2 minutes</a></span></dt><dt><span 
class="section"><a href="#ten-minutes-intro">3.3. Qi4j in 10 
minutes</a></span></dt><dt><span class="section"><a 
href="#thirty-minutes-intro">3.4. Qi4j in 30 minutes</a></span></dt><dt><span 
class="section"><a href="#two-hours-intro">3.5. Qi4j in 2 
hours</a></span></dt><dt><span class="section"><a 
href="#howto-depend-on-qi4j">3.6. Depend on Qi4j in your 
build</a></span></dt><dt><span
  class="section"><a href="#howto-assemble-application">3.7. Assemble an 
Application</a></span></dt><dt><span class="section"><a 
href="#tut-composites">3.8. Transient Composites 
Tutorial</a></span></dt><dt><span class="section"><a href="#tut-services">3.9. 
Services Composites Tutorial</a></span></dt><dt><span class="section"><a 
href="#howto-contextual-fragments">3.10. Use contextual 
fragments</a></span></dt><dt><span class="section"><a 
href="#howto-leverage-properties">3.11. Leverage 
Properties</a></span></dt><dt><span class="section"><a 
href="#howto-create-constraint">3.12. Create a 
Constraint</a></span></dt><dt><span class="section"><a 
href="#howto-create-concern">3.13. Create a Concern</a></span></dt><dt><span 
class="section"><a href="#howto-create-sideeffect">3.14. Create a 
SideEffect</a></span></dt><dt><span class="section"><a 
href="#howto-create-entity">3.15. Create an Entity</a></span></dt><dt><span 
class="section"><a href="#howto-configure-service">3.16. Configure a Service</
 a></span></dt><dt><span class="section"><a 
href="#howto-invocation-annotation">3.17. Use 
@Invocation</a></span></dt><dt><span class="section"><a 
href="#howto-use-io">3.18. Use I/O API</a></span></dt><dt><span 
class="section"><a href="#build-system">3.19. Build 
System</a></span></dt><dt><span class="section"><a href="#community-docs">3.20. 
Writing Qi4j Documentation</a></span></dt></dl></div><div class="section"><div 
class="titlepage"><div><p xmlns="" class="returntotop"><a 
href="#idm9305972064">Return to top</a></p><div><h3 class="title"><a 
id="_overview"></a>3.1. Overview</h3></div></div></div><div class="tip" 
style="margin-left: 0; margin-right: 10%;"><table border="0" 
summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img 
alt="[Tip]" src="images/icons/admon/tip.png" /></td><th 
align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Theses tutorials 
are based on actual code found in the <code class="literal">tutorials/</code> 
directory of the
-<a class="ulink" href="http://qi4j.org/downloads.html"; target="_top">Qi4j SDK 
sources</a>. You should start your favorite editor and find the code related to
-this tutorial, run it and play with it.</p></td></tr></table></div><p>In this 
section you will find a comprehensive set of tutorials about Composite Oriented 
Programming using Qi4j.</p><div class="section"><div class="titlepage"><div><p 
xmlns="" class="returntotop"><a href="#idm9305972064">Return to 
top</a></p><div><h4 class="title"><a id="tutorials-intro"></a>Qi4j in 2 hours 
42 minutes</h4></div></div></div><p>This quite long introduction to Qi4j will 
start by brushing up an overview of the problems Qi4j solve, teach you what

[... 3163 lines stripped ...]

Reply via email to