You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/05/03 18:16:15 UTC

svn commit: r1677437 [20/20] - in /isis/site/trunk/content/docs: ./ css/ css/asciidoctor/ css/font-awesome/ css/font-awesome/4.3.0/ css/font-awesome/4.3.0/css/ css/font-awesome/4.3.0/fonts/ css/font-awesome/4.3.0/less/ css/font-awesome/4.3.0/scss/ css/...

Added: isis/site/trunk/content/docs/user-guide/user-guide.html
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/docs/user-guide/user-guide.html?rev=1677437&view=auto
==============================================================================
--- isis/site/trunk/content/docs/user-guide/user-guide.html (added)
+++ isis/site/trunk/content/docs/user-guide/user-guide.html Sun May  3 16:16:12 2015
@@ -0,0 +1,9687 @@
+<!doctype html>
+
+<html class="no-js" lang="en">
+
+<head>
+
+    <meta charset="utf-8"/>
+
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+
+
+
+    <title>User Guide</title>
+
+
+
+    <!--
+
+        Licensed to the Apache Software Foundation (ASF) under one
+
+        or more contributor license agreements.  See the NOTICE file
+
+        distributed with this work for additional information
+
+        regarding copyright ownership.  The ASF licenses this file
+
+        to you under the Apache License, Version 2.0 (the
+
+        "License"); you may not use this file except in compliance
+
+        with the License.  You may obtain a copy of the License at
+
+
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+
+
+        Unless required by applicable law or agreed to in writing,
+
+        software distributed under the License is distributed on an
+
+        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+
+        KIND, either express or implied.  See the License for the
+
+        specific language governing permissions and limitations
+
+        under the License.
+
+    -->
+
+
+
+    <!-- No caching headers -->
+
+    <meta http-equiv="cache-control" content="no-cache" />
+
+    <meta http-equiv="pragma" content="no-cache" />
+
+    <meta http-equiv="expires" content="-1" />
+
+
+
+    <link href="../css/foundation/5.5.1/foundation.css" rel="stylesheet" />
+
+    <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script>
+
+    <link href="../css/asciidoctor/colony.css" rel="stylesheet">
+
+    <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
+
+
+
+    <link href="../css/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.css" rel="stylesheet" />
+
+    <!--[if lt IE 9]>
+
+      <link href="../css/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.ie.css" rel="stylesheet" />
+
+    <![endif]-->
+
+
+
+    <style type="text/css">
+
+        /* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */
+/*pre.CodeRay {background-color:#f7f7f8;}*/
+.CodeRay .line-numbers{border-right:1px solid #d8d8d8;padding:0 0.5em 0 .25em}
+.CodeRay span.line-numbers{display:inline-block;margin-right:.5em;color:rgba(0,0,0,.3)}
+.CodeRay .line-numbers strong{font-weight: normal}
+table.CodeRay{border-collapse:separate;border-spacing:0;margin-bottom:0;border:0;background:none}
+table.CodeRay td{vertical-align: top}
+table.CodeRay td.line-numbers{text-align:right}
+table.CodeRay td.line-numbers>pre{padding:0;color:rgba(0,0,0,.3)}
+table.CodeRay td.code{padding:0 0 0 .5em}
+table.CodeRay td.code>pre{padding:0}
+.CodeRay .debug{color:#fff !important;background:#000080 !important}
+.CodeRay .annotation{color:#007}
+.CodeRay .attribute-name{color:#000080}
+.CodeRay .attribute-value{color:#700}
+.CodeRay .binary{color:#509}
+.CodeRay .comment{color:#998;font-style:italic}
+.CodeRay .char{color:#04d}
+.CodeRay .char .content{color:#04d}
+.CodeRay .char .delimiter{color:#039}
+.CodeRay .class{color:#458;font-weight:bold}
+.CodeRay .complex{color:#a08}
+.CodeRay .constant,.CodeRay .predefined-constant{color:#008080}
+.CodeRay .color{color:#099}
+.CodeRay .class-variable{color:#369}
+.CodeRay .decorator{color:#b0b}
+.CodeRay .definition{color:#099}
+.CodeRay .delimiter{color:#000}
+.CodeRay .doc{color:#970}
+.CodeRay .doctype{color:#34b}
+.CodeRay .doc-string{color:#d42}
+.CodeRay .escape{color:#666}
+.CodeRay .entity{color:#800}
+.CodeRay .error{color:#808}
+.CodeRay .exception{color:inherit}
+.CodeRay .filename{color:#099}
+.CodeRay .function{color:#900;font-weight:bold}
+.CodeRay .global-variable{color:#008080}
+.CodeRay .hex{color:#058}
+.CodeRay .integer,.CodeRay .float{color:#099}
+.CodeRay .include{color:#555}
+.CodeRay .inline{color:#00}
+.CodeRay .inline .inline{background:#ccc}
+.CodeRay .inline .inline .inline{background:#bbb}
+.CodeRay .inline .inline-delimiter{color:#d14}
+.CodeRay .inline-delimiter{color:#d14}
+.CodeRay .important{color:#555;font-weight:bold}
+.CodeRay .interpreted{color:#b2b}
+.CodeRay .instance-variable{color:#008080}
+.CodeRay .label{color:#970}
+.CodeRay .local-variable{color:#963}
+.CodeRay .octal{color:#40e}
+.CodeRay .predefined{color:#369}
+.CodeRay .preprocessor{color:#579}
+.CodeRay .pseudo-class{color:#555}
+.CodeRay .directive{font-weight:bold}
+.CodeRay .type{font-weight:bold}
+.CodeRay .predefined-type{color:inherit}
+.CodeRay .reserved,.CodeRay .keyword {color:#000;font-weight:bold}
+.CodeRay .key{color:#808}
+.CodeRay .key .delimiter{color:#606}
+.CodeRay .key .char{color:#80f}
+.CodeRay .value{color:#088}
+.CodeRay .regexp .delimiter{color:#808}
+.CodeRay .regexp .content{color:#808}
+.CodeRay .regexp .modifier{color:#808}
+.CodeRay .regexp .char{color:#d14}
+.CodeRay .regexp .function{color:#404;font-weight:bold}
+.CodeRay .string{color:#d20}
+.CodeRay .string .string .string{background:#ffd0d0}
+.CodeRay .string .content{color:#d14}
+.CodeRay .string .char{color:#d14}
+.CodeRay .string .delimiter{color:#d14}
+.CodeRay .shell{color:#d14}
+.CodeRay .shell .delimiter{color:#d14}
+.CodeRay .symbol{color:#990073}
+.CodeRay .symbol .content{color:#a60}
+.CodeRay .symbol .delimiter{color:#630}
+.CodeRay .tag{color:#008080}
+.CodeRay .tag-special{color:#d70}
+.CodeRay .variable{color:#036}
+.CodeRay .insert{background:#afa}
+.CodeRay .delete{background:#faa}
+.CodeRay .change{color:#aaf;background:#007}
+.CodeRay .head{color:#f8f;background:#505}
+.CodeRay .insert .insert{color:#080}
+.CodeRay .delete .delete{color:#800}
+.CodeRay .change .change{color:#66f}
+.CodeRay .head .head{color:#f4f}
+
+
+
+        pre.CodeRay code {
+
+            background-color: inherit;
+
+            border-style: none;
+
+        }
+
+
+
+        .literalblock pre,
+
+        .listingblock pre:not(.highlight),
+
+        .listingblock pre[class="highlight"],
+
+        .listingblock pre[class^="highlight "],
+
+        .listingblock pre.CodeRay,
+
+        .listingblock pre.prettyprint {
+
+            background: rgb(253, 250, 246);
+
+         }
+
+        .sidebarblock .literalblock pre,
+
+        .sidebarblock .listingblock pre:not(.highlight),
+
+        .sidebarblock .listingblock pre[class="highlight"],
+
+        .sidebarblock .listingblock pre[class^="highlight "],
+
+        .sidebarblock .listingblock pre.CodeRay,
+
+        .sidebarblock .listingblock pre.prettyprint {
+
+            background: rgb(253, 250, 246);
+
+         }
+
+
+
+    <style>
+
+
+
+    <style>
+
+    .github-fork-ribbon-wrapper.right {
+
+        position: fixed;
+
+    }
+
+    .github-fork-ribbon {
+
+        background: #090;
+
+    }
+
+    .github-fork-ribbon a:hover {
+
+        background:#0D0;
+
+        color:#fff;
+
+        font-size: 1.1em;
+
+    }
+
+    </style>
+
+
+
+    <style>
+
+        .extended-quote,
+
+        .extended-quote-first {
+
+            margin-left: 40px;
+
+            margin-right: 40px;
+
+            font-style: italic;
+
+        }
+
+        .extended-quote-attribution {
+
+            text-align: right;
+
+            margin-right: 100px;
+
+            color: #10B061;
+
+        }
+
+
+
+        .extended-quote-first:before {
+
+            content: "\201c";
+
+            float: left;
+
+            font-size: 2.75em;
+
+            font-weight: bold;
+
+            line-height: 0.6em;
+
+            margin-left: -0.6em;
+
+            color: #003b6b;
+
+            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
+
+        }
+
+    </style>
+
+
+
+    <style>
+
+        body {
+
+          position: relative;
+
+        }
+
+
+
+        *:not(pre) > code {
+
+            background-color: inherit;
+
+            border: none;
+
+        }
+
+
+
+        body div#toc li,
+
+        body div#toc2 li {
+
+            list-style-type: none;
+
+        }
+
+
+
+        div#doc-content {
+
+            margin-top: 30px;
+
+        }
+
+
+
+        body div#toc li.active-region:before,
+
+        body div#toc2 li.active-region:before {
+
+            content: "\00BB \0020";
+
+            margin-left: -12px;
+
+        }
+
+
+
+        body div#toc li a.active,
+
+        body div#toc2 li a.active {
+
+            color: red;
+
+        }
+
+
+
+        body div#toc.toc,
+
+        body div#toc.toc2 {
+
+            position: fixed;
+
+            left: auto;
+
+            padding-top: 80px;
+
+            z-index: auto;
+
+            background-color: white;
+
+            border-left-color: #eee;
+
+            border-left-style: solid;
+
+            border-right: none;
+
+            min-height: 2000px;
+
+        }
+
+    </style>
+
+
+
+    <style>
+
+        footer {
+
+            margin-top: 1000px;
+
+        }
+
+    </style>
+
+
+
+    <style>
+
+        /* overriding colony.css stylesheet */
+
+        .literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] {
+
+           /*padding: 1.25em 1.5625em 1.125em 1.5625em;*/
+
+           padding: 0.3em 0.6em 0.25em 0.6em;
+
+        }
+
+        @media only screen and (min-width: 1280px)
+
+        #toc.toc2 {
+
+          /*width: 20em;*/
+
+          width: 25em;
+
+        }
+
+
+
+        #doc-content a {
+
+          color: #210DDC;
+
+        }
+
+
+
+        h2 {
+
+          margin-top: 100px;
+
+        }
+
+        h3 {
+
+          margin-top: 50px;
+
+        }
+
+        h4,h5 {
+
+          margin-top: 30px;
+
+        }
+
+
+
+        .admonitionblock.tip > table td.content {
+
+            color: #10B061;
+
+        }
+
+        .admonitionblock.note > table td.content {
+
+            color: #B509AB;
+
+        }
+
+        .admonitionblock.important > table td.content {
+
+            color: #D5810A;
+
+        }
+
+
+
+        .imageblock img {
+
+            margin-bottom: 10px;
+
+        }
+
+    </style>
+
+
+
+    <style>
+
+        /* from http://ben.balter.com/2014/03/13/pages-anchor-links/ */
+
+        .header-link {
+
+          position: absolute;
+
+          left: -0.5em;
+
+          opacity: 0;
+
+
+
+          /*
+
+          -webkit-transition: opacity 0.2s ease-in-out 0.1s;
+
+          -moz-transition: opacity 0.2s ease-in-out 0.1s;
+
+          -ms-transition: opacity 0.2s ease-in-out 0.1s;
+
+          */
+
+        }
+
+
+
+        h2:hover .header-link,
+
+        h3:hover .header-link,
+
+        h4:hover .header-link,
+
+        h5:hover .header-link,
+
+        h6:hover .header-link {
+
+          opacity: 1;
+
+        }
+
+    </style>
+
+
+
+</script>
+
+
+
+</head>
+
+<body>
+
+
+
+<div class="github-fork-ribbon-wrapper right" style="position: fixed;">
+
+    <div class="github-fork-ribbon">
+
+        <a href="https://github.com/apache/isis/fork">Fork me on GitHub</a>
+
+    </div>
+
+</div>
+
+
+
+<div class="row">
+
+
+
+    <div class="fixed contain-to-grid">
+
+        <nav class="top-bar" data-topbar role="navigation">
+
+            <ul class="title-area">
+
+                <li class="name">
+
+                    <h1>
+
+                        <a href="/index.html">Apache Isis&trade;</a>
+
+                    </h1>
+
+                </li>
+
+                <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
+
+                <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
+
+            </ul>
+
+
+
+            <section class="top-bar-section">
+
+                <ul class="right">
+
+
+
+                    <li class="has-form">
+
+                       <FORM class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse">
+
+                        <div class="row collapse">
+
+                            <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya">
+
+                            <INPUT type="hidden" name="cof" value="FORID:0">
+
+                            <INPUT class="form-control" name="q" type="text" placeholder="Search">
+
+                        </div>
+
+                    </FORM>
+
+                     </li>
+
+
+
+                </ul>
+
+
+
+                <!-- Left Nav Section -->
+
+                <ul class="left">
+
+
+
+                    <li class="has-dropdown">
+
+                      <a href="#" >Demos</b></a>
+
+                      <ul class="dropdown">
+
+                        <li><a href="/intro/elevator-pitch/isis-in-pictures.html">Screenshots</a></li>
+
+                        <li><a href="/intro/tutorials/screencasts.html">Screencasts&nbsp;<img src="/images/tv_show-25.png"></a></li>
+
+                        <li><a href="/intro/powered-by/powered-by.html">Powered by</a></li>
+
+                        <li><a href="http://isisdemo.mmyco.co.uk/" target="_blank">Online Demo</a></li>
+
+                      </ul>
+
+                    </li>
+
+
+
+                    <li><a href="/documentation">Documentation</a></li>
+
+
+
+                    <li class="has-dropdown">
+
+                      <a href="#">Downloads</a>
+
+                      <ul class="dropdown">
+
+                        <li><a href="/intro/getting-started/simpleapp-archetype.html">Isis (Maven archetype)</a></li>
+
+                        <li><a href="/download.html">Isis (downloads)</a></li>
+
+                        <li><a href="http://www.isisaddons.org" target="_blank">Isis Add-ons (not ASF)</a></li>
+
+                      </ul>
+
+                    </li>
+
+
+
+                    <li class="has-dropdown">
+
+                      <a href="#">Help</a>
+
+                      <ul class="dropdown">
+
+                        <li><a href="/support.html">Mailing Lists</a></li>
+
+                        <li><a href="http://isis.markmail.org/search/?q=" target="_blank">Mailing List Archives</a></li>
+
+                        <li><a href="https://issues.apache.org/jira/browse/ISIS" target="_blank">JIRA</a></li>
+
+                        <li><a href="http://github.com/apache/isis" target="_blank">Github mirror</a></li>
+
+                        <li><a href="http://stackoverflow.com/questions/tagged/isis" target="_blank">Stack Overflow</a></li>
+
+                        <li><a href="/contributors/contributing.html">How to contribute</a></li>
+
+                      </ul>
+
+                    </li>
+
+
+
+                    <li class="has-dropdown">
+
+                      <a href="#" >@ASF</a>
+
+                      <ul class="dropdown">
+
+                        <li>
+
+                          <a href="http://www.apache.org/" target="_blank">Apache Homepage <i class="icon-share-alt"></i></a>
+
+                        </li>
+
+                        <li>
+
+                          <a href="http://www.apache.org/licenses/" target="_blank">Licenses <i class="icon-share-alt"></i></a>
+
+                        </li>
+
+                        <li>
+
+                          <a href="http://www.apache.org/security/" target="_blank">Security <i class="icon-share-alt"></i></a>
+
+                        </li>
+
+                        <li>
+
+                          <a href="http://www.apache.org/foundation/sponsorship.html" target="_blank">Sponsorship <i class="icon-share-alt"></i></a>
+
+                        </li>
+
+                        <li>
+
+                          <a href="http://www.apache.org/foundation/thanks.html">Thanks <i class="icon-share-alt"></i></a>
+
+                        </li>
+
+                        <li>
+
+                          <a href="{{base}}more-thanks.html">More thanks <i class="icon-share-alt"></i></a>
+
+                        </li>
+
+                      </ul>
+
+                    </li>
+
+
+
+                </ul>
+
+
+
+            </section>
+
+        </nav>
+
+    </div>
+
+</div>
+
+
+
+<div class="row">
+
+    <div class="large-12 medium-12 columns">
+
+
+
+        <div id="doc-content">
+
+          <div class="sect1">
+<h2 id="_core_concepts">1. Core Concepts</h2>
+<div class="sectionbody">
+<div class="paragraph">
+<p>This introductory chapter should give you a good about what Apache Isis actually <strong>is</strong>: the fundamental ideas and principles that it builds upon, how it compares with other frameworks, what the fundamental building blocks are for actually writing an Isis application, and what services and features the framework provides for you to leverage in your own apps.</p>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>Parts of this chapter have been adapted from Dan Haywood&#8217;s 2009 book, 'Domain Driven Design using Naked Objects'.  We&#8217;ve also added some new insights and made sure the material we&#8217;ve used is relevant to Apache Isis.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_philosophy_and_architecture">1.1. Philosophy and Architecture</h3>
+<div class="paragraph">
+<p>This section describes some of the core ideas and architectural patterns upon which Apache Isis builds.</p>
+</div>
+<div class="sect3">
+<h4 id="_domain_driven_design">1.1.1. Domain-Driven Design</h4>
+<div class="paragraph">
+<p>This section describes some of the core ideas and architectural patterns upon which Apache Isis builds.</p>
+</div>
+<div class="paragraph">
+<p>There&#8217;s no doubt that we developers love the challenge of understanding and deploying complex technologies. But understanding the nuances and subtleties of the business domain itself is just as great a challenge, perhaps more so. If we devoted our efforts to understanding and addressing those subtleties, we could build better, cleaner, and more maintainable software that did a better job for our stakeholders. And there&#8217;s no doubt that our stakeholders would thank us for it.</p>
+</div>
+<div class="paragraph">
+<p>A couple of years back Eric Evans wrote his book <a href="http://www.amazon.co.uk/Domain-driven-Design-Tackling-Complexity-Software/dp/0321125215">Domain-Driven Design</a>, which is well on its way to becoming a seminal work. In fact, most if not all of the ideas in Evans' book have been expressed before, but what he did was pull those ideas together to show how predominantly object-oriented techniques can be used to develop rich, deep, insightful, and ultimately useful business applications.</p>
+</div>
+<div class="paragraph">
+<p>There are two central ideas at the heart of domain-driven design.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>the <strong><em>ubiquitous language</em></strong> is about getting the whole team (both domain experts and developers) to communicate more transparently using a domain model.</p>
+</li>
+<li>
+<p>Meanwhile, <strong><em>model-driven design</em></strong> is about capturing that model in a very straightforward manner in code.</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Let&#8217;s look at each in turn.</p>
+</div>
+<div class="sect4">
+<h5 id="_ubiquitous_language">Ubiquitous Language</h5>
+<div class="paragraph">
+<p>It&#8217;s no secret that the IT industry is plagued by project failures. Too often systems take longer than intended to implement, and when finally implemented, they don&#8217;t address the real requirements anyway.</p>
+</div>
+<div class="paragraph">
+<p>Over the years we in IT have tried various approaches to address this failing. Using waterfall methodologies, we&#8217;ve asked for requirements to be fully and precisely written down before starting on anything else. Or, using agile methodologies, we&#8217;ve realized that requirements are likely to change anyway and have sought to deliver systems incrementally using feedback loops to refine the implementation.</p>
+</div>
+<div class="paragraph">
+<p>But let&#8217;s not get distracted talking about methodologies. At the end of the day what really matters is communication between the domain experts (that is, the business) who need the system and the techies actually implementing it. If the two don&#8217;t have and cannot evolve a shared understanding of what is required, then the chance of delivering a useful system will be next to nothing.</p>
+</div>
+<div class="paragraph">
+<p>Bridging this gap is traditionally what business analysts are for; they act as interpreters between the domain experts and the developers. However, this still means there are two (or more) languages in use, making it difficult to verify that the system being built is correct. If the analyst mistranslates a requirement, then neither the domain expert nor the application developer will discover this until (at best) the application is first demonstrated or (much worse) an end user sounds the alarm once the application has been deployed into production.</p>
+</div>
+<div class="paragraph">
+<p>Rather than trying to translate between a business language and a technical language, with  <em>DDD</em> we aim to have the business and developers using the same terms for the same concepts in order to create a single <strong><em>domain model</em></strong>. This domain model identifies the relevant concepts of the domain, how they relate, and ultimately where the responsibilities are. This single domain model provides the vocabulary for the  ubiquitous language for our system.</p>
+</div>
+<div class="sidebarblock">
+<div class="content">
+<div class="title">Ubiquitous Language</div>
+<div class="paragraph">
+<p>Build a common language between the domain experts and developers by using the concepts of the domain model as the primary means of communication. Use the terms in speech, in diagrams, in writing, and when presenting.</p>
+</div>
+<div class="paragraph">
+<p>If an idea cannot be expressed using this set of concepts, then go back and extend the model. Look for and remove ambiguities and inconsistencies.</p>
+</div>
+</div>
+</div>
+<div class="paragraph">
+<p>Creating a  ubiquitous language calls upon everyone involved in the system&#8217;s development to express what they are doing through the vocabulary provided by the model. If this can&#8217;t be done, then our model is incomplete. Finding the missing words deepens our understanding of the domain being modeled.</p>
+</div>
+<div class="paragraph">
+<p>This might sound like nothing more than me insisting that the developers shouldn&#8217;t use jargon when talking to the business. Well, that&#8217;s true enough, but it&#8217;s not a one-way street. A  <strong>ubiquitous language</strong> demands that the developers work hard to understand the problem domain, but it also demands that the business works hard in being  <strong>precise</strong> in its naming and descriptions of those concepts. After all, ultimately the developers will have to express those concepts in a computer programming language.</p>
+</div>
+<div class="paragraph">
+<p>Also, although here I&#8217;m talking about the "domain experts" as being a homogeneous group of people, often they may come from different branches of the business. Even if we weren&#8217;t building a computer system, there&#8217;s a lot of value in helping the domain experts standardize their own terminology. Is the marketing department&#8217;s "prospect" the same as sales' "customer," and is that the same as an after-sales "contract"?</p>
+</div>
+<div class="paragraph">
+<p>The need for precision within the  ubiquitous language also helps us scope the system. Most business processes evolve piecemeal and are often quite ill-defined. If the domain experts have a very good idea of what the business process should be, then that&#8217;s a good candidate for automation, that is, including it in the scope of the system. But if the domain experts find it hard to agree, then it&#8217;s probably best to leave it out. After all, human beings are rather more capable of dealing with fuzzy situations than computers.</p>
+</div>
+<div class="paragraph">
+<p>So, if the development team (business and developers together) continually searches to build their  ubiquitous language, then the domain model naturally becomes richer as the nuances of the domain are uncovered. At the same time, the knowledge of the business domain experts also deepens as edge conditions and contradictions that have previously been overlooked are explored.</p>
+</div>
+<div class="paragraph">
+<p>We use the  ubiquitous language to build up a domain model. But what do we do  <strong>with</strong> that model? The answer to that is the second of our central ideas.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_model_driven_design">Model-Driven Design</h5>
+<div class="paragraph">
+<p>Of the various methodologies that the IT industry has tried, many advocate the production of separate analysis models and implementation models. One example (from the mid 2000s) was that of the  <em>OMG</em>'s Model-Driven Architecture ( <em>MDA</em>) initiative, with its platform-independent model (the  <em>PIM</em>) and a platform-specific model (the  <em>PSM</em>).</p>
+</div>
+<div class="paragraph">
+<p>Bah and humbug! If we use our  ubiquitous language just to build up a high-level analysis model, then we will re-create the communication divide. The domain experts and business analysts will look only to the analysis model, and the developers will look only to the implementation model. Unless the mapping between the two is completely mechanical, inevitably the two will diverge.</p>
+</div>
+<div class="paragraph">
+<p>What do we mean by  <strong>model</strong> anyway? For some, the term will bring to mind  <em>UML</em> class or sequence diagrams and the like. But this isn&#8217;t a model; it&#8217;s a visual  <strong>representation</strong> of some aspect of a model. No, a domain model is a group of related concepts, identifying them, naming them, and defining how they relate. What is in the model depends on what our objective is. We&#8217;re not looking to simply model everything that&#8217;s out there in the real world. Instead, we want to take a relevant abstraction or simplification of it and then make it do something useful for us.  A model is neither right nor wrong, just more or less useful.</p>
+</div>
+<div class="paragraph">
+<p>For our  ubiquitous language to have value, the domain model that encodes it must have a straightforward, literal representation to the design of the software, specifically to the implementation. Our software&#8217;s design should be driven by this model; we should have a model-driven design.</p>
+</div>
+<div class="sidebarblock">
+<div class="content">
+<div class="title">Model-Driven Design</div>
+<div class="paragraph">
+<p>There must be a straightforward and very literal way to represent the domain model in terms of software. The model should balance these two requirements: form the  ubiquitous language of the development team and be representable in code.</p>
+</div>
+<div class="paragraph">
+<p>Changing the code means changing the model; refining the model requires a change to the code.</p>
+</div>
+</div>
+</div>
+<div class="paragraph">
+<p>Here also the word  <strong>design</strong> might mislead; some might again be thinking of design documents and design diagrams. But by  <strong>design</strong> we mean a way of organizing the domain concepts, which in turn leads to the way in which we organize their representation in code.</p>
+</div>
+<div class="paragraph">
+<p>Luckily, using <strong><em>object-oriented</em></strong> ( <em>OO</em>) languages such as Java, this is relatively easy to do;  <em>OO</em> is based on a modeling paradigm anyway. We can express domain concepts using classes and interfaces, and we can express the relationships between those concepts using associations.</p>
+</div>
+<div class="paragraph">
+<p>So far so good. Or maybe, so far so much motherhood and apple pie. Understanding the  <em>DDD</em> concepts isn&#8217;t the same as being able to apply them, and some of the  <em>DDD</em> ideas can be difficult to put into practice. Time to discuss the naked objects pattern and how it eases that path by applying these central ideas of <em>DDD</em> in a very concrete way.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_naked_objects_pattern">1.1.2. Naked Objects Pattern</h4>
+<div class="paragraph">
+<p>Apache Isis implements the naked objects pattern, originally formulated by Richard Pawson.  So who better than Richard to explain the origination of the idea?</p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote-first"><p>The Naked Objects pattern arose, at least in part, from my own frustration at the lack of success of the domain-driven approach. Good examples were hard to find&#8212;&#8203;as they are still.
+</p></div></p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote"><p>A common complaint from <em>DDD</em> practitioners was that it was hard to gain enough commitment from business stakeholders, or even to engage them at all. My own experience suggested that it was nearly impossible to engage business managers with <em>UML</em> diagrams.  It was much easier to engage them in rapid prototyping&#8201;&#8212;&#8201;where they could see and interact with the results&#8201;&#8212;&#8201;but most forms of rapid prototyping concentrate on the presentation layer, often at the expense of the underlying model and certainly at the expense of abstract thinking.
+</p></div></p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote"><p>Even if you could engage the business sponsors sufficiently to design a domain model, by the time you&#8217;d finished developing the system on top of the domain model, most of its benefits had disappeared. It&#8217;s all very well creating an agile domain object model, but if any change to that model also dictates the modification of one or more layers underneath it (dealing with persistence) and multiple layers on top (dealing with presentation), then that agility is practically worthless.
+</p></div></p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote"><p>The other concern that gave rise to the birth of Naked Objects was how to make user interfaces of mainstream business systems more "expressive"&#8201;&#8212;&#8201;how to make them feel more like using a drawing program or <em>CAD</em> system. Most business systems are not at all expressive; they treat the user merely as a dumb <strong>process-follower</strong>, rather than as an empowered <strong>problem-solver</strong>.  Even the so-called usability experts had little to say on the subject: try finding the word "empowerment" or any synonym thereof in the index of any book on usability. Research had demonstrated that the best way to achieve expressiveness was to create an object-oriented user interface (<em>OOUI</em>). In practice, though, <em>OOUI</em>s were notoriously hard to develop.
+</p></div></p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote"><p>Sometime in the late 1990s, it dawned on me that if the domain model really did represent the "ubiquitous language" of the business and those domain objects were behaviorally rich (that is, business logic is encapsulated as methods on the domain objects rather than in procedural scripts on top of them), then the <em>UI</em> could be nothing more than a reflection of the user interface. This would solve both of my concerns. It would make it easier to do domain-driven design, because one could instantly translate evolving domain modeling ideas into a working prototype. And it would deliver an expressive, object-oriented user interface for free. Thus was born the idea of Naked Objects.
+</p></div></p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote-attribution"><p>-- Richard Pawson
+</p></div></p>
+</div>
+<div class="paragraph">
+<p>You can learn much more about the pattern in the book, <a href="http://www.amazon.com/exec/obidos/ISBN=0470844205/">Naked Objects</a>, also freely available to <a href="http://www.nakedobjects.org/book/">read online</a>.  Richard co-wrote the book with one of Isis' committers, Robert Matthews, who was in turn the author of the Naked Objects Framework for Java (the original codebase of of Apache Isis).</p>
+</div>
+<div class="paragraph">
+<p>You might also want to read Richard&#8217;s <a href="core-concepts/Pawson-Naked-Objects-thesis.pdf">PhD on the subject</a>.</p>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>One of the external examiners for Richard&#8217;s PhD was <a href="http://en.wikipedia.org/wiki/Trygve_Reenskaug">Trygve Reenskaug</a>, who originally formulated the MVC pattern at Xeroc PARC.  In his paper, <a href="http://heim.ifi.uio.no/~trygver/2007/2007.02.13-babyUML.pdf">Baby UML</a>, Reenskaug describes that when implemented the first MVC, "the conventional wisdom in the group was that objects should be visible and tangible, thus bridging the gap between the human brain and the abstract data within the computer."  Sound familiar?  It&#8217;s interesting to speculate what might have been if this idea had been implemented back then in the late 70s.</p>
+</div>
+<div class="paragraph">
+<p>Reenskaug then goes on to say that "this simple and powerful idea failed because &#8230;&#8203; users were used to seeing [objects] from different perspectives. The visible and tangible object would get very complex if it should be able to show itself and be manipulated in many different ways."</p>
+</div>
+<div class="paragraph">
+<p>In Apache Isis the responsibility of rendering an object is not the object itself, it is the framework.  Rather, the object inspects the object and uses that to decide how to render the object.  This is also extensible.  In the <a href="http://isisaddons.org">Isis Addons</a> (non-ASF) the <a href="http://github.com/isisaddons/isis-wicket-gmap3}">Isis addons' gmap3 modue</a> renders any object with latitude/longitude on a map, while <a href="http://github.com/isisaddons/isis-wicket-fullcalendar2}">Isis addons' fullcalendar2 wicket extension</a> renders any object with date(s) on a calendar.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="sect5">
+<h6 id="_object_interface_mapping">Object Interface Mapping</h6>
+<div class="paragraph">
+<p>Another&#8201;&#8212;&#8201;more technical&#8201;&#8212;&#8201;way to think about the naked objects pattern is as an <em>object interface mapper</em>, or <code>OIM</code>.  We sometimes use this idea to explain naked objects to a bunch of developers.</p>
+</div>
+<div class="paragraph">
+<p>Just as an ORM (such as <a href="http://datanucleus.org">DataNucleus</a> or <a href="http:hibernate.org">Hibernate</a>) maps domain entities to a database, you can think of the naked objects pattern as representing the concept of mapping domain objects to a user interface.</p>
+</div>
+<div class="paragraph">
+<p>This is the way that the <a href="http://metawidget.org/">MetaWidget</a> team, in particular Richard Kennard, the primary contributor, likes to describe their tool.  MetaWidget has a number of ideas in common with Apache Isis, specifically the runtime generation of a UI for domain objects.  You can hear more from Kennard and others on this <a href="http://devchat.tv/js-jabber/150-jsj-oims">Javascript Jabber podcast</a>.</p>
+</div>
+<div class="admonitionblock note">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-note" title="Note"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>We compare Apache Isis' with MetaWidget <a href="#_vs_metawidget">here</a>.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_hexagonal_architecture">1.1.3. Hexagonal Architecture</h4>
+<div class="paragraph">
+<p>One of the patterns that Evans discusses in his book is that of a <strong>layered architecture</strong>.  In it he describes why the domain model lives in its own layer within the architecture. The other layers of the application (usually presentation, application, and persistence) have their own responsibilities, and are completely separate.  Each layer is cohesive and depending only on the layers below.  In particular, we have a layer dedicated to the domain model. The code in this layer is unencumbered with the (mostly technical) responsibilities of the other layers and so can evolve to tackle complex domains as well as simple ones.</p>
+</div>
+<div class="paragraph">
+<p>This is a well-established pattern, almost a de-facto; there&#8217;s very little debate that these responsibilities should be kept separate from each other.  With Apache Isis the responsibility for presentation is a framework concern, the responsibility for the domain logic is implemented by the (your) application code.</p>
+</div>
+<div class="paragraph">
+<p>A few years ago Alistair Cockburn reworked the traditional layered architecture diagram and came up with the <strong><em>hexagonal architecture</em></strong>:.</p>
+</div>
+<div class="admonitionblock tip">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-tip" title="Tip"></i>
+</td>
+<td class="content">
+<div class="paragraph">
+<p>The hexagonal architecture is also known as the <a href="http://c2.com/cgi/wiki?PortsAndAdaptersArchitecture:">Ports and Adapters</a> architecture or (less frequently) as the <a href="http://jeffreypalermo.com/blog/the-onion-architecture-part-1/">Onion</a> architecture.</p>
+</div>
+</td>
+</tr>
+</table>
+</div>
+<div class="imageblock">
+<div class="content">
+<img src="images/core-concepts/philosophy/hexagonal-architecture.png" alt="hexagonal architecture" width="700px">
+</div>
+<div class="title">Figure 1. The hexagonal architecture emphasizes multiple implementations of the different layers.</div>
+</div>
+<div class="paragraph">
+<p>What Cockburn is emphasizing is that there&#8217;s usually more than one way <strong>into</strong> an application (what he called the <strong><em>user-side' ports</em></strong>) and more than one way  <strong>out of</strong> an application too (the <strong><em>data-side ports</em></strong>). This is very similar to the concept of primary and secondary actors in use cases: a primary actor (often a human user but not always) is active and initiates an interaction, while a secondary actor (almost always an external system) is passive and waits to be interacted with.</p>
+</div>
+<div class="paragraph">
+<p>Associated with each port can be an <strong><em>adapter</em></strong> (in fact, Cockburn&#8217;s alternative name for this architecture is <strong><em>ports and adapters</em></strong>). An adapter is a device (piece of software) that talks in the protocol (or  <em>API</em>) of the port. Each port could have several adapters.</p>
+</div>
+<div class="paragraph">
+<p>Apache Isis maps very nicely onto the  <strong>hexagonal architecture</strong>.  Isis' viewers act as user-side adapters and use the Isis metamodel API as a port into the domain objects.   For the data side, we are mostly concerned with persisting domain objects to some sort of object store.  Here Apache Isis delegates most of the heavy lifting to ORM implementing the JDO API.  Most of the time this will be DataNucleus configured to persist to an RDBMS, but DataNucleus can also support other object stores, for example Neo4J.  Alternatively Isis can be configured to persist using some other JDO implementation, for example Google App Engine.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_aspect_oriented">1.1.4. Aspect Oriented</h4>
+<div class="paragraph">
+<p>Although not a book about object modelling, Evans' "Domain Driven Design" does use object orientation as its primary modelling tool; and many tend to think of <a href="#_domain_driven_design">DDD</a> as an updated treatise on good object modelling, in the same vein as Rebecca Wirf Brock&#8217;s Responsibility Driven Design, say.  Meanwhile the <a href="#_naked_objects_pattern">naked objects pattern</a> very much comes from an OO background (it even has 'object' in its name); and Richard Pawson lists Alan Kay as one of his idols.</p>
+</div>
+<div class="paragraph">
+<p>It&#8217;s certainly true that to develop an Apache Isis application you will need to have good object oriented modelling skills.  Given that all the mainstream languages for developing business systems are object oriented (Java, C#, Ruby), that&#8217;s not such a stretch.</p>
+</div>
+<div class="paragraph">
+<p>However, what you&#8217;ll also find as you write your applications is that in some ways an Isis application is more aspect-oriented than it is object oriented.  Given that aspect-orientation&#8201;&#8212;&#8201;as a programming paradigm at least&#8201;&#8212;&#8201;hasn&#8217;t caught on, that statement probably needs unpacking a little.</p>
+</div>
+<div class="paragraph">
+<p>Aspect-orientation, then, is a different way of decomposing your application, by treating <em>cross-cutting concerns</em> as a first-class citizen.  The canonical (also rather boring) example of a cross-cutting concern is that of logging (or tracing) all method calls.  An aspect can be written that will weave in some code (a logging statement) at specified points in the code).</p>
+</div>
+<div class="paragraph">
+<p>This idea sounds rather abstract, but what it really amounts to is the idea of interceptors.  When one method calls another the AOP code is called in first.  This is actually then one bit of AOP that is quite mainstream; DI containers such as Spring provide aspect orientation in supporting annotations such as <code>@Transactional</code> or <code>@Secured</code> to java beans.</p>
+</div>
+<div class="paragraph">
+<p>Another aspect (ahem!) of aspect-oriented programming has found its way into other programming languages, that of a mix-in or trait.  In languages such as Scala these mix-ins are specified statically as part of the inheritance hierarchy, whereas with AOP the binding of a trait to some other class/type is done without the class "knowing" that additional behaviour is being mixed-in to it.</p>
+</div>
+<div class="paragraph">
+<p>What has all this to do with Apache Isis, then?</p>
+</div>
+<div class="paragraph">
+<p>Well, a different way to think of the naked objects pattern is that the visualization of a domain object within a UI is a cross-cutting concern.  By following certain very standard programming conventions that represent the <em>Apache Isis Programming Model</em> (POJOs plus annotations), the framework is able to build a metamodel and from this can render your domain objects in a standard generic fashion.  That&#8217;s a rather more interesting cross-cutting concern than boring old logging!</p>
+</div>
+<div class="paragraph">
+<p>Isis also draws heavily on the AOP concept of interceptors.  Whenever an object is rendered in the UI, it is filtered with respect to the user&#8217;s permissions.  That is, if a user is not authorized to either view or perhaps modify an object, then this is applied transparently by the framework.  The <a href="http://github.com/isisaddons/isis-module-security}">Isis addons' security</a> module, mentioned previously, provides a rich user/role/permissions subdomain to use out of the box; but you can integrate with a different security mechanism if you have one already.</p>
+</div>
+<div class="paragraph">
+<p>Another example of interceptors are the <a href="http://github.com/isisaddons/isis-module-command}">Isis addons' command</a> and <a href="http://github.com/isisaddons/isis-module-audit}">Isis addons' audit</a> modules.  The command module captures every user interaction that modifies the state of the system (the "cause" of a change) while the audit module captures every change to every object (the "effect" of a change).  Again, this is all transparent to the user.</p>
+</div>
+<div class="paragraph">
+<p>Apache Isis also has an internal event bus (you can switch between an underlying implementation of Gauva or Axon).  A domain event is fired whenever an object is interacted with, and this allows any subscribers to influence the operation (or even veto it).  This is a key mechanism in ensuring that Isis applications are maintainable, and we discuss it in depth in the <a href="#_decoupling">Decoupling</a> chapter.  But fundamentally its relying on this AOP concept of interceptors.</p>
+</div>
+<div class="paragraph">
+<p>Finally, Isis also a feature that is akin to AOP mix-ins.  A "contributed action" is one that is implemented on a domain service but that appears to be a behaviour of rendered domain object.  In other words, we can dissociate behaviour from data.  That&#8217;s not always the right thing to do of course; in Richard&#8217;s description of the <a href="#_naked_objects_pattern">naked objects pattern</a> he talks about "behaviourally rich" objects, in other words where the business functionality encapsulated the data: OO as your mother taught you!  But equally sometimes the behaviour and data structures change at different rates; the single responsibility pattern says we should only lump code together that changes at the same rate.  Isis' support for contributions (not only contributed actions, but also contributed properties and contributed collections) enables this.  And again, to loop back to the topic of this section, it&#8217;s an AOP concept that being implemented by the framewo
 rk.</p>
+</div>
+<div class="paragraph">
+<p>The nice thing about aspect orientation is that for the most part you can ignore these cross-cutting concerns and - at least initially at least - just focus on implementing your domain object.  Later when your app starts to grow and you start to break it out into smaller modules, you can leverage Isis' AOP support for mixins (contributions) see interceptors (the event bus) to ensure that your codebase remains maintainable.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_how_apache_isis_eases_ddd">1.1.5. How Apache Isis eases DDD</h4>
+<div class="paragraph">
+<p>The case for  <em>DDD</em> might be compelling, but that doesn&#8217;t necessarily make it easy to do. Let&#8217;s take a look at some of the
+challenges that  <em>DDD</em> throws up and see how Apache Isis (and its implementation of the naked objects pattern) helps address them.</p>
+</div>
+<div class="sect4">
+<h5 id="_ddd_takes_a_conscious_effort">DDD takes a conscious effort</h5>
+<div class="paragraph">
+<p>Here&#8217;s what Eric Evans says about ubiquitous language:</p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote-first"><p>With a conscious effort by the [development] team the domain model can provide the backbone for [the] common [ubiquitous] language&#8230;&#8203;connecting team communication to the software implementation."
+</p></div></p>
+</div>
+<div class="paragraph">
+<p><div class="extended-quote-attribution"><p>-- Eric Evans
+</p></div></p>
+</div>
+<div class="paragraph">
+<p>The word to pick up on here is <strong>conscious</strong>.  It takes a conscious effort by the entire team to develop the ubiquitous language. Everyone in the team must challenge the use of new or unfamiliar terms, must clarify concepts when used in a new context, and in general must be on the lookout for sloppy thinking. This takes willingness on the part of all involved, not to mention some practice.</p>
+</div>
+<div class="paragraph">
+<p>With Apache Isis, though, the  ubiquitous language evolves with scarcely any effort at all. For the business experts, the Isis viewers show the domain concepts they identify and the relationships between those concepts in a straightforward fashion. Meanwhile, the developers can devote themselves to encoding those domain concepts directly as domain classes. There&#8217;s no technology to get distracted by; there is literally nothing else for the developers to work on.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_ddd_must_be_grounded">DDD must be grounded</h5>
+<div class="paragraph">
+<p>Employing a  model-driven design isn&#8217;t necessarily straightforward, and the development processes used by some organizations positively hinder it. It&#8217;s not sufficient for the business analysts or architects to come up with some idealized representation of the business domain and then chuck it over the wall for the programmers to do their best with.</p>
+</div>
+<div class="paragraph">
+<p>Instead, the concepts in the model must have a very literal representation in code. If we fail to do this, then we open up the communication divide, and our  ubiquitous language is lost. There is literally no point having a domain model that cannot be represented in code. We cannot invent our ubiquitous language in a vacuum, and the developers must ensure that the model remains grounded in the doable.</p>
+</div>
+<div class="paragraph">
+<p>In Apache Isis, we have a very pure one-to-one correspondence between the domain concepts and its implementation. Domain concepts are represented as classes and interfaces, easily demonstrated back to the business. If the model is clumsy, then the application will be clumsy too, and so the team can work together to find a better implementable model.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_abstract_models_are_difficult_to_represent">Abstract models are difficult to represent</h5>
+<div class="paragraph">
+<p>If we are using code as the primary means of expressing the model, then we need to find a way to make this model understandable to the business.</p>
+</div>
+<div class="paragraph">
+<p>We could generate  <em>UML</em> diagrams and the like from code. That will work for some members of the business community, but not for everyone. Or we could generate a  <em>PDF</em> document from Javadoc comments, but comments aren&#8217;t code and so the document may be inaccurate.  Anyway, even if we do create such a document, not everyone will read it.</p>
+</div>
+<div class="paragraph">
+<p>A better way to represent the model is to show it in action as a working prototype. As we show in the <a href="#_getting_started">Getting Started</a> section, Apache Isis enables this with ease. Such prototypes bring the domain model to life, engaging the audience in a way that a piece of paper never can.</p>
+</div>
+<div class="paragraph">
+<p>Moreover, with Apache Isis prototypes, the domain model will come shining through. If there are mistakes or misunderstandings in the domain model (inevitable when building any complex system), they will be obvious to all.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_layered_architectures_are_easily_compromised">Layered architectures are easily compromised</h5>
+<div class="paragraph">
+<p><em>DDD</em> rightly requires that the domain model lives in its own layer within the architecture. The other layers of the application (usually presentation, application, and persistence) have their own responsibilities, and are completely separate.</p>
+</div>
+<div class="paragraph">
+<p>However, there are two immediate issues. The first is rather obvious: custom coding each of those other layers is an expensive proposition. Picking up on the previous point, this in itself can put the kibosh on using prototyping to represent the model, even if we wanted to do so.</p>
+</div>
+<div class="paragraph">
+<p>The second issue is more subtle. It takes real skill to ensure the correct separation of concerns between these layers, if indeed you can get an agreement as to what those concerns actually are. Even with the best intentions, it&#8217;s all too easy for custom-written layers to blur the boundaries and put (for example) validation in the user interface layer when it should belong to the domain layer. At the other extreme, it&#8217;s quite possible for custom layers to distort or completely subvert the underlying domain model.</p>
+</div>
+<div class="paragraph">
+<p>Because of Apache Isis' generic  <em>OOUI</em>s, there&#8217;s no need to write the other layers of the architecture.  Of course, this reduces the development cost. But more than that, there will be no leakage of concerns outside the domain model. All the validation logic <strong>must</strong> be in the domain model because there is nowhere else to put it.</p>
+</div>
+<div class="paragraph">
+<p>Moreover, although Apache Isis does provide a complete runtime framework, there is no direct coupling of your domain model to the framework. That means it is very possible to take your domain model prototyped in Naked Objects and then deploy it on some other  <em>J(2)EE</em> architecture, with a custom <em>UI</em> if you want.  Isis guarantees that your domain model is complete.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_extending_the_reach_of_ddd">Extending the reach of DDD</h5>
+<div class="paragraph">
+<p>Domain-driven design is often positioned as  being applicable only to complex domains; indeed, the subtitle of Evans book is  "Tackling Complexity in the Heart of Software". The corollary is that DDD is overkill for simpler domains. The trouble is that we immediately have to make a choice: is the domain complex enough to warrant a domain-driven approach?</p>
+</div>
+<div class="paragraph">
+<p>This goes back to the previous point, building and maintaining a layered architecture. It doesn&#8217;t seem cost effective to go to all the effort of a DDD approach if the underlying domain is simple.</p>
+</div>
+<div class="paragraph">
+<p>However, with Apache Isis, we don&#8217;t write these other layers, so we don&#8217;t have to make a call on how complex our domain is. We can start working solely on our domain, even if we suspect it will be simple. If it is indeed a simple domain, then there&#8217;s no hardship, but if unexpected subtleties arise, then we&#8217;re in a good position to handle them.</p>
+</div>
+<div class="paragraph">
+<p>If you&#8217;re just starting out writing domain-driven applications, then Apache Isis should significantly ease your journey into applying <em>DDD</em>. On the other hand, if you&#8217;ve used <em>DDD</em> for a while, then you should find Isis a very useful new tool in your arsenal.</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_principles_and_values">1.2. Principles and Values</h3>
+<div class="paragraph">
+<p>This section describes some of the core principles and values that the framework aims to honour and support.</p>
+</div>
+<div class="paragraph">
+<p>The first of these relate to how we believe your domain application should be written: it should be decoupled, testable and so on).  Others relate to the implementation of the framework itself.</p>
+</div>
+<div class="paragraph">
+<p>The section concludes by contrasting the framework with some other open source frameworks commonly used.</p>
+</div>
+<div class="sect3">
+<h4 id="_your_applications">1.2.1. Your Applications</h4>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+<div class="sect4">
+<h5 id="_decoupled">Decoupled</h5>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO &#8230;&#8203;
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>Long-term Cost of ownership</p>
+</div>
+<div class="paragraph">
+<p>Using:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>dependency injection of services</p>
+</li>
+<li>
+<p>OO design techniques, eg dependency inversion principle</p>
+</li>
+<li>
+<p>an in-memory event bus</p>
+</li>
+<li>
+<p>applib</p>
+</li>
+<li>
+<p>(no "Big Ball of Mud")</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_honouring_the_single_responsibility_principle">Honouring the Single Responsibility Principle</h5>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>behaviourally Complete vs Contributions</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_testable">Testable</h5>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>While Apache Isis can be used (very effectively) for simple CRUD-style applications, it is also intended to be used for complex business domains.  Ensuring that the business logic in such applications is correct means that the framework must (and does) provide robust testing support, both for developer-level unit testing and business-level (end-to-end) integration testing.</p>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_isis_itself">1.2.2. Isis itself</h4>
+<div class="paragraph">
+<p>This section discusses some of the principles and values we apply to the development of the Apache Isis framework itself.</p>
+</div>
+<div class="sect4">
+<h5 id="_full_stack_but_extensible">Full-stack but Extensible</h5>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_focuses_on_its_usp">Focuses on its USP</h5>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+<div class="paragraph">
+<p>add-ons</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>Isis is at heart a metamodel with runtime, and coordinates interations using an AOP set of principles</p>
+</li>
+<li>
+<p>Apache Isis vs Isis Addons</p>
+</li>
+<li>
+<p>Apache Isis vs Shiro vs DataNucleus</p>
+<div class="olist lowerroman">
+<ol class="lowerroman" type="i">
+<li>
+<p>all code has legacy in it&#8230;&#8203;. parts of the Isis codebase are well over a decade old; and back then a lot of the JEE technologies that we&#8217;d like to be using just didn&#8217;t exist, so we had to invent the features we required ourselves.</p>
+</li>
+<li>
+<p>also, Apache Isis today is more pragmatic than previously</p>
+</li>
+</ol>
+</div>
+</li>
+<li>
+<p>a client/server solution, with AWT-based client</p>
+</li>
+<li>
+<p>a HTML browser, Scimpi (JSF-like, but not using JSF), &#8230;&#8203;</p>
+</li>
+<li>
+<p>security</p>
+</li>
+<li>
+<p>objectstores</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>We&#8217;re working hard to remove duplication, reuse existing open source/JEE, and simplify.</p>
+</div>
+<div class="paragraph">
+<p>The areas of Isis we consider mature are those that have been developed in support of real-world applications implemented by the committers.  Foremost among these is Estatio.</p>
+</div>
+<div class="paragraph">
+<p>Focus on enterprise / line-of-business applications, for use by internal staff.</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>problem solvers, not process followers</p>
+</li>
+<li>
+<p>view models</p>
+</li>
+</ul>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_apache_isis_vs">1.2.3. Apache Isis vs &#8230;&#8203;</h4>
+<div class="paragraph">
+<p>Many other frameworks promise rapid application development and provide automatically generated user interfaces, so how
+do they compare to Apache Isis?</p>
+</div>
+<div class="sect4">
+<h5 id="_vs_mvc_server_side_frameworks">vs MVC server-side frameworks</h5>
+<div class="paragraph">
+<p>Some of most commonly used frameworks today are <a href="http://www.springframework.org/">Spring MVC</a>, <a href="http://rubyonrails.org/">Ruby on Rails</a> and <a href="http://www.grails.org">Grails</a>, all of which implement one flavour or another of the server-side MVC pattern.  The MVC 1.0 specification (scheduled for JavaEE 8) is also similar.</p>
+</div>
+<div class="paragraph">
+<p>These frameworks all use the classic  <strong>model-view-controller</strong> ( <em>MVC</em>) pattern for web applications, with scaffolding, code-generation, and/or metaprogramming tools for the controllers and views, as well as convention over configuration to define how these components interact.  The views provided out of the box by these frameworks tend to be simple  <em>CRUD</em>-style interfaces. More sophisticated behavior is accomplished by customizing the generated controllers.</p>
+</div>
+<div class="paragraph">
+<p>The most obvious difference when developing an Apache Isis application is its deliberate lack of an explicit controller layer; non- <em>CRUD</em> behavior is automatically made available in its generic object-oriented  _UI_s.  More sophisticated UIs can be built either by <a href="#_extending_the_viewer">extending Isis' Wicket viewer</a> or by writing a bespoke UI leveraging the REST (hypermedia) API automatically exposed by <a href="#_restful_objects_viewer">Isis' Restful Objects viewer</a>.  Other frameworks can also be used to implement REST APIs, of course, but generally they require a significant amount of development to get anywhere near the level of sophistication provided automatically by Isis' REST API.</p>
+</div>
+<div class="paragraph">
+<p>Although these frameworks all provide their own ecosystems of extensions, Isis' equivalent <a href="http://isisaddons.org">Isis Addons</a> (non-ASF) tend to work at a higher-level of abstraction.  For example, each of these frameworks will integrate with various security mechanism, but the <a href="http://github.com/isisaddons/isis-module-security}">Isis addons' security module</a> provides a full subdomain of users, roles, features and permissions that can be plugged into any Isis application.  Similarly, the <a href="http://github.com/isisaddons/isis-module-command}">Isis addons' command</a> and <a href="http://github.com/isisaddons/isis-module-audit}">Isis addons' audit</a> modules in combination provide a support for auditing and traceability that can also be used for out of the box profiling.  Again, these addons can be plugged into any Isis app.</p>
+</div>
+<div class="paragraph">
+<p>In terms of testing support, each of these other frameworks provide mechanisms to allow the webapp to be tested from within a JUnit test harness. Isis' support is similar.  Where Isis differs though is that it enables end-to-end testing without the need for slow and fragile Selenium tests. Instead, Isis provides a "<a href="#_using_the_wrapper_factory">WrapperFactory</a>" domain service that allows the generic UI provided to in essence be simulated. On a more pragmatic level, the <a href="http://github.com/isisaddons/isis-module-fakedata}">Isis addons' fakedata</a> module does "what it says on the tin", allowing both unit- and integration-tests to focus on the salient data and fake out the rest.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_vs_angular">vs Angular</h5>
+
+</div>
+<div class="sect4">
+<h5 id="_vs_metawidget">vs MetaWidget</h5>
+<div class="paragraph">
+<p>MetaWidget (mentioned <a href="#_object_interface_mapping">earlier</a> has a number of ideas in common with Apache Isis, specifically the runtime generation of a UI for domain objects.  And like Apache Isis, MetaWidget builds its own metamodel of the domain objects and uses this to render the object.</p>
+</div>
+<div class="paragraph">
+<p>However, there is a difference in philosophy in that MW is not a full-stack framework and does not (in their words) try to "own the UI".  Rather they support a huge variety of UI technologies and allow the domain object to be rendered in any of them.</p>
+</div>
+<div class="paragraph">
+<p>In contrast, Apache Isis is full-stack and does generate a complete UI; we then allow you to customize or extend this UI (as per the various <a href="http://isisaddons.org">Isis Addons</a> (non-ASF), and we also provide a full <a href="#_restful_objects_viewer">Restful API</a></p>
+</div>
+<div class="paragraph">
+<p>Also, it&#8217;s worth noting that MetaWidget does have an elegant pipeline architecture, with APIs to allow even its metamodel to be replaced.  It would be feasible and probably quite straightforward to use Isis' own metamodel as an implementation of the MetaWidget API.  This would allow MetaWidget to be able to render an Isis domain application.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_vs_openxava">vs OpenXava</h5>
+
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_building_blocks">1.3. Building Blocks</h3>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_a_metamodel_with_explicit_and_inferred_semantics">1.3.1. A MetaModel with Explicit and Inferred Semantics</h4>
+<div class="ulist">
+<ul>
+<li>
+<p>use of annotations</p>
+<div class="ulist">
+<ul>
+<li>
+<p>reuse JEE annotations where possible</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>layout hints are overridable, to avoid restarting the app/speed up feedback</p>
+</li>
+</ul>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_domain_objects_and_domain_services">1.3.2. Domain Objects and Domain Services</h4>
+<div class="ulist">
+<ul>
+<li>
+<p>domain model</p>
+<div class="ulist">
+<ul>
+<li>
+<p>domain objects</p>
+<div class="ulist">
+<ul>
+<li>
+<p>domain entity</p>
+</li>
+<li>
+<p>view model</p>
+</li>
+</ul>
+</div>
+</li>
+<li>
+<p>domain service</p>
+</li>
+<li>
+<p>value type</p>
+</li>
+</ul>
+</div>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>Anything else can be (should be) ignored by annotating with <code>@Programmatic</code>.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_properties_collections_and_actions">1.3.3. Properties, Collections and Actions</h4>
+
+</div>
+<div class="sect3">
+<h4 id="_domain_entities_vs_view_models">1.3.4. Domain Entities vs View Models</h4>
+<div class="paragraph">
+<p><code>@DomainObject(nature=&#8230;&#8203;)</code></p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_domain_services">1.3.5. Domain Services</h4>
+<div class="paragraph">
+<p>Domain services consist of a set of logically grouped actions, and as such follow the same conventions as for entities. However, a service cannot have (persisted) properties, nor can it have (persisted) collections.</p>
+</div>
+<div class="paragraph">
+<p>Domain services are instantiated once and once only by the framework, and are used to centralize any domain logic that does not logically belong in a domain entity or value. Isis will automatically inject services into every domain entity that requests them, and into each other.</p>
+</div>
+<div class="paragraph">
+<p>For convenience you can inherit from AbstractService or one of its subclasses, but this is not mandatory.</p>
+</div>
+<div class="sect4">
+<h5 id="_domain_services_vs_view_services">Domain Services vs View Services</h5>
+<div class="paragraph">
+<p><code>@DomainService(nature=&#8230;&#8203;)</code></p>
+</div>
+<div class="sidebarblock">
+<div class="content">
+<div class="title">Factories, Repositories and Services</div>
+<div class="paragraph">
+<p>A distinction is sometimes made between a factory (that creates object) and a repository (that is used to find existing objects).  You will find them discussed separately in Evans' link:Domain Driven Design[<a href="http://books.google.com/books/about/Domain_Driven_Design.html?id=hHBf4YxMnWMC" class="bare">http://books.google.com/books/about/Domain_Driven_Design.html?id=hHBf4YxMnWMC</a>], for example.</p>
+</div>
+<div class="paragraph">
+<p>In Apache Isis these are all implemented as domain services.  Indeed, it is quite common to have a domain service that acts as both a factory and a repository.</p>
+</div>
+</div>
+</div>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_value_objects_primitives">1.3.6. Value Objects (Primitives)</h4>
+
+</div>
+<div class="sect3">
+<h4 id="_contributions">1.3.7. Contributions</h4>
+
+</div>
+<div class="sect3">
+<h4 id="_event_bus">1.3.8. Event Bus</h4>
+<div class="sect4">
+<h5 id="_registering_domain_services">Registering domain services</h5>
+<div class="paragraph">
+<p>As noted <a href="../../how-tos/how-to-09-010-How-to-register-domain-services,-repositories-and-factories.html">elsewhere</a>, domain services (which includes repositories and factories) should be registered in the <code>isis.properties</code> configuration file, under <code>isis.services</code> key (a comma-separated list):</p>
+</div>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>isis.services = com.mycompany.myapp.employee.Employees\,
+                com.mycompany.myapp.claim.Claims\,
+                ...</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This will then result in the framework instantiating a single instance of each of the services listed.</p>
+</div>
+<div class="paragraph">
+<p>If all services reside under a common package, then the <code>isis.services.prefix</code> can specify this prefix:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>isis.services.prefix = com.mycompany.myapp
+isis.services = employee.Employees,\
+                claim.Claims,\
+                ...</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This is quite rare, however; you will often want to use default implementations of domain services that are provided by the framework and so will not reside under this prefix.</p>
+</div>
+<div class="paragraph">
+<p>Examples of framework-provided services (as defined in the applib) can be found referenced from the main <a href="../../documentation.html">documentation</a> page. They include clock, auditing, publishing, exception handling, view model support, snapshots/mementos, and user/application settings management.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_service_scopes">Service scopes</h5>
+<div class="paragraph">
+<p>By default all domain services are considered to be singletons, and thread-safe.</p>
+</div>
+<div class="paragraph">
+<p>Sometimes though a service&#8217;s lifetime is applicable only to a single request; in other words it is request-scoped.</p>
+</div>
+<div class="paragraph">
+<p>The CDI annotation <code>@javax.enterprise.context.RequestScoped</code> is used to indicate this fact:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code> @javax.enterprise.context.RequestScoped
+ public class MyService extends AbstractService {
+     ...
+ }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The framework provides a number of request-scoped services; these can be found referenced from the main <a href="../../documentation.html">documentation</a> page. They include scratchpad service, query results caching, and support for co-ordinating bulk actions.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="__suppressing_contributed_actions">(Suppressing) contributed actions</h5>
+<div class="paragraph">
+<p>Any n-parameter action provided by a service will automatically be contributed to the list of actions for each of its (entity) parameters. From the viewpoint of the entity the action is called a contributed action.</p>
+</div>
+<div class="paragraph">
+<p>For example, given a service:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>public interface Library {
+    public Loan borrow(Loanable l, Borrower b);
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and the entities:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>public class Book implements Loanable { ... }y</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>and</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>public class LibraryMember implements Borrower { ... }</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>then the <code>borrow(&#8230;&#8203;)</code> action will be contributed to both <code>Book</code> and to <code>LibraryMember</code>.</p>
+</div>
+<div class="paragraph">
+<p>This is an important capability because it helps to decouple the concrete classes from the services.</p>
+</div>
+<div class="paragraph">
+<p>If necessary, though, this behaviour can be suppressed by annotating the service action with <code>@org.apache.isis.applib.annotations.NotContributed</code>.</p>
+</div>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>public interface Library {
+    @NotContributed
+    public Loan borrow(Loanable l, Borrower b);
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>If annotated at the interface level, then the annotation will be inherited by every concrete class. Alternatively the annotation can be applied at the implementation class level and only apply to that particular implementation.</p>
+</div>
+<div class="paragraph">
+<p>Note that an action annotated as being <code>@NotContributed</code> will still appear in the service menu for the service. If an action should neither be contributed nor appear in service menu items, then simply annotate it as <code>@Hidden</code>.</p>
+</div>
+</div>
+<div class="sect4">
+<h5 id="__suppressing_service_menu_items">(Suppressing) service menu items</h5>
+<div class="paragraph">
+<p>By default every action of a service (by which we also mean repositories and factories) will be rendered in the viewer, eg as a menu item for that service menu. This behaviour can be suppressed by annotating the action using <code>@org.apache.isis.applib.annotations.NotInServiceMenu</code>.</p>
+</div>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>public interface Library {
+    @NotInServiceMenu
+    public Loan borrow(Loanable l, Borrower b);
+}</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>Note that an action annotated as being <code>@NotInServiceMenu</code> will still be contributed. If an action should neither be contributed nor appear in service menu items, then simply annotate it as <code>@Hidden</code>.</p>
+</div>
+<div class="paragraph">
+<p>Alternatively, this can be performed using a supporting method:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>public class LibraryImpl implements Library {
+    public Loan borrow(Loanable l, Borrower b) { ... }
+    public boolean notInServiceMenuBorrow() { ... }
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="__suppressing_service_menus">(Suppressing) service menus</h5>
+<div class="paragraph">
+<p>If none of the service menu items should appear, then the service itself should be annotated as <code>@Hidden</code>.</p>
+</div>
+<div class="paragraph">
+<p>For example:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>@Hidden
+public interface EmailService {
+    public void sendEmail(String to, String from, String subject, String body);
+    public void forwardEmail(String to, String from, String subject, String body);
+}</code></pre>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_initializing_services">Initializing Services</h5>
+<div class="paragraph">
+<p>Services can optionally declare lifecycle callbacks to initialize them (when the app is deployed) and to shut them down (when the app is undeployed).</p>
+</div>
+<div class="paragraph">
+<p>An Isis session <em>is</em> available when initialization occurs (so services can interact with the object store, for example).</p>
+</div>
+<div class="sect5">
+<h6 id="_initialization">Initialization</h6>
+<div class="paragraph">
+<p>The framework will call any <code>public</code> method annotated with <code>@javax.annotation.PostConstruct</code> and with either no arguments of an argument of type <code>Map&lt;String,String&gt;</code>:</p>
+</div>
+<div class="paragraph">
+<p>or</p>
+</div>
+<div class="paragraph">
+<p>In the latter case, the framework passes in the configuration (<code>isis.properties</code> and any other component-specific configuration files).</p>
+</div>
+</div>
+<div class="sect5">
+<h6 id="_shutdown">Shutdown</h6>
+<div class="paragraph">
+<p>Shutdown is similar; the framework will call any method annotated with <code>@javax.annotation.PreDestroy</code>:</p>
+</div>
+</div>
+</div>
+<div class="sect4">
+<h5 id="_the_getid_method">The getId() method</h5>
+<div class="paragraph">
+<p>Optionally, a service may provide a <code>getId()</code> method:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code>public String getId()</code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>This method returns a logical identifier for a service, independent of its implementation. Currently it used only by perspectives, providing a label by which to record the services that are available for a current user&#8217;s profile. &lt;!--See ? for more about profiles and perspectives.-&#8594;</p>
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_framework_provided_services">1.4. Framework-provided Services</h3>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+<div class="sect3">
+<h4 id="_api_vs_spi">1.4.1. API vs SPI</h4>
+<div class="paragraph">
+<p>Most framework domain services are API: they exist to provide support functionality to the application&#8217;s domain objects and services.  In this case an implementation of the service will be available, either by Apache Isis itself or by Isis Addons (non ASF).</p>
+</div>
+<div class="paragraph">
+<p>Some framework domain services are SPI: they exist primarily so that the application can influence the framework&#8217;s behaviour.  In these cases there is (usually) no default implementation; it is up to the application to provide an implementation.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_autoregistration_of_domain_services">1.4.2. Autoregistration of Domain services</h4>
+<div class="paragraph">
+<p>Where a domain service has an implementation, it is (almost always) automatically registered just by virtue of being on the <code>CLASSPATH</code>.</p>
+</div>
+<div class="paragraph">
+<p>The one exception is <a href="#ExceptionRecognizer">[ExceptionRecognizer]</a>.</p>
+</div>
+<div class="paragraph">
+<p>It is possible to replacing automatically-registered domain services.</p>
+</div>
+</div>
+<div class="sect3">
+<h4 id="_overview_of_domain_services">1.4.3. Overview of Domain Services</h4>
+<div class="paragraph">
+<p>Unless indicated as SPI, each of the following has an implementation in Isis core.</p>
+</div>
+<div class="paragraph">
+<p>A full list of services (including those with implementations in <a href="http://isisaddons.org">Isis Addons</a> (non-ASF)) can be found in the <a href="#_domain_services_2">Domain Services</a> section.</p>
+</div>
+<div class="sect4">
+<h5 id="__code_domainobjectcontainer_code"><code>DomainObjectContainer</code></h5>
+
+</div>
+<div class="sect4">
+<h5 id="__code_clockservice_code"><code>ClockService</code></h5>
+
+</div>
+<div class="sect4">
+<h5 id="__code_isissupportjdo_code"><code>IsisSupportJdo</code></h5>
+
+</div>
+<div class="sect4">
+<h5 id="__code_exceptionrecognizer_code"><code>ExceptionRecognizer</code></h5>
+
+</div>
+<div class="sect4">
+<h5 id="__code_wrapperfactory_code"><code>WrapperFactory</code></h5>
+
+</div>
+<div class="sect4">
+<h5 id="__code_eventbusservice_code"><code>EventBusService</code></h5>
+
+</div>
+<div class="sect4">
+<h5 id="_commands_background">Commands/Background</h5>
+<div class="sect5">
+<h6 id="__code_commandcontext_code"><code>CommandContext</code></h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_backgroundservice_code"><code>BackgroundService</code></h6>
+
+</div>
+</div>
+<div class="sect4">
+<h5 id="_information_sharing">Information Sharing</h5>
+<div class="sect5">
+<h6 id="__code_scratchpad_code"><code>ScratchPad</code></h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_actioninvocationcontext_code"><code>ActionInvocationContext</code></h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_queryresultscache_code"><code>QueryResultsCache</code></h6>
+
+</div>
+</div>
+<div class="sect4">
+<h5 id="__code_emailservice_code"><code>EmailService</code></h5>
+
+</div>
+<div class="sect4">
+<h5 id="_usermanagement">UserManagement</h5>
+<div class="sect5">
+<h6 id="__code_userprofileservice_code_spi"><code>UserProfileService</code> (SPI)</h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_userregistrationservice_code_spi"><code>UserRegistrationService</code> (SPI)</h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_emailnotificationservice_code"><code>EmailNotificationService</code></h6>
+
+</div>
+</div>
+<div class="sect4">
+<h5 id="_bookmarks_and_mementos">Bookmarks and Mementos</h5>
+<div class="sect5">
+<h6 id="__code_bookmarkservice_code"><code>BookmarkService</code></h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_mementoservice_code"><code>MementoService</code></h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_deeplinkservice_code"><code>DeepLinkService</code></h6>
+
+</div>
+<div class="sect5">
+<h6 id="__code_xmlsnapshotservice_code"><code>XmlSnapshotService</code></h6>
+
+</div>
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_add_ons">1.5. Add-ons</h3>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_getting_started">2. Getting Started</h2>
+<div class="sectionbody">
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+<div class="sect2">
+<h3 id="_simpleapp_archetype">2.1. SimpleApp Archetype</h3>
+<div class="admonitionblock important">
+<table>
+<tr>
+<td class="icon">
+<i class="fa icon-important" title="Important"></i>
+</td>
+<td class="content">
+TODO
+</td>
+</tr>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_datanucleus_enhancer">2.2. Datanucleus Enhancer</h3>
+<div class="paragraph">
+<p>By leveraging the JDO/Datanucleus ORM, Isis' JDO objectstore is very powerful. However, with such power comes a little bit of complexity to the development environment: all domain objects must be enhanced through the <a href="http://db.apache.org/jdo/enhancement.html">JDO enhancer</a>.  So the enhancer must, in one way or another, be integrated into your development environment.</p>
+</div>
+<div class="paragraph">
+<p>If working from the Maven command line, JDO enhancement is done using the <code>maven-datanucleus-plugin</code>.  As of 1.9.0-SNAPSHOT, we put all the configuration into an (always active) profile:</p>
+</div>
+<div class="listingblock">
+<div class="content">
+<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;profile&gt;</span>
+    <span class="tag">&lt;id&gt;</span>enhance<span class="tag">&lt;/id&gt;</span>
+    <span class="tag">&lt;activation&gt;</span>
+        <span class="tag">&lt;activeByDefault&gt;</span>true<span class="tag">&lt;/activeByDefault&gt;</span>
+    <span class="tag">&lt;/activation&gt;</span>
+    <span class="tag">&lt;properties&gt;</span>
+        <span class="tag">&lt;datanucleus-maven-plugin.version&gt;</span>4.0.0-release<span class="tag">&lt;/datanucleus-maven-plugin.version&gt;</span>
+    <span class="tag">&lt;/properties&gt;</span>
+    <span class="tag">&lt;build&gt;</span>
+        <span class="tag">&lt;plugins&gt;</span>
+            <span class="tag">&lt;plugin&gt;</span>
+                <span class="tag">&lt;groupId&gt;</span>org.datanucleus<span class="tag">&lt;/groupId&gt;</span>
+                <span class="tag">&lt;artifactId&gt;</span>datanucleus-maven-plugin<span class="tag">&lt;/artifactId&gt;</span>
+                <span class="tag">&lt;version&gt;</span>${datanucleus-maven-plugin.version}<span class="tag">&lt;/version&gt;</span>
+                <span class="tag">&lt;configuration&gt;</span>
+                    <span class="tag">&lt;fork&gt;</span>false<span class="tag">&lt;/fork&gt;</span>
+                    <span class="tag">&lt;log4jConfiguration&gt;</span>${basedir}/log4j.properties<span class="tag">&lt;/log4jConfiguration&gt;</span>
+                    <span class="tag">&lt;verbose&gt;</span>true<span class="tag">&lt;/verbose&gt;</span>
+                    <span class="tag">&lt;props&gt;</span>${basedir}/datanucleus.properties<span class="tag">&lt;/props&gt;</span>
+                <span class="tag">&lt;/configuration&gt;</span>
+                <span class="tag">&lt;executions&gt;</span>
+                    <span class="tag">&lt;execution&gt;</span>
+                        <span class="tag">&lt;phase&gt;</span>process-classes<span class="tag">&lt;/phase&gt;</span>
+                        <span class="tag">&lt;goals&gt;</span>
+                            <span class="tag">&lt;goal&gt;</span>enhance<span class="tag">&lt;/goal&gt;</span>
+                        <span class="tag">&lt;/goals&gt;</span>
+                    <span class="tag">&lt;/execution&gt;</span>
+                <span class="tag">&lt;/executions&gt;</span>
+            <span class="tag">&lt;/plugin&gt;</span>
+        <span class="tag">&lt;/plugins&gt;</span>
+    <span class="tag">&lt;/build&gt;</span>
+    <span class="tag">&lt;dependencies&gt;</span>
+        <span class="tag">&lt;dependency&gt;</span>
+            <span class="tag">&lt;groupId&gt;</span>org.datanucleus<span class="tag">&lt;/groupId&gt;</span>
+            <span class="tag">&lt;artifactId&gt;</span>datanucleus-core<span class="tag">&lt;/artifactId&gt;</span>
+        <span class="tag">&lt;/dependency&gt;</span>
+        <span class="tag">&lt;dependency&gt;</span>
+            <span class="tag">&lt;groupId&gt;</span>org.datanucleus<span class="tag">&lt;/groupId&gt;</span>
+            <span class="tag">&lt;artifactId&gt;</span>datanucleus-jodatime<span class="tag">&lt;/artifactId&gt;</span>
+        <span class="tag">&lt;/dependency&gt;</span>
+        <span class="tag">&lt;dependency&gt;</span>
+            <span class="tag">&lt;groupId&gt;</span>org.datanucleus<span class="tag">&lt;/groupId&gt;</span>
+            <span class="tag">&lt;artifactId&gt;</span>datanucleus-api-jdo<span class="tag">&lt;/artifactId&gt;</span>
+        <span class="tag">&lt;/dependency&gt;</span>
+    <span class="tag">&lt;/dependencies&gt;</span>
+<span class="tag">&lt;/profile&gt;</span></code></pre>
+</div>
+</div>
+<div class="paragraph">
+<p>The <a href="#_simpleapp_archetype">SimpleApp Archetype</a> sets up the plugin correctly in the <code>dom</code> (domain object model) module.  (It&#8217;s actually a little bit more complext to cater for users of the Eclipse IDE using Eclipse&#8217;s m2e plugin).</p>
+</div>
+<div class="sect3">

[... 7729 lines stripped ...]