You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by mg...@apache.org on 2015/12/13 10:37:59 UTC

[20/50] [abbrv] isis git commit: ISIS-1243: renamed ug.adoc to ugfun.adoc. Added standard section to each of the guides so can navigate between each easily.

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc
new file mode 100644
index 0000000..0afe2ce
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_per-user-themes.adoc
@@ -0,0 +1,85 @@
+[[_ugfun_faqs_per-user-themes]]
+= Per-user Themes
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+From the Apache Isis mailing list is:
+
+* _Is it possible to have each of our resellers (using our Isis application) use there own theme/branding with their own logo and colors? Would this also be possible for the login page, possibly depending on the used host name?_
+
+
+Yes, you can do this, by installing a custom implementation of the Wicket Bootstrap's `ActiveThemeProvider`.
+
+The http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp] (non-ASF) actually link:https://github.com/isisaddons/isis-app-todoapp/tree/61b8114a8e01dbb3c380b31cf09eaed456407570[does this], storing the info via the http://github.com/isisaddons/isis-module-settings[Isis addons' settings module] settings modules:
+
+[source,java]
+.IActiveThemeProvider implementation
+----
+public class UserSettingsThemeProvider implements ActiveThemeProvider {
+    ...
+    @Override
+    public ITheme getActiveTheme() {
+        if(IsisContext.getSpecificationLoader().isInitialized()) {
+            final String themeName = IsisContext.doInSession(new Callable<String>() {
+                @Override
+                public String call() throws Exception {
+                    final Class<UserSettingsService> serviceClass = UserSettingsService.class;
+                    final UserSettingsService userSettingsService = lookupService(serviceClass);
+                    final UserSetting activeTheme = userSettingsService.find(
+                            IsisContext.getAuthenticationSession().getUserName(), ACTIVE_THEME);
+                    return activeTheme != null ? activeTheme.valueAsString() : null;
+                }
+            });
+            return themeFor(themeName);
+        }
+        return new SessionThemeProvider().getActiveTheme();
+    }
+    @Override
+    public void setActiveTheme(final String themeName) {
+        IsisContext.doInSession(new Runnable() {
+            @Override
+            public void run() {
+                final String currentUsrName = IsisContext.getAuthenticationSession().getUserName();
+                final UserSettingsServiceRW userSettingsService =
+                        lookupService(UserSettingsServiceRW.class);
+                final UserSettingJdo activeTheme =
+                        (UserSettingJdo) userSettingsService.find(currentUsrName, ACTIVE_THEME);
+                if(activeTheme != null) {
+                    activeTheme.updateAsString(themeName);
+                } else {
+                    userSettingsService.newString(
+                        currentUsrName, ACTIVE_THEME, "Active Bootstrap theme for user", themeName);
+                }
+            }
+        });
+    }
+    private ITheme themeFor(final String themeName) {
+        final ThemeProvider themeProvider = settings.getThemeProvider();
+        if(themeName != null) {
+            for (final ITheme theme : themeProvider.available()) {
+                if (themeName.equals(theme.name()))
+                    return theme;
+            }
+        }
+        return themeProvider.defaultTheme();
+    }
+    ...
+}
+----
+
+and
+
+[source,java]
+.Using the ActiveThemeProvider
+----
+@Override
+protected void init() {
+    super.init();
+
+    final IBootstrapSettings settings = Bootstrap.getSettings();
+    settings.setThemeProvider(new BootswatchThemeProvider(BootswatchTheme.Flatly));
+
+    settings.setActiveThemeProvider(new UserSettingsThemeProvider(settings));
+}
+----

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc
new file mode 100644
index 0000000..a4bd8de
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_restful-image-property.adoc
@@ -0,0 +1,20 @@
+[[_ugfun_faqs_restful-image-property]]
+= How parse image properties from Restful Objects?
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+ref: link:http://markmail.org/message/4kcu7sml4ufdsah3[mailing list thread]
+
+The RO viewer returns the image as a string, in the form:
+
+    "Tacos.jpg:image/jpeg:/9j//4AAQSkZJRgABAQEAlgCWAAD/  ...."
+
+This is in the form:
+
+    (filename):(mime type):(binary data in base64)
+
+This is basically the xref:rgcms.adoc#_rgcms_classes_value-types_Blob[`Blob`] value type, in string form.
+
+To use, split the parts then format the mime type and base64 data correctly before using as source in an `<img>` tag.

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc
new file mode 100644
index 0000000..8ec1e85
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_faqs_subtype-entity-not-fully-populated.adoc
@@ -0,0 +1,67 @@
+[[_ugfun_troubleshooting_faqs]]
+= (Subtype) entity not fully populated
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+ref: link:http://markmail.org/message/ovgai56uqgfgnrx7[mailing list thread]
+
+If it seems that Apache Isis (or rather DataNucleus) isn't fully populating domain entities (ie leaving some properties
+as `null`), then check that your actions are not accessing the fields directly.  Use getters instead.  that is:
+
+[WARNING]
+====
+Properties of domain entities should always be accessed using getters.  The only code that should access to fields
+should be the getters themselves.
+====
+
+Why so? Because DataNucleus will potentially lazy load some properties, but to do this it needs to know that the
+field is being requested.  This is the purpose of the enhancement phase: the bytecode of the original getter method is
+actually wrapped in code that does the lazy loading checking.  But hitting the field directly means that the lazy
+loading code does not run.
+
+This error can be subtle: sometimes "incorrect" code that accesses the fields will seem to work.  But that will be
+because the field has been populated already, for whatever reason.
+
+One case where you will find the issue highlighted is for subtype tables that have been mapped using an inheritance
+strategy of `NEW_TABLE`, eg:
+
+[source,java]
+----
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
+public class SupertypeEntity {
+    ...
+}
+----
+
+and then:
+
+[source,java]
+----
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.NEW_TABLE)
+public class SubtypeEntity extends SupertypeEntity {
+    ...
+}
+----
+
+This will generate two tables in the database, with the primary key of the supertype table propagated as a foreign key
+(also primary key) of the subtype table (sometimes called "table per type" strategy).  This means that DataNucleus
+might retrieve data from only the supertype table, and the lazily load the subtype fields only as required.  This is
+preferable to doing a left outer join from the super- to the subtype tables to retrieve data that might not be needed.
+
+On the other hand, if the `SUPERCLASS_TABLE` strategy (aka "table per hierarchy" or roll-up) or the `SUBCLASS_TABLE`
+strategy (roll-down) was used, then the problem is less likely to occur because DataNucleus would obtain all the data
+for any given instance from a single table.
+
+Final note: references to other objects (either scalar references or in collections) in particular require that getters
+rather than fields to be used to obtain them: it's hopefully obvious that DataNucleus (like all ORMs) should not and
+will not resolve such references (otherwise, where to stop... and the whole database would be loaded into memory).
+
+In summary, there's just one rule: *always use the getters, never the fields*.
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started.adoc
new file mode 100644
index 0000000..2a4ad32
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started.adoc
@@ -0,0 +1,37 @@
+[[_ugfun_getting-started]]
+= Getting Started
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+
+To get you up and running quickly, Apache Isis provides a xref:ug.adoc#_ugfun_getting-started_simpleapp-archetype[SimpleApp archetype] to setup a simple application as the basis of your own apps.  This is deliberately very minimal so that you won't have to spend lots of time removing generated artifacts.  On the other hand, it does set up a standard multi-module maven structure with unit- and integration tests pre-configured, as well as a webapp module so that you can easily run your app.  We strongly recommend that you preserve this structure as you develop your own Isis application.
+
+In this chapter we also discuss the xref:ug.adoc#_ugfun_getting-started_datanucleus-enhancer[DataNucleus enhancer].  link:http://www.datanucleus.org/[DataNucleus] is the reference implementation of the JDO (Java data objects) spec, and Apache Isis integrates with DataNucleus as its persistence layer.  The enhancer performs post-processing on the bytecode of your persistent domain entities, such that they can be persisted by Apache Isis' JDO/DataNucleus objectstore.
+
+[NOTE]
+====
+The xref:ug.adoc#_ugfun_getting-started_simpleapp-archetype[SimpleApp archetype] automatically configures the enhancer, so there's little you need to do at this stage.  Even so we feel it's a good idea to be aware of this critical part of Apache Isis runtime; if the enhancer does not run, then you'll find the app fails to start with (what will seem like) quite an obscure exception message.
+====
+
+
+
+
+== Prerequisites
+
+Apache Isis is a Java based framework, so in terms of prerequisites, you'll need to install:
+
+* Java 7 or 8 JDK
+* link:http://maven.apache.org[Apache Maven] 3.0.5 or later
+
+You'll probably also want to use an IDE; the Apache Isis committers use either IntelliJ or Eclipse; in the xref:cg.adoc#_cg_ide[Contributors' Guide] we have detailed setup instructions for using these two IDEs.  If you're a NetBeans user you should have no problems as it too has strong support for Maven.
+
+When building and running within an IDE, you'll also need to configure the Datanucleus enhancer.  This is implemented as a Maven plugin, so in the case of IntelliJ, it's easy enough to run the enhancer as required. It should be just as straightforward for NetBeans too.
+
+For Eclipse the maven integration story is a little less refined.  All is not lost, however; DataNucleus also has an implementation of the enhancer as an Eclipse plugin, which usually works well enough.
+
+include::_ugfun_getting-started_simpleapp-archetype.adoc[leveloffset=+1]
+include::_ugfun_getting-started_datanucleus-enhancer.adoc[leveloffset=+1]
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_datanucleus-enhancer.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_datanucleus-enhancer.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_datanucleus-enhancer.adoc
new file mode 100644
index 0000000..88dc068
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_datanucleus-enhancer.adoc
@@ -0,0 +1,107 @@
+[[_ugfun_getting-started_datanucleus-enhancer]]
+= Datanucleus Enhancer
+:Notice: 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.
+:_basedir: ../../
+:_imagesdir: images/
+
+
+
+link:http://www.datanucleus.org/[DataNucleus] is the reference implementation of the JDO (Java data objects) spec, and Apache Isis integrates with DataNucleus as its persistence layer.  Datanucleus is a very powerful library, allowing domain entities to be mapped not only to relational database tables, but also to NoSQL stores such as link:http://neo4j.com/[Neo4J], link:http://www.mongodb.org/[MongoDB] and link:http://cassandra.apache.org/[Apache Cassandra].
+
+With such power comes a little bit of complexity to the development environment: all domain entities must be enhanced through the DataNucleus enhancer.
+
+[NOTE]
+====
+Bytecode enhancement is actually a requirement of the JDO spec; the process is described in outline http://db.apache.org/jdo/enhancement.html[here].
+====
+
+What this means is that the enhancer -- available as both a Maven plugin and as an Eclipse plugin -- must, one way or another, be integrated into your development environment.
+
+If working from the Maven command line, JDO enhancement is done using the `maven-datanucleus-plugin`.  As of 1.9.0, we put all the configuration into an (always active) profile:
+
+[TIP]
+====
+The configuration described below is automatically set up by the xref:ug.adoc#_ugfun_getting-started_simpleapp-archetype[SimpleApp archetype].
+====
+
+
+[source,xml]
+----
+<profile>
+    <id>enhance</id>
+    <activation>
+        <activeByDefault>true</activeByDefault>
+    </activation>
+    <properties>
+        <datanucleus-maven-plugin.version>4.0.1</datanucleus-maven-plugin.version>
+    </properties>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.datanucleus</groupId>
+                <artifactId>datanucleus-maven-plugin</artifactId>
+                <version>${datanucleus-maven-plugin.version}</version>
+                <configuration>
+                    <fork>false</fork>
+                    <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
+                    <verbose>true</verbose>
+                    <props>${basedir}/datanucleus.properties</props>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>process-classes</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.datanucleus</groupId>
+            <artifactId>datanucleus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.datanucleus</groupId>
+            <artifactId>datanucleus-jodatime</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.datanucleus</groupId>
+            <artifactId>datanucleus-api-jdo</artifactId>
+        </dependency>
+    </dependencies>
+</profile>
+----
+
+The xref:ug.adoc#_ugfun_getting-started_simpleapp-archetype[SimpleApp archetype]  sets up the plugin correctly in the `dom` (domain object model) module.  (It's actually a little bit more complex to cater for users of the Eclipse IDE using Eclipse's m2e plugin).
+
+
+
+
+== `META-INF/persistence.xml`
+
+It's also a good idea to ensure that the `dom` module has a JDO `META-INF/persistence.xml` file:
+
+[source,xml]
+----
+<?xml version="1.0" encoding="UTF-8" ?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
+
+    <persistence-unit name="simple"> <!--1-->
+    </persistence-unit>
+</persistence>
+----
+<1> change as required; typically is the name of the app.
+
+Again, the xref:ug.adoc#_ugfun_getting-started_simpleapp-archetype[SimpleApp archetype] does this.
+
+[WARNING]
+====
+If running on Windows, then there's a good chance you'll hit the http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath[maximum path length limit].   In this case the `persistence.xml` file is mandatory rather than optional.
+
+This file is also required if you are using developing in Eclipse and relying on the DataNucleus plugin for Eclipse rather than the DataNucleus plugin for Maven.  More information can be found xref:cg.adoc#_cg_ide_eclipse[here].
+====

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc
new file mode 100644
index 0000000..6620162
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_getting-started_simpleapp-archetype.adoc
@@ -0,0 +1,304 @@
+[[_ugfun_getting-started_simpleapp-archetype]]
+= SimpleApp Archetype
+:Notice: 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.
+:_basedir: ../../
+:_imagesdir: images/
+
+
+The quickest way to get started with Apache Isis is to run the simple archetype.  This will generate a very simple one-class domain model, called `SimpleObject`, with a single property `name`.
+
+There is also a corresponding `SimpleObjectRepository` domain service.  From this you can easily rename these initial classes, and extend to build up your own Apache Isis domain application.
+
+
+
+== Generating the App
+
+Create a new directory, and `cd` into that directory.
+
+To build the app from the latest stable release, then run the following command:
+
+[source,bash]
+----
+mvn archetype:generate  \
+    -D archetypeGroupId=org.apache.isis.archetype \
+    -D archetypeArtifactId=simpleapp-archetype \
+    -D archetypeVersion=1.10.0 \
+    -D groupId=com.mycompany \
+    -D artifactId=myapp \
+    -D version=1.0-SNAPSHOT \
+    -B
+----
+
+where:
+
+- `groupId` represents your own organization, and
+- `artifactId` is a unique identifier for this app within your organization.
+- `version` is the initial (snapshot) version of your app
+
+The archetype generation process will then run; it only takes a few seconds.
+
+
+We also maintain the archetype for the most current `-SNAPSHOT`; an app generated with this archetype will contain the latest features of Apache Isis, but the usual caveats apply: some features still in development may be unstable.
+
+The process is almost identical to that for stable releases, however the `archetype:generate` goal is called with slightly different arguments:
+
+[source,bash]
+----
+mvn archetype:generate  \
+    -D archetypeGroupId=org.apache.isis.archetype \
+    -D archetypeArtifactId=simpleapp-archetype \
+    -D archetypeVersion=1.11.0-SNAPSHOT \
+    -D groupId=com.mycompany \
+    -D artifactId=myapp \
+    -D version=1.0-SNAPSHOT \
+    -D archetypeRepository=http://repository-estatio.forge.cloudbees.com/snapshot/ \
+    -B
+----
+
+where as before:
+
+- `groupId` represents your own organization, and
+- `artifactId` is a unique identifier for this app within your organization.
+- `version` is the initial (snapshot) version of your app
+
+but also:
+
+- `archetypeVersion` is the SNAPSHOT version of Apache Isis.
+- `archetypeRepository` specifies the location of our snapshot repo (hosted on link:http://www.cloudbees.com[CloudBees]), and
+
+The archetype generation process will then run; it only takes a few seconds.
+
+
+
+== Building the App
+
+Switch into the root directory of your newly generated app, and build your app:
+
+[source,bash]
+----
+cd myapp
+mvn clean install
+----
+
+where `myapp` is the `artifactId` entered above.
+
+
+
+
+== Running the App
+
+The `simpleapp` archetype generates a single WAR file, configured to run both the xref:ugvw.adoc#[Wicket viewer] and the xref:ugvro.adoc#[Restful Objects viewer].  The archetype also configures the DataNucleus/JDO Objectstore to use an in-memory HSQLDB connection.
+
+Once you've built the app, you can run the WAR in a variety of ways.
+
+
+=== Self-hosted
+
+The easiest way to run the app, at least while getting started, is to run the self-hosting version of the WAR.  With this style the app runs up its own internal instance of Jetty web server.
+
+For example:
+
+
+[source,bash]
+----
+java -jar webapp/target/myapp-webapp-1.0-SNAPSHOT-jetty-console.jar
+----
+
+
+This can also be accomplished using an embedded Ant target provided in the build script:
+
+[source,bash]
+----
+mvn -P self-host antrun:run
+----
+
+
+=== Using mvn Jetty plugin
+
+Alternatively, you could run the WAR in a Maven-hosted Jetty instance, though you need to `cd` into the `webapp` module:
+
+[source,bash]
+----
+cd webapp
+mvn jetty:run
+----
+
+If you use `mvn jetty:run`, then the context path changes; check the console output (eg link:http://localhost:8080/myapp-webapp [http://localhost:8080/myapp-webapp]).
+
+
+You can also provide a system property to change the port:
+
+[source,bash]
+----
+cd webapp
+mvn jetty:run -D jetty.port=9090
+----
+
+
+=== Using a regular servlet container
+
+You can also take the built WAR file and deploy it into a standalone servlet container such as [Tomcat](http://tomcat.apache.org).  The default configuration does not require any configuration of the servlet container; just drop the WAR file into the `webapps` directory.
+
+
+
+=== From within the IDE
+
+Most of the time, though, you'll probably want to run the app from within your IDE.  The mechanics of doing this will vary by IDE; see the xref:cg.adoc#_cg_ide[Contributors' Guide] for details of setting up Eclipse or IntelliJ IDEA.  Basically, though, it amounts to running `org.apache.isis.WebServer`, and ensuring that the xref:ug.adoc#_ugfun_getting-started_datanucleus-enhancer[DataNucleus enhancer] has properly processed all domain entities.
+
+Here's what the setup looks like in IntelliJ IDEA:
+
+image::{_imagesdir}getting-started/simpleapp-webapp.png[width="600px",link="{_imagesdir}getting-started/simpleapp-webapp.png"]
+
+
+
+== Running with Fixtures
+
+It is also possible to start the application with a pre-defined set of data; useful for demos or manual exploratory testing.  This is done by specifying a xref:ugtst.adoc#_ugtst_fixture-scripts[fixture script] on the command line.
+
+If running the self-hosted console, you can specify the fixtures using the `--initParam` flag:
+
+[source,bash]
+----
+java -jar webapp/target/myapp-webapp-1.0-SNAPSHOT-jetty-console.jar \
+     --initParam isis.persistor.datanucleus.install-fixtures=true  \
+     --initParam isis.fixtures=domainapp.fixture.scenarios.RecreateSimpleObjects
+----
+
+where (in the above example) `domainapp.fixture.scenarios.RecreateSimpleObjects` is the fully qualified class name of the fixture
+script to be run.
+
+If you are running the app from an IDE, then you can specify the fixture script using the `--fixture` flag:
+
+image::{_imagesdir}getting-started/simpleapp-webapp-with-fixtures.png[width="600px",link="{_imagesdir}getting-started/simpleapp-webapp-with-fixtures.png"]
+
+
+
+== Using the App
+
+When you start the app, you'll be presented with a welcome page from which you can access the webapp using either the xref:ugvw.adoc#[Wicket viewer] or the xref:ugvro.adoc#[Restful Objects viewer]:
+
+image::{_imagesdir}getting-started/using-simple-app/010-root-page.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/010-root-page.png"]
+
+
+The Wicket viewer provides a human usable web UI (implemented, as you might have guessed from its name, using link:http://wicket.apache.org[Apache Wicket]), so choose that and navigate to the login page:
+
+image::{_imagesdir}getting-started/using-simple-app/020-login-to-wicket-viewer.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/020-login-to-wicket-viewer.png"]
+
+The app itself is configured to run using xref:ugsec.adoc#[shiro security], as configured in the `WEB-INF/shiro.ini` config file.  You can login with:
+
+* username: _sven_
+* password: _pass_
+
+The application is configured to run with an in-memory database, and (unless you started the app with fixture scripts as described above), initially there is no data.  We can though run a fixture script from the app itself:
+
+image::{_imagesdir}getting-started/using-simple-app/030-home-page-run-fixture-scripts.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/030-home-page-run-fixture-scripts.png"]
+
+The fixture script creates three objects, and the action returns the first of these:
+
+image::{_imagesdir}getting-started/using-simple-app/040-first-object.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/040-first-object.png"]
+
+The application generated is deliberaetly very minimal; we don't want you to have to waste valuable time removing generated files.  The object contains a single "name" property, and a single action to update that property:
+
+image::{_imagesdir}getting-started/using-simple-app/050-update-name-prompt.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/050-update-name-prompt.png"]
+
+When you hit OK, the object is updated:
+
+image::{_imagesdir}getting-started/using-simple-app/060-object-updated.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/060-object-updated.png"]
+
+
+For your most signficant domain entities you'll likely have a domain service to retrieve or create instances of those obejcts.  In the generated app we have a "Simple Objects" domain service that lets us list all objects:
+
+image::{_imagesdir}getting-started/using-simple-app/070-list-all-prompt.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/070-list-all-prompt.png"]
+
+whereby we see the three objects created by the fixture script (one having been updated):
+
+image::{_imagesdir}getting-started/using-simple-app/080-list-all.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/080-list-all.png"]
+
+and we can also use the domain service to create new instances:
+
+image::{_imagesdir}getting-started/using-simple-app/090-create.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/090-create.png"]
+
+prompting us for the mandatory information (the name):
+
+image::{_imagesdir}getting-started/using-simple-app/100-create-prompt.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/100-create-prompt.png"]
+
+which, of course, returns the newly created object:
+
+image::{_imagesdir}getting-started/using-simple-app/110-object-created.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/110-object-created.png"]
+
+When we list all objects again, we can see that the object was indeed created:
+
+image::{_imagesdir}getting-started/using-simple-app/120-list-all.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/120-list-all.png"]
+
+Going back to the home page (link:http://localhost:8080[localhost:8080]) we can also access the Restful Objects viewer.  The generated application is configured to use HTTP Basic Auth:
+
+image::{_imagesdir}getting-started/using-simple-app/220-login-to-restful-viewer.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/220-login-to-restful-viewer.png"]
+
+The Restful Objects viewer provides a REST API for computer-to-computer interaction, but we can still interact with it from a browser:
+
+image::{_imagesdir}getting-started/using-simple-app/230-home-page.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/230-home-page.png"]
+
+[TIP]
+====
+Depending on your browser, you may need to install plugins.  For Chrome, we recommend json-view (which renders the JSON indented and automatically detects hyperlinks) and REST Postman.
+====
+
+The REST API is a complete hypermedia API, in other words you can follow the links to access all the behaviour exposed in the regular Wicket app.  For example, we can navigate to the `listAll/invoke` resource:
+
+image::{_imagesdir}getting-started/using-simple-app/240-list-all-invoke.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/240-list-all-invoke.png"]
+
+which when invoked (with an HTTP GET) will return a representation of the domain objects.
+
+image::{_imagesdir}getting-started/using-simple-app/250-list-all-results.png[width="600px",link="{_imagesdir}getting-started/using-simple-app/250-list-all-results.png"]
+
+
+To log in, use `sven/pass`.
+
+
+
+
+
+== Modifying the App
+
+Once you are familiar with the generated app, you'll want to start modifying it.  There is plenty of guidance on this site; check out the 'programming model how-tos' section on the main link:../documentation.html[documentation] page first).
+
+If you use Eclipse or IntelliJ IDEA, do also install the xref:cg.adoc#_cg_ide-templates[IDE templates]; these will help you follow the Apache Isis naming conventions.
+
+
+
+
+
+== App Structure
+
+As noted above, the generated app is a very simple application consisting of a single domain object that can be easily renamed and extended. The intention is not to showcase all of Apache Isis' capabilities; rather it is to allow you to very easily modify the generated application (eg rename `SimpleObject` to `Customer`) without having to waste time deleting lots of generated code.
+
+
+
+[cols="1,3", options="header"]
+|===
+| Module
+| Description
+
+|`myapp`
+|The parent (aggregator) module
+
+|`myapp-app`
+|(1.9.0) The "app" module, containing the (optional) app manifest and any application-level services.
+
+|`myapp-dom`
+|The domain object model, consisting of `SimpleObject` and `SimpleObjects` (repository) domain service.
+
+|`myapp-fixture`
+|Domain object fixtures used for initializing the system when being demo'ed or for unit testing.
+
+|`myapp-integtests`
+|End-to-end xref:ugtst.adoc#_ugtst_integ-test-support[integration tests] that exercise from the UI through to the database
+
+|`myapp-webapp`
+|Run as a webapp (from `web.xml`) hosting the xref:ugvw.adoc#[Wicket viewer] and/or the xref:ugvro.adoc#[RestfulObjects viewer]
+
+|===
+
+
+
+If you run into issues, please don't hesitate to ask for help on the link:http://isis.apache.org/help.html[users mailing list].

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos.adoc
new file mode 100644
index 0000000..4c05fe6
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos.adoc
@@ -0,0 +1,22 @@
+[[_ugfun_how-tos]]
+= How tos
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+This chapter provides a grab bag of "how-to"s and tips to help you go about actually developing Apache Isis domain applications.
+
+include::_ugfun_how-tos_class-structure.adoc[leveloffset=+1]
+include::_ugfun_how-tos_ui-hints.adoc[leveloffset=+1]
+include::_ugfun_how-tos_domain-services.adoc[leveloffset=+1]
+include::_ugfun_how-tos_crud.adoc[leveloffset=+1]
+include::_ugfun_how-tos_entity-relationships.adoc[leveloffset=+1]
+include::_ugfun_how-tos_contributed-members.adoc[leveloffset=+1]
+include::_ugfun_how-tos_business-rules.adoc[leveloffset=+1]
+include::_ugfun_how-tos_derived-members.adoc[leveloffset=+1]
+include::_ugfun_how-tos_drop-downs-and-defaults.adoc[leveloffset=+1]
+include::_ugfun_how-tos_bulk-actions.adoc[leveloffset=+1]
+include::_ugfun_how-tos_simulating-collections-of-values.adoc[leveloffset=+1]
+include::_ugfun_how-tos_render-all-properties-in-tables.adoc[leveloffset=+1]
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_bulk-actions.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_bulk-actions.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_bulk-actions.adoc
new file mode 100644
index 0000000..fba2501
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_bulk-actions.adoc
@@ -0,0 +1,8 @@
+[[_ugfun_how-tos_bulk-actions]]
+= Bulk Actions
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+NOTE: TODO - xref:rgant.adoc#_rgant-Action_invokeOn[`@Action#invokeOn()`]
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_business-rules.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_business-rules.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_business-rules.adoc
new file mode 100644
index 0000000..cf4411e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_business-rules.adoc
@@ -0,0 +1,72 @@
+[[_ugfun_how-tos_business-rules]]
+= Business Rules
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+NOTE: TODO
+
+
+
+== Visibility ("see it")
+
+NOTE: TODO - xref:rgcms.adoc#_rgcms_methods_prefixes_hide[`hide...()`]
+
+### Hide a Property
+
+### Hide a Collection
+
+### Hide an Action
+
+### Hide a Contributed Property, Collection or Action
+
+### All Members Hidden
+
+
+
+
+== Usability ("use it")
+
+NOTE: TODO - xref:rgcms.adoc#_rgcms_methods_prefixes_disable[`disable...()`]
+
+### Disable a Property
+
+### Disable a Collection
+
+### Disable an Action
+
+### Disable a Contributed Property, Collection or Action
+
+### All Members Unmodifiable (Disabling the Edit Button)
+
+Sometimes an object is unmodifiable.
+
+In the Wicket viewer this means disabling the edit button.
+
+#### Declarative
+
+`@DomainObject(editing=...)`
+
+#### Imperative
+
+
+
+== Validity ("do it")
+
+NOTE: TODO - xref:rgcms.adoc#_rgcms_methods_prefixes_validate[`validate...()`], xref:rgcms.adoc#_rgcms_methods_prefixes_validateAddTo[`validateAddTo...()`], xref:rgcms.adoc#_rgcms_methods_prefixes_validateRemoveFrom[`validateRemoveFrom...()`] and xref:rgcms.adoc#_rgcms_methods_reserved_validate[`validate()`]
+
+
+### Validate (change to) a Property
+
+### Validate (adding or removing from) a Collection
+
+### Validate (arguments to invoke) an Action
+
+### Validating a Contributed Property, Collection or Action
+
+### Declarative validation
+
+NOTE: TODO - using xref:rgant.adoc#_rgant-Parameter_mustSatisfy[`@Parameter#mustSatisfy()`], xref:rgant.adoc#_rgant-Property_mustSatisfy[`@Property#mustSatisfy()`]
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure.adoc
new file mode 100644
index 0000000..4907108
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure.adoc
@@ -0,0 +1,38 @@
+[[_ugfun_how-tos_class-structure]]
+= Class Structure
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+Apache Isis works by building a metamodel of the domain objects: entities, xref:ugbtb.adoc#_ugbtb_more-advanced_view-models[view model]s and services.  The class members of both entities and view models represent both state -- (single-valued) properties and (multi-valued) collections -- and behaviour -- actions.  The class members of domain services is simpler: just behaviour, ie actions.
+
+In the automatically generated UI a property is rendered as a field.  This can be either of a value type (a string, number, date, boolean etc) or can be a reference to another entity.  A collection is generally rendered as a table.
+
+In order for Apache Isis to build its metamodel the domain objects must follow some conventions: what we call the _Apache Isis Programming Model_.  This is just an extension of the pojo / JavaBean standard of yesteryear: properties and collections are getters/setters, while actions are simply any remaining `public` methods.
+
+Additional metamodel semantics are inferred both imperatively from _supporting methods_ and declaratively from annotations.
+
+In this section we discuss the mechanics of writing domain objects that comply with Apache Isis' programming model.
+
+[TIP]
+====
+In fact, the Apache Isis programming model is extensible; you can teach Apache Isis new programming conventions and you can remove existing ones; ultimately they amount to syntax.   The only real fundamental that can't be changed is the notion that objects consist of properties, collections and actions.
+
+You can learn more about extending Apache Isis programming model xref:ugbtb.adoc#_ugbtb_programming-model[here].
+====
+
+
+include::_ugfun_how-tos_class-structure_class-definition.adoc[leveloffset=+1]
+include::_ugfun_how-tos_class-structure_properties.adoc[leveloffset=+1]
+include::_ugfun_how-tos_class-structure_collections.adoc[leveloffset=+1]
+include::_ugfun_how-tos_class-structure_actions.adoc[leveloffset=+1]
+include::_ugfun_how-tos_class-structure_action-parameters.adoc[leveloffset=+1]
+include::_ugfun_how-tos_class-structure_inject-services.adoc[leveloffset=+1]
+
+include::_ugfun_how-tos_class-structure_properties-vs-parameters.adoc[leveloffset=+1]
+
+include::_ugfun_how-tos_class-structure_ignoring-methods.adoc[leveloffset=+1]
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_action-parameters.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_action-parameters.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_action-parameters.adoc
new file mode 100644
index 0000000..3d87032
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_action-parameters.adoc
@@ -0,0 +1,26 @@
+[[_ugfun_how-tos_class-structure_action-parameters]]
+= Action Parameters
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+NOTE: TODO
+
+
+
+== ``String``s (Length)
+
+NOTE: TODO
+
+
+== ``BigDecimal``s (Precision)
+
+NOTE: TODO
+
+
+== Optional
+
+NOTE: TODO
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_actions.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_actions.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_actions.adoc
new file mode 100644
index 0000000..8f82ffa
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_actions.adoc
@@ -0,0 +1,19 @@
+[[_ugfun_how-tos_class-structure_actions]]
+= Actions
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
+
+
+[NOTE]
+====
+While Apache Isis support actions whose parameters' types are scalar (values such as `String`, `int`, or references such as `Customer`), the framework (currently) does not support parameter types that are collections or maps.
+
+The workaround is to mark the collection as `@Programmatic`, as described in xref:ug.adoc#_ugfun_how-tos_class-structure_ignoring-methods[Ignoring Methods].  This ensures that the collection is ignored by Apache Isis.
+====
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_class-definition.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_class-definition.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_class-definition.adoc
new file mode 100644
index 0000000..94ed01c
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_class-definition.adoc
@@ -0,0 +1,24 @@
+[[_ugfun_how-tos_class-structure_class-definition]]
+= Class Definition
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
+
+
+Classes are defined both to Isis and (if an entity) also to JDO/DataNucleus.
+
+
+We use Java packages as a way to group related domain objects together; the package name forms a namespace. We can then reason about all the classes in that package/namespace as a single unit.
+
+In the same way that Java packages act as a namespace for domain objects, it's good practice to map domain entities to their own (database) schemas.
+
+[TIP]
+====
+For more on this topic, see the topic discussing modules and xref:ugbtb.adoc#_ugbtb_more-advanced_decoupling[decoupling].
+====
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_collections.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_collections.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_collections.adoc
new file mode 100644
index 0000000..01afcd9
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_collections.adoc
@@ -0,0 +1,26 @@
+[[_ugfun_how-tos_class-structure_collections]]
+= Collections
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+NOTE: TODO
+
+
+[NOTE]
+====
+While Apache Isis support collections of references, the framework (currently) does not support collections of values. That is, it isn't possible to define a collection of type `Set<String>`.
+
+Or, actually, you can, because that is a valid mapping supported by JDO/DataNucleus .  However, Apache Isis has no default visualization.
+
+One workaround is to mark the collection as xref:rgant.adoc#_rgant-Programmatic[`@Programmatic`].  This ensures that the collection is ignored by Apache Isis.
+
+Another workaround is to wrap each value in a view model, as explained in this xref:ug.adoc#_ugfun_how-tos_simulating-collections-of-values[tip].
+====
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_ignoring-methods.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_ignoring-methods.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_ignoring-methods.adoc
new file mode 100644
index 0000000..cbaf310
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_ignoring-methods.adoc
@@ -0,0 +1,16 @@
+[[_ugfun_how-tos_class-structure_ignoring-methods]]
+= Ignoring Methods
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
+
+
+Sometimes you want to define a `public` method on a domain object that is not intended to be rendered in Apache Isis' UI.
+
+To exclude such methods, use the xref:rgant.adoc#_rgant-Programmatic[`@Programmatic`] annotation.
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_inject-services.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_inject-services.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_inject-services.adoc
new file mode 100644
index 0000000..2f4a98d
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_inject-services.adoc
@@ -0,0 +1,83 @@
+[[_ugfun_how-tos_class-structure_inject-services]]
+= Injecting services
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+Apache Isis autowires (automatically injects) domain services into each entity, as well as into the domain services themselves, using either method injection or field injection. The applib `DomainObjectContainer` is also a service, so can be injected in exactly the same manner.
+
+
+[NOTE]
+====
+Isis currently does _not_ support qualified injection of services; the domain service of each type must be distinct from any other.
+
+If you find a requirement to inject two instances of type `SomeService`, say, then the work-around is to create trivial subclasses `SomeServiceA` and `SomeServiceB` and inject these instead.
+====
+
+
+== Field Injection
+
+Field injection is recommended, using the `@javax.inject.Inject` annotation. For example:
+
+[source,java]
+----
+public class Customer {
+    @javax.inject.Inject
+    OrderRepository orderRepository;
+    ...
+}
+----
+
+
+We recommend using default rather than `private` visibility so that the field can be mocked out within unit tests (placed in the same package as the code under test).
+
+
+
+
+== Method Injection
+
+Isis also supports two forms of method injection.  All that is required to inject a service into a entity/service is to provide an appropriate method or field. The name
+of the method does not matter, only that it is prefixed either `set` or `inject`, is
+public, and has a single parameter of the correct type.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    private OrderRepository orderRepository;
+    public void setOrderRepository(OrderRepository orderRepository) {
+        this.orderRepository = orderRepository;
+    }
+    ...
+}
+----
+
+or alternatively, using 'inject' as the prefix:
+
+[source,java]
+----
+public class Customer {
+    private OrderRepository orderRepository;
+    public void injectOrderRepository(OrderRepository orderRepository) {
+        this.orderRepository = orderRepository;
+    }
+    ...
+}
+----
+
+Note that the method name can be anything; it doesn't need to be related to the type being injected.
+
+
+
+
+== Constructor injection
+
+Simply to note that constructor injection is _not_ supported by Apache Isis (and is unlikely to be, because the JDO specification for entities requires a no-arg constructor).
+
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties-vs-parameters.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties-vs-parameters.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties-vs-parameters.adoc
new file mode 100644
index 0000000..5cbd40f
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties-vs-parameters.adoc
@@ -0,0 +1,45 @@
+[[_ugfun_how-tos_class-structure_properties-vs-parameters]]
+= Properties vs Parameters
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO
+
+
+In many cases the value types of properties and of action parameters align. For example, a `Customer` entity might have a `surname` property, and there might also be corresponding `changeSurname`.  Ideally we want the surname property and surname action parameter to use the same value type.
+
+Having first-class support for this is a goal of Apache Isis, and it is already possible (by writing some plumbing and glue code using Isis and DataNucleus APIs) to get some way towards this ideal.  However, in the vast majority of cases it is much easier and more practical to simply use standard value types such as `java.lang.String`.
+
+However, the JDO/DataNucleus annotations for specifying semantics such as optionality or maximum length are restricted to only apply to fields and to methods; they cannot be applied to action parameters.  It is therefore necessary to use Apache Isis' equivalent annotations for action parameters.
+
+The table below summarises the equivalence of some of the most common cases.
+
+
+.Comparing annotations of Properties vs Action Parameters
+[cols="2,3,3", options="header"]
+|===
+|value type/semantic
+|property
+|action parameter
+
+|string (length)
+|
+|
+
+|big decimal (precision)
+|
+|
+
+|Isis blob
+|
+|
+
+|optional
+|`@Column(allowsNull="true")`
+|`ParameterLayout(optionality=Optionality.OPTIONAL`) or `@Optional`
+|===
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc
new file mode 100644
index 0000000..6bc76fa
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc
@@ -0,0 +1,299 @@
+[[_ugfun_how-tos_class-structure_properties]]
+= Property
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+NOTE: TODO
+
+
+
+
+
+== Value vs Reference Types
+
+NOTE: TODO
+
+The annotations for mapping value types tend to be different for properties vs action parameters, because JDO annotations are only valid on properties.  The table in the xref:ug.adoc#_ugfun_how-tos_class-structure_properties-vs-parameters[Properties vs Parameters] section provides a handy reference of each.
+
+
+
+== Optional Properties
+
+JDO/DataNucleus' default is that a property is assumed to be mandatory if it is a primitive type (eg `int`, `boolean`), but optional if a reference type (eg `String`, `BigDecimal` etc).  To override optionality in JDO/DataNucleus the `@Column(allowsNull="...")` annotations is used.
+
+Apache Isis on the other hand assumes that all properties (and action parameters, for that matter) are mandatory, not optional.  These defaults can also be overridden using Apache Isis' own annotations, specifically `@Property(optionality=...)`.
+
+These different defaults can lead to incompatibilities between the two frameworks.  To counteract that, Apache Isis also recognizes and honours JDO's `@Column(allowsNull=...)`.
+
+For example, rather than:
+
+[source,java]
+----
+@javax.jdo.annotations.Column(allowNulls="true")
+private LocalDate date;
+@Property(optionality=Optionality.OPTIONAL)
+public LocalDate getDate() { ... }
+public void setDate(LocalDate d) { ... }
+----
+
+you should instead simply write:
+
+[source,java]
+----
+private LocalDate date;
+@javax.jdo.annotations.Column(allowNulls="true")
+public LocalDate getDate() { ... }
+public void setDate(LocalDate d) { ... }
+----
+
+[WARNING]
+====
+With JDO/DataNucleus it's valid for the `@Column` annotation to be placed on either the field or the getter.  Apache Isis (currently) only looks for annotations on the getter.  We therefore recommend that you always place `@Column` on the gettter.
+====
+
+In all cases the framework will search for any incompatibilities in optionality (whether specified explicitly or defaulted implicitly) between Isis' defaults and DataNucleus, and refuse to boot if any are found (fail fast).
+
+
+
+=== Handling Mandatory Properties in Subtypes
+
+If you have a hierarchy of classes then you need to decide which inheritance strategy to use.
+
+* "table per hierarchy", or "rollup" (`InheritanceStrategy.SUPERCLASS_TABLE`) +
++
+whereby a single table corresponds to the superclass, and also holds the properties of the subtype (or subtypes) being rolled up
+
+* "table per class" (`InheritanceStrategy.NEW_TABLE`) +
++
+whereby is a table for both superclass and subclass, in 1:1 correspondence
+
+* "rolldown" (`InheritanceStrategy.SUBCLASS_TABLE`) +
++
+whereby a single table holds the properties of the subtype, and also holds the properties of its supertype
+
+In the first "rollup" case, we can have a situation where - logically speaking - the property is mandatory in the subtype - but it must be mapped as nullable in the database because it is n/a for any other subtypes that are rolled up.
+
+In this situation we must tell JDO that the column is optional, but to Apache Isis we want to enforce it being mandatory. This can be done using the `@Property(optionality=Optionality.MANDATORY)` annotation.
+
+For example:
+
+[source,java]
+----
+@javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.SUPER_TABLE)
+public class SomeSubtype extends SomeSuperType {
+    private LocalDate date;
+    @javax.jdo.annotations.Column(allowNulls="true")
+    @Property(optionality=Optionality.MANDATORY)
+    public LocalDate getDate() { ... }
+    public void setDate(LocalDate d) { ... }
+}
+----
+
+[TIP]
+====
+The `@Property(optionality=...)` annotation is equivalent to the older but still supported `@Optional` annotation and `@Mandatory` annotations. Its benefit is that it lumps together all Apache Isis' property metadata in a single annotation.  Its downside is that it is rather verbose if the only semantic that needs to be specified -- as is often the case -- is optionality.
+====
+
+An alternative way to achieve this is to leave the JDO annotation on the field (where it is invisible to Apache Isis), and rely on Isis' default, eg:
+
+[source,java]
+----
+@javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.SUPER_TABLE)
+public class SomeSubtype extends SomeSuperType {
+    @javax.jdo.annotations.Column(allowNulls="true")
+    private LocalDate date;
+    // mandatory in Apache Isis by default
+    public LocalDate getDate() { }
+    public void setDate(LocalDate d) { }
+}
+----
+
+We recommend the former mapping, though, using `@Property(optionality=Optionality.MANDATORY)`.
+
+
+
+
+
+== ``String``s (Length)
+
+NOTE: TODO
+
+
+
+
+
+[[_ugfun_how-tos_class-structure_properties_mapping-joda-dates]]
+== Mapping JODA Dates
+
+Isis' JDO objectstore bundles DataNucleus' http://www.datanucleus.org/documentation/products/plugins.html[built-in support] for Joda `LocalDate` and `LocalDateTime` datatypes, meaning that entity properties of these types will be persisted as appropriate data types in the database tables.
+
+It is, however, necessary to annotate your properties with `@javax.jdo.annotations.Persistent`, otherwise the data won't actually be persisted. See the http://db.apache.org/jdo/field_types.html[JDO docs] for more details on this.
+
+Moreover, these datatypes are _not_ in the default fetch group, meaning that JDO/DataNucleus will perform an additional `SELECT` query for each attribute. To avoid this extra query, the annotation should indicate that the property is in the default fetch group.
+
+For example, the `ToDoItem` (in the https://github.com/isisaddons/isis-app-todoapp[todoapp example app] (not ASF)) defines the `dueBy` property as follows:
+
+
+
+== ``BigDecimal``s (Precision)
+
+Working with `java.math.BigDecimal` properties takes a little care due to scale/precision issues.
+
+For example, suppose we have:
+
+[source,java]
+----
+private BigDecimal impact;
+public BigDecimal getImpact() {
+    return impact;
+}
+public void setImpact(final BigDecimal impact) {
+    this.impact = impact;
+}
+----
+
+JDO/DataNucleus creates, at least with HSQL, the table with the field type as NUMERIC(19). No decimal digits are admitted. (Further details http://hsqldb.org/doc/2.0/guide/sqlgeneral-chapt.html#sgc_numeric_types[here]).
+
+What this implies is that, when a record is inserted, a log entry similar to this one appears:
+
+[source,java]
+----
+INSERT INTO ENTITY(..., IMPACT, ....) VALUES (...., 0.5, ....)
+----
+
+But when that same record is retrieved, the log will show that a value of "0" is returned, instead of 0.5.
+
+The solution is to explicitly add the scale to the field like this:
+
+[source,java]
+----
+@javax.jdo.annotations.Column(scale=2)
+private BigDecimal impact;
+public BigDecimal getImpact() {
+    return impact;
+}
+public void setImpact(final BigDecimal impact) {
+    this.impact = impact;
+}
+----
+
+In addition, you should also set the scale of the `BigDecimal`, using `setScale(scale, roundingMode)`.
+
+More information can be found http://www.opentaps.org/docs/index.php/How_to_Use_Java_BigDecimal:_A_Tutorial[here] and http://www.tutorialspoint.com/java/math/bigdecimal_setscale_rm_roundingmode.htm[here].
+
+
+
+
+== Mapping Blobs and Clobs
+
+Apache Isis configures JDO/DataNucleus so that the properties of type `org.apache.isis.applib.value.Blob` and `org.apache.isis.applib.value.Clob` can also be persisted.
+
+As for xref:ug.adoc#_ugfun_how-tos_class-structure_properties_mapping-joda-dates[Joda dates], this requires the `@javax.jdo.annotations.Persistent` annotation. However, whereas for dates one would always expect this value to be retrieved eagerly, for blobs and clobs it is not so clear cut.
+
+=== Mapping Blobs
+
+For example, in the `ToDoItem` class (of the https://github.com/isisaddons/isis-app-todoapp/blob/61b8114a8e01dbb3c380b31cf09eaed456407570/dom/src/main/java/todoapp/dom/module/todoitem/ToDoItem.java#L475[todoapp example app] (non-ASF) the `attachment` property is as follows:
+
+[source,java]
+----
+@javax.jdo.annotations.Persistent(defaultFetchGroup="false", columns = {
+    @javax.jdo.annotations.Column(name = "attachment_name"),
+    @javax.jdo.annotations.Column(name = "attachment_mimetype"),
+    @javax.jdo.annotations.Column(name = "attachment_bytes", jdbcType="BLOB", sqlType = "LONGVARBINARY")
+})
+private Blob attachment;
+@Property(
+        optionality = Optionality.OPTIONAL
+)
+public Blob getAttachment() {
+    return attachment;
+}
+public void setAttachment(final Blob attachment) {
+    this.attachment = attachment;
+}
+----
+
+The three `@javax.jdo.annotations.Column` annotations are required because the mapping classes that Apache Isis provides (https://github.com/apache/isis/blob/isis-1.4.0/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/valuetypes/IsisBlobMapping.java#L59[IsisBlobMapping] and https://github.com/apache/isis/blob/isis-1.4.0/component/objectstore/jdo/jdo-datanucleus/src/main/java/org/apache/isis/objectstore/jdo/datanucleus/valuetypes/IsisClobMapping.java#L59[IsisClobMapping]) map to 3 columns. (It is not an error to omit these `@Column` annotations, but without them the names of the table columns are simply suffixed `_0`, `_1`, `_2` etc.
+
+If the `Blob` is mandatory, then use:
+
+[source,java]
+----
+@javax.jdo.annotations.Persistent(defaultFetchGroup="false", columns = {
+    @javax.jdo.annotations.Column(name = "attachment_name", allowsNull="false"),
+    @javax.jdo.annotations.Column(name = "attachment_mimetype", allowsNull="false"),
+    @javax.jdo.annotations.Column(name = "attachment_bytes",
+                                  jdbcType="BLOB", sqlType = "LONGVARBINARY",
+                                  allowsNull="false")
+})
+private Blob attachment;
+@Property(
+    optionality = Optionality.MANDATORY
+)
+public Blob getAttachment() {
+return attachment;
+}
+public void setAttachment(final Blob attachment) {
+this.attachment = attachment;
+}
+----
+
+[NOTE]
+====
+If specifying a `sqlType` of "LONGVARBINARY" does not work, try instead "BLOB".  There can be differences in behaviour between JDBC drivers.
+====
+
+
+=== Mapping Clobs
+
+Mapping `Clob`s works in a very similar way, but the `jdbcType` and `sqlType` attributes will, respectively, be `CLOB` and `LONGVARCHAR`:
+
+[source,java]
+----
+@javax.jdo.annotations.Persistent(defaultFetchGroup="false", columns = {
+    @javax.jdo.annotations.Column(name = "attachment_name"),
+    @javax.jdo.annotations.Column(name = "attachment_mimetype"),
+    @javax.jdo.annotations.Column(name = "attachment_chars",
+                                  jdbcType="CLOB", sqlType = "LONGVARCHAR")
+})
+private Clob doc;
+@Property(
+    optionality = Optionality.OPTIONAL
+)
+public Clob getDoc() {
+    return doc;
+}
+public void setDoc(final Clob doc) {
+    this.doc = doc;
+}
+----
+
+[NOTE]
+====
+If specifying a `sqlType` of "LONGVARCHAR" does not work, try instead "CLOB".  There can be differences in behaviour between JDBC drivers.
+====
+
+=== Mapping to VARBINARY or VARCHAR
+
+Instead of mapping to a sqlType of `LONGVARBINARY` (or perhaps `BLOB`), you might instead decide to map to a `VARBINARY`.  The difference is whether the binary data is held "on-row" or as a pointer "off-row"; with a `VARBINARY` the data is held on-row and so you will need to specify a length.
+
+For example:
+
+
+[source,java]
+----
+@javax.jdo.annotations.Column(name = "attachment_bytes", jdbcTypr="BLOB", sqlType = "VARBINARY", length=2048)
+----
+
+
+The same argument applies to `LONGVARCHAR` (or `CLOB`); you could instead map to a regular `VARCHAR`:
+
+
+[source,java]
+----
+@javax.jdo.annotations.Column(name = "attachment_chars", sqlType = "VARCHAR", length=2048)
+----
+
+Support and maximum allowed length will vary by database vendor.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_contributed-members.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_contributed-members.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_contributed-members.adoc
new file mode 100644
index 0000000..3b48ccf
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_contributed-members.adoc
@@ -0,0 +1,69 @@
+[[_ugfun_how-tos_contributed-members]]
+= Contributed Members
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+
+
+NOTE: TODO - generalize to discussion on contributed collections/properties; update to new annotations
+
+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.
+
+For example, given a service:
+
+[source,java]
+----
+public interface Library {
+    public Loan borrow(Loanable l, Borrower b);
+}
+----
+
+and the entities:
+
+[source,java]
+----
+public class Book implements Loanable { ... }
+----
+
+and
+
+[source,java]
+----
+public class LibraryMember implements Borrower { ... }
+----
+
+then the `borrow(...)` action will be contributed to both `Book` and to `LibraryMember`.
+
+This is an important capability because it helps to decouple the concrete classes from the services.
+
+If necessary, though, this behaviour can be suppressed by annotating the service action with `@org.apache.isis.applib.annotations.NotContributed`.
+
+For example:
+
+[source,java]
+----
+public interface Library {
+    @NotContributed
+    public Loan borrow(Loanable l, Borrower b);
+}
+----
+
+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.
+
+Note that an action annotated as being `@NotContributed` 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 `@Hidden`.
+
+
+## Contributed Action
+
+NOTE: TODO
+
+## Contributed Property
+
+NOTE: TODO
+
+## Contributed Collection
+
+NOTE: TODO
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_crud.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_crud.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_crud.adoc
new file mode 100644
index 0000000..98a2f83
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_crud.adoc
@@ -0,0 +1,29 @@
+[[_ugfun_how-tos_crud]]
+= Object Management (CRUD)
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+NOTE: TODO
+
+
+## Instantiating and Persisting Objects
+
+NOTE: TODO - using ``DomainObjectContainer``'s support for  xref:rgsvc.adoc#_rgsvc-api_DomainObjectContainer_object-creation-api[creation] and xref:rgsvc.adoc#_rgsvc-api_DomainObjectContainer_object-persistence-api[persistence]
+
+## Finding Objects
+
+NOTE: TODO - using xref:rgsvc.adoc#_rgsvc-api_DomainObjectContainer_generic-repository-api[`DomainObjectContainer`]
+
+### Using DataNucleus type-safe queries
+
+NOTE: TODO - as described xref:rgsvc.adoc#_rgsvc-api_IsisJdoSupport_type-safe-jdoql-queries[here]
+
+
+
+## Deleting Objects
+
+NOTE: TODO using ``DomainObjectContainer``'s support for  xref:rgsvc.adoc#_rgsvc-api_DomainObjectContainer_object-persistence-api[persistence]
+
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/1ad82470/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_derived-members.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_derived-members.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_derived-members.adoc
new file mode 100644
index 0000000..9a472f8
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_derived-members.adoc
@@ -0,0 +1,48 @@
+[[_ugfun_how-tos_derived-members]]
+= Derived Members
+:Notice: 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.
+:_basedir: ../
+:_imagesdir: images/
+
+NOTE: TODO
+
+
+
+
+== Derived Property
+
+NOTE: TODO
+
+
+
+
+== Derived Collection
+
+NOTE: TODO
+
+While derived properties and derived collections typically "walk the graph" to associated objects, there is nothing to prevent the returned value being the result of invoking a repository (domain service) action.
+
+For example:
+
+[source,java]
+----
+public class Customer {
+    ...
+    public List<Order> getMostRecentOrders() {
+        return orderRepo.findMostRecentOrders(this, 5);
+    }
+}
+----
+
+
+
+
+== Trigger on property change
+
+NOTE: TODO - xref:rgcms.adoc#_rgcms_methods_prefixes_modify[`modify...()`], xref:rgcms.adoc#_rgcms_methods_prefixes_clear[`clear...()`]
+
+
+
+== Trigger on collection change
+
+NOTE: TODO - xref:rgcms.adoc#_rgcms_methods_prefixes_addTo[`addTo...()`], xref:rgcms.adoc#_rgcms_methods_prefixes_removeFrom[`removeFrom...()`]