notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r1376 - in development/main/central/site/src/docs/guide: . deployment development development/composition development/profiles development/testing testing
- From: mcconnell AT netcompartner.com
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r1376 - in development/main/central/site/src/docs/guide: . deployment development development/composition development/profiles development/testing testing
- Date: Tue, 04 Jan 2005 08:51:30 +0100
Author: mcconnell
Date: Tue Jan 4 08:51:30 2005
New Revision: 1376
Added:
development/main/central/site/src/docs/guide/development/composition/
development/main/central/site/src/docs/guide/development/composition/index.xml
(contents, props changed)
development/main/central/site/src/docs/guide/development/composition/navigation.xml
(contents, props changed)
development/main/central/site/src/docs/guide/development/testing/
development/main/central/site/src/docs/guide/development/testing/example.xml
(contents, props changed)
development/main/central/site/src/docs/guide/development/testing/index.xml
(contents, props changed)
development/main/central/site/src/docs/guide/development/testing/integration.xml
(contents, props changed)
development/main/central/site/src/docs/guide/development/testing/navigation.xml
(contents, props changed)
Removed:
development/main/central/site/src/docs/guide/testing/
Modified:
development/main/central/site/src/docs/guide/deployment/navigation.xml
development/main/central/site/src/docs/guide/development/navigation.xml
development/main/central/site/src/docs/guide/development/profiles/selection.xml
development/main/central/site/src/docs/guide/navigation.xml
Log:
reshuffle guide content to better emphasise products
Modified:
development/main/central/site/src/docs/guide/deployment/navigation.xml
==============================================================================
--- development/main/central/site/src/docs/guide/deployment/navigation.xml
(original)
+++ development/main/central/site/src/docs/guide/deployment/navigation.xml
Tue Jan 4 08:51:30 2005
@@ -27,7 +27,6 @@
<menu>
<item name="Resources" href="resources/index.html"/>
<item name="Plugins" href="plugins/index.html"/>
- <item name="Composition" href="composite.html"/>
</menu>
</body>
Added:
development/main/central/site/src/docs/guide/development/composition/index.xml
==============================================================================
--- (empty file)
+++
development/main/central/site/src/docs/guide/development/composition/index.xml
Tue Jan 4 08:51:30 2005
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Apache Software Foundation
+ Licensed 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.dpml.net/central/about/legal/
+
+ 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.
+-->
+
+<document>
+ <properties>
+ <author email="mcconnell AT dpml.net">Stephen McConnell</author>
+ <title>DPML Guide</title>
+ </properties>
+
+ <body>
+ <section name="Component Composition">
+ <subsection name="Composite Blocks">
+ <p>
+ A container can declare services that it exports. In such a case
+ the container declares one or more service directives that map
+ components declared within itself as service providers.
+ This mechanism enables a container to appear as a regular
+ component relative to other components.
+ </p>
+ <p>
+ Content supporting this tutorial is available under the
+ tutorials/composition directory.
+ </p>
+ </subsection>
+ <subsection name="Sample Container">
+ <p>
+ The following container definition includes:
+ </p>
+ <ul>
+ <li>an application component</li>
+ <li>a location provider block included by reference</li>
+ <li>an application block included by reference</li>
+ </ul>
+ <p>
+ The application block declares dependencies on a location
+ and publishing service. The location and publishing block
+ declare that they provide these respective services. As a part of
+ the general component assembly process - Metro will assemble
+ blocks relative to the services and dependencies they declare.
+ When a block is deployed, it appears to other components as a
+ component providing the services it exports. However in practice
+ these services are provided by components defined within the
+ container (i.e. the container represents the definition of
+ a virtual component and the containers components and subcontainers
+ represent the virtual component implementation).
+ </p>
+ <p>The top level application block declaration (block.xml):</p>
+ <source><![CDATA[
+<container name="application">
+
+ <classloader>
+ <classpath>
+ <artifact>@SERVICE-API-SPEC@</artifact>
+ <artifact>@TUTORIAL-LOCATION-IMPL-SPEC@</artifact>
+ <artifact>@LOGGING-API-SPEC@</artifact>
+ <artifact>@ACTIVITY-API-SPEC@</artifact>
+ <artifact>@CONFIGURATION-API-SPEC@</artifact>
+ <artifact>@TUTORIAL-LOCATION-API-SPEC@</artifact>
+ <artifact>@TUTORIAL-LOCATION-IMPL-SPEC@</artifact>
+ <artifact>@TUTORIAL-PUBLISHER-API-SPEC@</artifact>
+ <artifact>@TUTORIAL-PUBLISHER-IMPL-SPEC@</artifact>
+ </classpath>
+ </classloader>
+
+ <include name="location"
artifact="block:dpml/tutorial/dpml-tutorial-location-impl"/>
+
+ <include name="publisher"
artifact="block:dpml/tutorial/dpml-tutorial-publisher-impl"/>
+
+ <component name="application" class="tutorial.application.Application"/>
+
+</container>
+]]></source>
+ <p>
+ If we look at the location block (as an example) we will see a
corresponding
+ service declaration. This declaration includes a source reference
that is
+ a relative component path that tells Metro to use the
sub-component named
+ "location" as the component that will fulfil the service published
by this
+ block.
+ </p>
+ <source><![CDATA[
+<container name="locator">
+
+ <services>
+ <service type="tutorial.location.LocationService">
+ <source>info</source>
+ </service>
+ </services>
+
+ <classloader>
+ <classpath>
+ <artifact>@LOGGING-API-SPEC@</artifact>
+ <artifact>@ACTIVITY-API-SPEC@</artifact>
+ <artifact>@CONFIGURATION-API-SPEC@</artifact>
+ <artifact>@TUTORIAL-LOCATION-API-SPEC@</artifact>
+ <artifact>@TUTORIAL-LOCATION-IMPL-SPEC@</artifact>
+ </classpath>
+ </classloader>
+
+ <component name="info" class="tutorial.location.LocationComponent"
profile="locator"/>
+
+</container>
+]]></source>
+
+ </subsection>
+ <subsection name="Execution">
+ <p>
+ To run build and run the example please use the following commands:
+ </p>
+ <source><![CDATA[
+$ cd composition
+$ ant
+$ metro metro -execute application\impl\target\deliverables\blocks\*.block
+]]></source>
+ <p>
+ The log output demonstrates the deployment by Metro of the blocks
+ in the correct order (based on dependency resolution) and the
+ execution of the test application.
+ </p>
+ <source><![CDATA[
+[INFO ] (application.publisher.publisher): created
+[INFO ] (application.location.info): location: Paris
+[INFO ] (application.application): servicing application
+[INFO ] (application.location.info): location: Paris
+[INFO ] (application.publisher.publisher): created
+[INFO ] (application.publisher.publisher):
+******************
+* Paris
+******************
+[INFO ] (application.application): done
+]]></source>
+ </subsection>
+ <subsection name="Note">
+ <p>
+ The primary benefit of using block level services and dependencies
+ is isolation of a block implementation from the public services it
+ provides.
+ </p>
+ </subsection>
+ </section>
+ </body>
+
+</document>
+
Added:
development/main/central/site/src/docs/guide/development/composition/navigation.xml
==============================================================================
--- (empty file)
+++
development/main/central/site/src/docs/guide/development/composition/navigation.xml
Tue Jan 4 08:51:30 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright 2004 Apache Software Foundation
+ Licensed 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.dpml.net/central/about/legal/
+
+ 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.
+-->
+
+<project>
+ <title>Metro</title>
+
+ <body>
+ <menu>
+ </menu>
+ </body>
+
+</project>
Modified:
development/main/central/site/src/docs/guide/development/navigation.xml
==============================================================================
--- development/main/central/site/src/docs/guide/development/navigation.xml
(original)
+++ development/main/central/site/src/docs/guide/development/navigation.xml
Tue Jan 4 08:51:30 2005
@@ -27,6 +27,8 @@
<item name="Services" href="services.html"/>
<item name="Dependencies" href="dependencies/index.html"/>
<item name="Profiles" href="profiles/index.html"/>
+ <item name="Composition" href="composition/index.html"/>
+ <item name="Testing" href="testing/index.html"/>
</menu>
</body>
Modified:
development/main/central/site/src/docs/guide/development/profiles/selection.xml
==============================================================================
---
development/main/central/site/src/docs/guide/development/profiles/selection.xml
(original)
+++
development/main/central/site/src/docs/guide/development/profiles/selection.xml
Tue Jan 4 08:51:30 2005
@@ -98,7 +98,7 @@
<subsection name="Next Topic">
<p>
We are now ready to move on to the subject of component
- <a href="../../deployment/composite.html">composition</a>.
+ <a href="../composition/index.html">composition</a>.
</p>
</subsection>
Added:
development/main/central/site/src/docs/guide/development/testing/example.xml
==============================================================================
--- (empty file)
+++
development/main/central/site/src/docs/guide/development/testing/example.xml
Tue Jan 4 08:51:30 2005
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Apache Software Foundation
+ Licensed 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.dpml.net/central/about/legal/
+
+ 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.
+-->
+
+<document>
+ <properties>
+ <author email="mcconnell AT dpml.net">Stephen McConnell</author>
+ <title>DPML Guide</title>
+ </properties>
+
+ <body>
+ <section name="Advanced Features">
+ <subsection name="Unit Test Example">
+ <p>
+ The section presents a complete example of the unit test
+ included in the hello tutorial.
+ </p>
+ <p><i>block.xml<br/>
+ Definition of a container holding a single component.
+ </i></p>
+<source><![CDATA[
+<container name="tutorial">
+ <component name="hello" class="tutorial.HelloComponent"/>
+</container>
+]]></source>
+ <p>
+ The test case implementation.
+ </p>
+<source><![CDATA[
+package tutorial;
+
+import net.dpml.metro.unit.MetroTestCase;
+
+/**
+ * Hello Test Case.
+ *
+ * @author mcconnell AT apache.org
+ */
+public class StandardTestCase extends MetroTestCase
+{
+
+ //--------------------------------------------------------
+ // constructors
+ //--------------------------------------------------------
+
+ /**
+ * @param name the name of the test case
+ * @param root the merlin system install directory
+ */
+ public StandardTestCase( String name )
+ {
+ super( name );
+ }
+
+ //--------------------------------------------------------
+ // testcase
+ //--------------------------------------------------------
+
+ public void testServiceResolution() throws Exception
+ {
+ Object hello = resolve( "hello" );
+ assertTrue( hello != null );
+ }
+}
+]]></source>
+ </subsection>
+ </section>
+ </body>
+
+</document>
+
+
Added:
development/main/central/site/src/docs/guide/development/testing/index.xml
==============================================================================
--- (empty file)
+++
development/main/central/site/src/docs/guide/development/testing/index.xml
Tue Jan 4 08:51:30 2005
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Apache Software Foundation
+ Licensed 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.dpml.net/central/about/legal/
+
+ 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.
+-->
+
+<document>
+ <properties>
+ <author email="mcconnell AT dpml.net">Stephen McConnell</author>
+ <title>DPML Guide</title>
+ </properties>
+
+ <body>
+ <section name="Component Testing">
+
+ <p>WARNING - DPML-METRO-UNIT IS UNDER CONSTRUCTION</p>
+
+ </section>
+ </body>
+
+</document>
+
+
+
+
Added:
development/main/central/site/src/docs/guide/development/testing/integration.xml
==============================================================================
--- (empty file)
+++
development/main/central/site/src/docs/guide/development/testing/integration.xml
Tue Jan 4 08:51:30 2005
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Apache Software Foundation
+ Licensed 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.dpml.net/central/about/legal/
+
+ 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.
+-->
+
+<document>
+ <properties>
+ <author email="mcconnell AT dpml.net">Stephen McConnell</author>
+ <title>DPML Guide</title>
+ </properties>
+
+ <body>
+ <section name="Integration Testing">
+
+ <p>
+ The Metro platform provides an abstract test case class that you
+ can use as a component factory. To create a Metro based unit
+ test you simply extend MetroTestCase.
+ </p>
+
+ <p>
+ The following code fragment declares a new test case using the
+ abstract Metro test case.
+ </p>
+ <source>
+import net.dpml.metro.unit.MetroTestCase;
+
+public class ExampleTestCase extends MetroTestCase
+{
+ public ExampleTestCase( String name )
+ {
+ super( name );
+ }
+
+ // ...
+}
+ </source>
+ <p>
+ You can now access components established by Metro via
+ the component path. For example, if your block.xml defines
+ a component named "hello" in a container named "test" you
+ access the component by requesting the path "/test/hello".
+ </p>
+ <p>
+ The following code fragment demonstrates the usage of the
+ resolve method to locate a named component.
+ </p>
+<source><![CDATA[
+public void testServiceResolution() throws Exception
+{
+ Hello hello = (Hello) super.resolve( "/test/hello" );
+ assertNotHull( "hello", hello );
+}
+]]></source>
+
+ <p>
+ You can customize all of the deployment and runtime parameters
+ of the embedded metro instance by adding a "dpml.properties"
+ file to your basedir.
+ </p>
+ </section>
+ </body>
+
+</document>
+
+
+
+
Added:
development/main/central/site/src/docs/guide/development/testing/navigation.xml
==============================================================================
--- (empty file)
+++
development/main/central/site/src/docs/guide/development/testing/navigation.xml
Tue Jan 4 08:51:30 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Copyright 2004 Apache Software Foundation
+ Licensed 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.dpml.net/central/about/legal/
+
+ 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.
+-->
+
+<project>
+ <title>DPML Guide</title>
+
+ <body>
+ <menu>
+ <item name="Integration Testing" href="integration.html"/>
+ <item name="Hello Example" href="example.html"/>
+ </menu>
+ </body>
+
+</project>
Modified: development/main/central/site/src/docs/guide/navigation.xml
==============================================================================
--- development/main/central/site/src/docs/guide/navigation.xml (original)
+++ development/main/central/site/src/docs/guide/navigation.xml Tue Jan 4
08:51:30 2005
@@ -27,9 +27,8 @@
<menu>
<item name="Installation" href="setup/index.html"/>
<item name="Quick Start" href="quick/index.html"/>
- <item name="Development" href="development/index.html"/>
- <item name="Deployment" href="deployment/index.html"/>
- <item name="Testing" href="testing/index.html"/>
+ <item name="Developing with Metro" href="development/index.html"/>
+ <item name="Using Transit" href="deployment/index.html"/>
</menu>
</body>
- svn commit: r1376 - in development/main/central/site/src/docs/guide: . deployment development development/composition development/profiles development/testing testing, mcconnell, 01/04/2005
Archive powered by MHonArc 2.6.24.