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 2012/02/16 23:53:01 UTC

svn commit: r1245237 - in /incubator/isis/trunk/framework: runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/ src/site/apt/ src/site/apt/use-cases/ viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/ vi...

Author: danhaywood
Date: Thu Feb 16 22:53:01 2012
New Revision: 1245237

URL: http://svn.apache.org/viewvc?rev=1245237&view=rev
Log:
ISIS-189: further enhancements to the archetype (supporting doc and related minor fixes)

Modified:
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java
    incubator/isis/trunk/framework/src/site/apt/quick-start.apt
    incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-rest.apt
    incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-webapp.apt
    incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java
    incubator/isis/trunk/framework/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/AbstractIsisConcordionScenario.java
    incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java?rev=1245237&r1=1245236&r2=1245237&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/main/java/org/apache/isis/runtimes/dflt/runtime/installers/InstallerLookupDefault.java Thu Feb 16 22:53:01 2012
@@ -30,6 +30,7 @@ import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.List;
 
+import com.google.common.collect.Lists;
 import com.google.inject.Inject;
 
 import org.apache.log4j.Logger;
@@ -87,7 +88,7 @@ public class InstallerLookupDefault impl
 
     private static final Logger LOG = Logger.getLogger(InstallerLookupDefault.class);
 
