You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "Brian K. Wallace" <br...@transmorphix.com> on 2005/02/05 06:32:30 UTC

Supplement to examples

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Per a question on the user list as to "what's different" with regard to
loading the Examples registry, I'd like to get your input on adding a
target to the examples build.xml as well as adding another class to the
examples:

Proposed addition to build.xml:

~    <target name="run-calculator-default"
~      description="Execute the Calculator example using default registry
creation.">
~    <copy file="src/descriptor/META-INF/examples.xml"
tofile="target/classes/META-INF/hivemodule.xml"/>
~    <java classname="org.apache.hivemind.examples.CalculatorMainDefault">
~      <classpath refid="runtime.classpath"/>
~      <arg line="28 4.75"/>
~    </java>
~    <delete dir="target/classes/META-INF"/>
~  </target>

Adding a copy of CalculatorMain as CalculatorMainDefault which changes
the registry creation line to:
~          Registry registry = RegistryBuilder.constructDefaultRegistry();


The current methodology is good in that, for the developer, it shows how
to load a registry from a non-standard filename and location. I believe
this addition would also help show how it's done with the descriptor
named 'hivemodule.xml' in the META-INF directory on the classpath (the
'default').

If this addition is alright, I'll create an issue and attach the patch.
[also going to post the summation of changes to the Wiki]

Brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFCBFpuaCoPKRow/gARAt9eAJ9Sr+p1Zk0JNMk3+IHWJKvCbdTzsACg+Ar2
TJ0WzD0SM+ul4LUMBjVvzA8=
=gQ4G
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Supplement to examples

Posted by "Brian K. Wallace" <br...@transmorphix.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

As my time is currently spent learning more of the details, I've moved
"making it easier for new users" to the top of my list. (after the 100%
devotion to work and reclamation of the rest of my life, of course) That
said, I've reorganized the examples and am currently integrating the
reorganization into the rest of the build (so it will still be possible
from the top level to 'push a button' and have everything built as it is
now). When I get this step done, I'll be posting the resulting structure
back for feedback/inclusion.


Howard Lewis Ship wrote:
| Breaking it into smaller pieces is another good idea.  It just a
| matter of prioritizing time!
|
|
| On Fri, 04 Feb 2005 23:32:30 -0600, Brian K. Wallace
| <br...@transmorphix.com> wrote:
|
| Per a question on the user list as to "what's different" with regard to
| loading the Examples registry, I'd like to get your input on adding a
| target to the examples build.xml as well as adding another class to the
| examples:
|
| Proposed addition to build.xml:
|
| ~    <target name="run-calculator-default"
| ~      description="Execute the Calculator example using default registry
| creation.">
| ~    <copy file="src/descriptor/META-INF/examples.xml"
| tofile="target/classes/META-INF/hivemodule.xml"/>
| ~    <java classname="org.apache.hivemind.examples.CalculatorMainDefault">
| ~      <classpath refid="runtime.classpath"/>
| ~      <arg line="28 4.75"/>
| ~    </java>
| ~    <delete dir="target/classes/META-INF"/>
| ~  </target>
|
| Adding a copy of CalculatorMain as CalculatorMainDefault which changes
| the registry creation line to:
| ~          Registry registry = RegistryBuilder.constructDefaultRegistry();
|
| The current methodology is good in that, for the developer, it shows how
| to load a registry from a non-standard filename and location. I believe
| this addition would also help show how it's done with the descriptor
| named 'hivemodule.xml' in the META-INF directory on the classpath (the
| 'default').
|
| If this addition is alright, I'll create an issue and attach the patch.
| [also going to post the summation of changes to the Wiki]
|
| Brian

- ---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFCC+ppaCoPKRow/gARAkwvAJ4+DEmDtmlZvxOd7YtHj0wjlroZZACdFHqn
2Zow86KOn/Fo6LvSEYnJ5Rc=
=O9mN
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Re: Supplement to examples

Posted by Howard Lewis Ship <hl...@gmail.com>.
Breaking it into smaller pieces is another good idea.  It just a
matter of prioritizing time!


