You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by bu...@apache.org on 2014/11/18 23:57:06 UTC

svn commit: r929701 - in /websites/staging/isis/trunk: cgi-bin/ content/ content/tutorials/apacheconeu-2014.html

Author: buildbot
Date: Tue Nov 18 22:57:06 2014
New Revision: 929701

Log:
Staging update by buildbot for isis

Modified:
    websites/staging/isis/trunk/cgi-bin/   (props changed)
    websites/staging/isis/trunk/content/   (props changed)
    websites/staging/isis/trunk/content/tutorials/apacheconeu-2014.html

Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Nov 18 22:57:06 2014
@@ -1 +1 @@
-1640442
+1640449

Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Nov 18 22:57:06 2014
@@ -1 +1 @@
-1640442
+1640449

Modified: websites/staging/isis/trunk/content/tutorials/apacheconeu-2014.html
==============================================================================
--- websites/staging/isis/trunk/content/tutorials/apacheconeu-2014.html (original)
+++ websites/staging/isis/trunk/content/tutorials/apacheconeu-2014.html Tue Nov 18 22:57:06 2014
@@ -601,19 +601,22 @@ mvn clean install
 <li>review <code>listAll</code> action (acting as a repository)
 <ul>
 <li>as per our <a href="http://isis.apache.org/how-tos/how-to-09-040-How-to-write-a-custom-repository.html">docs</a></li>
-<li>note the annotations on the corresponding domain class (<code>SimpleObject</code> above, probably renamed by now)</li>
+<li>note the annotations on the corresponding domain class (originally called <code>SimpleObject</code>, though renamed by now)</li>
 </ul></li>
 <li>note the <code>@DomainService</code> annotation</li>
 </ul>
 
 <h2>Fixture scripts</h2>
 
+<p>Fixture scripts are used to setup the app into a known state.  They are great for demo's and as a time-saver when implementing a feature, and they can also be reused in automated integration tests.  We usually also have a fixture script to zap all the (non-reference) data (or some logical subset of the data)</p>
+
 <ul>
 <li>rename the <code>SimpleObjectsTearDownFixture</code> class
 <ul>
-<li>and update</li>
+<li>and update to delete from the appropriate underlying database table(s)</li>
+<li>use the injected <a href="http://isis.apache.org/components/objectstores/jdo/services/isisjdosupport-service.html">IsisJdoSupport</a> domain service.</li>
 </ul></li>
-<li>create for domain classes
+<li>update to create new instances of domain entity
 <ul>
 <li>inject in the corresponding domain service</li>
 </ul></li>
@@ -621,8 +624,10 @@ mvn clean install
 
 <h2>Actions</h2>
 
+<p>Most business functionality is implemented using actions... basically a <code>public</code> method accepting domain classes and primitives as its parameter types.</p>
+
 <ul>
-<li>update the domain action (<code>SimpleObject#name</code> above, renamed by now)</li>
+<li>write an action to update the domain property (originally called <code>SimpleObject#name</code>, though renamed by now)</li>
 <li>use the <a href="http://isis.apache.org/reference/recognized-annotations/Named.html">@Named</a> annotation to specify the name of action parameters</li>
 <li>use <a href="http://isis.apache.org/reference/recognized-annotations/ActionSemantics.html">@ActionSemantics</a> annotation to indicate the semantics of the action (safe/query-only, idempotent or non-idempotent)</li>
 <li>annotate safe action as <a href="http://isis.apache.org/reference/recognized-annotations/Bookmarkable.html">@Bookmarkable</a> 
@@ -633,6 +638,8 @@ mvn clean install
 
 <h2>REST API</h2>
 
+<p>As well as exposing the Wicket viewer, Isis also exposes a REST API (an implementation of the <a href="http://restfulobjects.org">Restful Objects spec</a>).  All of the functionality of the domain object model is available through this REST API.</p>
+
 <ul>
 <li>add Chrome extensions
 <ul>
@@ -641,15 +648,23 @@ mvn clean install
 </ul></li>
 <li>browse to Wicket viewer, install fixtures</li>
 <li>browse to the http://localhost:8080/restful API</li>
-<li>invoke the service to list all objects</li>
+<li>invoke the service to list all objects
+<ul>
+<li>services</li>
+<li>actions</li>
+<li>invoke (invoking 0-arg actions is easy; the Restful Objects spec defines how to invoke N-arg actions)</li>
+</ul></li>
 </ul>
 
 <h2>Specify Action semantics</h2>
 
+<p>The semantics of an action (whether it is safe/query only, whether it is idempotent, whether it is neither) can be specified for each action; if not specified then Isis assumes non-idempotent.  In the Wicket viewer this matters in that only query-only actions can be bookmarked or used as contributed properties/collections.  In the RESTful viewer this matters in that it determines the HTTP verb (GET, PUT or POST) that is used to invoke the action.</p>
+
 <ul>
 <li>experiment changing [@ActionSemantics] on actions
 <ul>
 <li>note the HTTP methods exposed in the REST API change</li>
+<li>note whether the action is bookmarkable (assuming that it has been annotated with <code>@Bookmarkable</code>, that is).</li>
 </ul></li>
 </ul>