-    private final List<Installer> installerList = new ArrayList<Installer>();
+    private final List<Installer> installerList = Lists.newArrayList();
 
     /**
      * A mutable representation of the {@link IsisConfiguration configuration},

Modified: incubator/isis/trunk/framework/src/site/apt/quick-start.apt
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/src/site/apt/quick-start.apt?rev=1245237&r1=1245236&r2=1245237&view=diff
==============================================================================
--- incubator/isis/trunk/framework/src/site/apt/quick-start.apt (original)
+++ incubator/isis/trunk/framework/src/site/apt/quick-start.apt Thu Feb 16 22:53:01 2012
@@ -70,38 +70,45 @@ App Structure
   generated application (eg rename "ToDoItem" to "Customer") without having 
   to waste time deleting lots of generated code.
   
-*----------------------+---------------------------------------------------------+
-| Module               | Description                                             |
-*----------------------+---------------------------------------------------------+
-| myapp                | The parent (aggregator) module                          |
-*----------------------+---------------------------------------------------------+
-| myapp-dom            | The domain object model, consisting of ToDoItem and     |
-|                      | ToDoItems (repository) interface.                           |
-*----------------------+---------------------------------------------------------+
-| myapp-fixture        | Domain object fixtures used for initializing the system |
-|                      | when being demo'ed or for unit testing.                 |
-*----------------------+---------------------------------------------------------+
-| myapp-objstore-dflt  | Implementation of ToDoItems repository, for the default   |
-|                      | (in-memory) object store.                               |
-*----------------------+---------------------------------------------------------+
-| myapp-webapp         | Run as a webapp (from web.xml) using either the         |
-|                      | {{{./viewer/html/index.html}HTML viewer}} or the        |
-|                      | {{{./viewer/json/index.html}JSON (RESTful) viewer}}     |
-*----------------------+---------------------------------------------------------+
-| myapp-tests-bdd      | Run domain object tests using Isis'                     |
-|                      | {{{./viewer/bdd/index.html}integration}}                |
-|                      | with the {{{http://concordion.org}Concordion}} BDD      |
-|                      | framework.                                              |
-*----------------------+---------------------------------------------------------+
-| myapp-tests-junit    | Run domain object tests using Isis'                     |
-|                      | {{{./viewer/junit/index.html}custom test runner}}       |
-|                      | for {{{http://junit.org}JUnit}} runner                  |
-*----------------------+---------------------------------------------------------+
-
-  The most significant omission with the generated application is that it is
-  configured only to support the default in-memory object store.  What this
-  means is that any changes you make to objects will not be persisted between
-  runs.  If you'd like to use other viewers and object stores, ask for help on the
+*------------------------+-------------------------------------------------------------+
+| Module                 | Description                                                 |
+*------------------------+-------------------------------------------------------------+
+| myapp                  | The parent (aggregator) module                              |
+*------------------------+-------------------------------------------------------------+
+| myapp-dom              | The domain object model, consisting of ToDoItem and         |
+|                        | ToDoItems (repository) interface.                           |
+*------------------------+-------------------------------------------------------------+
+| myapp-fixture          | Domain object fixtures used for initializing the system     |
+|                        | when being demo'ed or for unit testing.                     |
+*------------------------+-------------------------------------------------------------+
+| myapp-objstore-dflt    | Implementation of ToDoItems repository, for the default     |
+|                        | (in-memory) object store.                                   |
+*------------------------+-------------------------------------------------------------+
+| myapp-objstore-mongodb | Implementation of ToDoItems repository, for the             |
+|                        | NoSQL MongoDB object store.                                 |
+*------------------------+-------------------------------------------------------------+
+| myapp-objstore-sql     | Implementation of ToDoItems repository, for the             |
+|                        | SQL object store.                                           |
+*------------------------+-------------------------------------------------------------+
+| myapp-tests-bdd        | Run domain object tests using Isis'                         |
+|                        | {{{./viewer/bdd/index.html}integration}} with the           |
+|                        | {{{http://concordion.org}Concordion}} BDD framework         |
+*------------------------+-------------------------------------------------------------+
+| myapp-tests-junit      | Run domain object tests using Isis'                         |
+|                        | {{{./viewer/junit/index.html}custom test runner}}           |
+|                        | for {{{http://junit.org}JUnit}} runner                      |
+*------------------------+-------------------------------------------------------------+
+| myapp-webapp           | Run as a webapp (from web.xml) using either the             |
+|                        | {{{./viewer/html/index.html}HTML viewer}}, the              |
+|                        | {{{./viewer/scimpi/index.html}Scimpi viewer}}, or the       |
+|                        | {{{./viewer/json/index.html}JSON (RESTful) viewer}}.        |
+|                        | Also includes a simple demo mobile app using the JSON viewer|
+*------------------------+-------------------------------------------------------------+
+
+  Out of the box the generated app is configured to run with the support the default 
+  in-memory object store, but can easily be configured to work with the NoSQL or the
+  SQL object stores.  The app includes an index.html with further information on this.
+  And, you can always ask for help on the 
   {{{mailto:isis-users@incubator.apache.org}isis-users}} mailing list.    
 
 Compiling the App
@@ -147,26 +154,14 @@ mvn jetty:run
   The webapp is configured to support two of Isis' viewers, the {{{./viewer/html/index.html}HTML viewer}}
   and the {{{./viewer/json/index.html}JSON (RESTful) viewer}}.  
 
-Accessing the webapp using the HTML viewer
+Accessing the webapp
   
-  The {{{./viewer/html/index.html}HTML viewer}} provides a basic, non-customizable web view
-  of the domain model.  It's accessible from {{{http://localhost:8080/htmlviewer}http://localhost:8080/htmlviewer}}.
+  Browse to the <a href="http://localhost:8080">index page</a> for details of how to access
+  the configured viewers. 
 
-  Security (authentication) is configurable within Isis, but is turned off 
-  within the application generated by the archetype.  You should therefore be taken to the home
-  page (logged in as the default user, "sven").
+  Security (authentication) is configurable within Isis, and is enabled.  You can log in using
+  the username/password of sven/pass.
   
-Accessing the JSON (Restful) viewer
-
-  The application can also be accessed using the {{{./viewer/json/index.html}JSON (RESTful) viewer}}.
-  This exposes the domain model as a set of resources, in a JSON representation.  It's accessible from
-  the root of the webapp, {{{http://localhost:8080/}http://localhost:8080/}}.
-
-  Whereas the HTML viewer is intended for use by humans, the JSON viewer is intended to be consumed
-  by applications.  Even so, you can access the JSON viewer using a web browser.  The Chrome and Firefox
-  browsers have plugins such as JSONView and REST Console that let you exercise the REST API directly
-  from a browser.  
-
   []
       
 Running the app's JUnit tests
@@ -181,7 +176,6 @@ cd tests-junit
 mvn test
 +------------------------------------------------------------
 
-
 Running the app's BDD (Concordion) tests
 
   <Isis> also provides the means to test domain object logic using an 

Modified: incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-rest.apt
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-rest.apt?rev=1245237&r1=1245236&r2=1245237&view=diff
==============================================================================
--- incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-rest.apt (original)
+++ incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-rest.apt Thu Feb 16 22:53:01 2012
@@ -51,9 +51,3 @@ Deploy <Isis> as a RESTful web service
 
   Isis persistence API is pluggable, so if it does not provide the integration already then
   you could implementing to its object store API.
-   
-  At the time of writing (v0.2.0) the RESTful viewer has a hard-coded dependency on Isis
-  {{{../runtimes/dflt/index.html}Default Runtime}}; this means that it cannot easily be hosted 
-  on your own framework (in conjunction with the {{{../runtimes/embedded/index.html}Embedded Runtime}}.
-  In the future we hope to break this dependency, allowing you to use the RESTful viewer with any
-  persistence framework.

Modified: incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-webapp.apt
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-webapp.apt?rev=1245237&r1=1245236&r2=1245237&view=diff
==============================================================================
--- incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-webapp.apt (original)
+++ incubator/isis/trunk/framework/src/site/apt/use-cases/deploy-as-webapp.apt Thu Feb 16 22:53:01 2012
@@ -21,12 +21,17 @@ Deploy <Isis> as an auto-generated webap
   automatically generate a user interface for a domain object model.
   
   The {{{../viewer/html/index.html}HTML viewer}} provides a straight-forward 
-  webapp for a domain model, but is one that nonetheless provides access and honours all of the business 
-  logic that may be encoded within those domain objects.  
-  
-  The viewer makes minimal use of Javascript, as it was originally written
+  webapp for a domain model, but is one that nonetheless provides access and 
+  honours all of the business logic that may be encoded within those domain objects.  
+  The HTML viewer makes minimal use of Javascript, as it was originally written
   to comply with governmental standards that forbid the use of such.  The
   viewer supports customization only to the extent that its CSS can be changed.
+
+  If you need something a little more sophisticated, then the 
+  {{{../viewer/scimpi/index.html}Scimpi viewer}} provides a similar webapp user interface,
+  but one that allows the views of objects to be progressively enhanced as required.
+  The programming model is akin to JSF, with a set of tags indicating the contents
+  of the custom views.
   
 * {Isis persistence}
 
@@ -39,12 +44,6 @@ Deploy <Isis> as an auto-generated webap
   Isis persistence API is pluggable, so if it does not provide the integration already then
   you could implementing to its object store API.
    
-  At the time of writing (v0.2.0) the HTML viewer has a hard-coded dependency on Isis
-  {{{../runtimes/dflt/index.html}Default Runtime}}; this means that it cannot easily be hosted 
-  on your own framework (in conjunction with the {{{../runtimes/embedded/index.html}Embedded Runtime}}.
-  In the future we hope to break this dependency, allowing you to use the RESTful viewer with any
-  persistence framework.
-
 * {Other Viewers}
 
   Note that Isis does have a number of other (human-usable) viewers.  See 

Modified: incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java?rev=1245237&r1=1245236&r2=1245237&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java (original)
+++ incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/Scenario.java Thu Feb 16 22:53:01 2012
@@ -31,6 +31,8 @@ import java.util.Map;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 
+import org.apache.log4j.FileAppender;
+
 import org.apache.isis.applib.fixtures.LogonFixture;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.config.IsisConfigurationBuilder;

Modified: incubator/isis/trunk/framework/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/AbstractIsisConcordionScenario.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/AbstractIsisConcordionScenario.java?rev=1245237&r1=1245236&r2=1245237&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/AbstractIsisConcordionScenario.java (original)
+++ incubator/isis/trunk/framework/viewer/bdd/concordion/src/main/java/org/apache/isis/viewer/bdd/concordion/AbstractIsisConcordionScenario.java Thu Feb 16 22:53:01 2012
@@ -30,6 +30,9 @@ import java.util.List;
 import com.google.common.base.Function;
 import com.google.common.collect.Iterables;
 
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.Level;
+import org.apache.log4j.LogManager;
 import org.concordion.Concordion;
 import org.concordion.api.ResultSummary;
 import org.concordion.internal.ConcordionBuilder;
@@ -90,6 +93,8 @@ public abstract class AbstractIsisConcor
 
     @Test
     public void runScenario() throws Throwable {
+        BasicConfigurator.configure();
+        LogManager.getRootLogger().setLevel(Level.INFO);
         try {
             final Concordion concordion = createConcordion();
             final ResultSummary resultSummary = concordion.process(this);

Modified: incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java?rev=1245237&r1=1245236&r2=1245237&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java Thu Feb 16 22:53:01 2012
@@ -33,6 +33,8 @@ public class IsisSystemUsingInstallersWi
 
     public IsisSystemUsingInstallersWithinJunit(final DeploymentType deploymentType, final InstallerLookup installerLookup, final TestClass testClass) {
         super(deploymentType, installerLookup);
+        installerLookup.getConfigurationBuilder().add("isis.deploymentType", deploymentType.nameLowerCase());
+        
         this.testClass = testClass;
 
         final AnnotationInstaller installer = new AnnotationInstaller();