On Fri, 04 Feb 2005 23:32:30 -0600, Brian K. Wallace
<br...@transmorphix.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Per a question on the user list as to "what's different" with regard to
> loading the Examples registry, I'd like to get your input on adding a
> target to the examples build.xml as well as adding another class to the
> examples:
> 
> Proposed addition to build.xml:
> 
> ~    <target name="run-calculator-default"
> ~      description="Execute the Calculator example using default registry
> creation.">
> ~    <copy file="src/descriptor/META-INF/examples.xml"
> tofile="target/classes/META-INF/hivemodule.xml"/>
> ~    <java classname="org.apache.hivemind.examples.CalculatorMainDefault">
> ~      <classpath refid="runtime.classpath"/>
> ~      <arg line="28 4.75"/>
> ~    </java>
> ~    <delete dir="target/classes/META-INF"/>
> ~  </target>
> 
> Adding a copy of CalculatorMain as CalculatorMainDefault which changes
> the registry creation line to:
> ~          Registry registry = RegistryBuilder.constructDefaultRegistry();
> 
> The current methodology is good in that, for the developer, it shows how
> to load a registry from a non-standard filename and location. I believe
> this addition would also help show how it's done with the descriptor
> named 'hivemodule.xml' in the META-INF directory on the classpath (the
> 'default').
> 
> If this addition is alright, I'll create an issue and attach the patch.
> [also going to post the summation of changes to the Wiki]
> 
> Brian
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.5 (MingW32)
> 
> iD8DBQFCBFpuaCoPKRow/gARAt9eAJ9Sr+p1Zk0JNMk3+IHWJKvCbdTzsACg+Ar2
> TJ0WzD0SM+ul4LUMBjVvzA8=
> =gQ4G
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


Supplement to examples - REVISED

Posted by "Brian K. Wallace" <br...@transmorphix.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Actually... I think I'd like to supplement the examples a little more
than what I'm proposing in my original e-mail. I haven't even begun to
flesh out 'how', but would like input on creating individual example
dirs under the main examples tree.

I currently have an implementation of my previous e-mail that 'just
works' (test case and build.xml target are both responsible for copying
the descriptor so the test works command-line and in eclipse - just not
too fond of "eclipse specific" code... even if it's the only IDE I use),
but I'd rather split the examples out so it's easier to add new examples
without going through the ExampleUtils gyration except for an example
that shows how to utilize deployment descriptors in non-standard
locations or with non-standard names.

proposed new structure would be more along the lines of:
~  examples/
~    calculator/
~    logging/
~    startup/              <-- Panorama* would go here
~    descriptors/          <-- new - how to load descriptors
~    ...

Each of these subdirectories would be laid out with a complete tree,
build a deployable jar, and have tasks to run as the current examples have.

I believe this would make it easier to provide more examples in a
'standard' "build it and run it, or build it and deploy the jar" -
possibly adding a 'default' way (later on... just hopefully not too much
later) of "pick up, drop in, and see how it's completely self-contained".

Thoughts? [yes, in doing this I'd still want to make sure of individual
documentation, test coverage, and integration back into the site]

Brian

Brian K. Wallace wrote:
| Per a question on the user list as to "what's different" with regard to
| loading the Examples registry, I'd like to get your input on adding a
| target to the examples build.xml as well as adding another class to the
| examples:
|
| Proposed addition to build.xml:
|
| ~    <target name="run-calculator-default"
| ~      description="Execute the Calculator example using default registry
| creation.">
| ~    <copy file="src/descriptor/META-INF/examples.xml"
| tofile="target/classes/META-INF/hivemodule.xml"/>
| ~    <java classname="org.apache.hivemind.examples.CalculatorMainDefault">
| ~      <classpath refid="runtime.classpath"/>
| ~      <arg line="28 4.75"/>
| ~    </java>
| ~    <delete dir="target/classes/META-INF"/>
| ~  </target>
|
| Adding a copy of CalculatorMain as CalculatorMainDefault which changes
| the registry creation line to:
| ~          Registry registry = RegistryBuilder.constructDefaultRegistry();
|
|
| The current methodology is good in that, for the developer, it shows how
| to load a registry from a non-standard filename and location. I believe
| this addition would also help show how it's done with the descriptor
| named 'hivemodule.xml' in the META-INF directory on the classpath (the
| 'default').
|
| If this addition is alright, I'll create an issue and attach the patch.
| [also going to post the summation of changes to the Wiki]
|
| Brian

- ---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFCBPN6aCoPKRow/gARArq5AKDdT6wCgn/3uKl16G+ROIZm8gSGjgCg1xoS
v5pfHEiZn79BwldxiXaP6Rg=
=zg/T
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org