hammant 01/03/15 15:51:02
Modified: src/xdocs demo-helloworld.xml
Log:
further explanation for HelloWorld.
Revision Changes Path
1.3 +31 -2 jakarta-avalon-cornerstone/src/xdocs/demo-helloworld.xml
Index: demo-helloworld.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-cornerstone/src/xdocs/demo-helloworld.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- demo-helloworld.xml 2001/03/11 17:02:21 1.2
+++ demo-helloworld.xml 2001/03/15 23:51:01 1.3
@@ -33,6 +33,26 @@
</ol>
</s1>
<s1 title="Java Source">
+ <s2 title="HelloWorldHandler.java">
+ <p>
+ Instantiated and dispatched by the impl once per socket request that
comes in.
+ </p>
+ </s2>
+ <s2 title="HelloWorldServer.java">
+ <p>
+ The interface that's the contract for the Server block. As it happens
HelloWorld is not that resusable. If it were "ObjectDataBase.java" many server apps
could use it through this interface. The interface could set more useful things that
the greeting ("Hello", "Bonjour" etc.)
+ </p>
+ </s2>
+ <s2 title="HelloWorldServerImpl.java">
+ <p>
+ This like all impls implements an interface. Which interface is rather
obvious in this case. It's a standard pattern that uses other blocks (SocketManager
and ConnectionManager) to do the hard work of listening on a port, pooling threads and
connections and organizing socket invokations in a queue and multi app friendly way.
+ </p>
+ </s2>
+ <s2 title="HelloWorldServerImpl.xinfo">
+ <p>
+ This is obviously associated with the impl. It expresses that impls
needs in respect of other blocks in a way that Avalon can readily use for rapid
deployment.
+ </p>
+ </s2>
</s1>
<s1 title="helloworld-demo.mf">
<p>
@@ -50,8 +70,8 @@
<p>
The file is renamed as part of the build process to assembly.xml, and only
has a separate name here to aid development. The bulk of the contents of the file
pertain to other blocks including ones that HelloWorld is dependant upon. Here's the
section that's for HelloWorld
</p>
-
<source>
+(text snipped)
<block
class="org.apache.cornerstone.demos.helloworldserver.HelloWorldServerImpl"
name="helloworldserver" >
<provide name="sockets2"
role="org.apache.cornerstone.services.sockets.SocketManager"/>
@@ -66,6 +86,7 @@
</helloworldhandler>
</configuration>
</block>
+(text snipped)
</source>
<p>
Of the clock element, listed attributes are the instatiatable class
implementing the HelloWorld interface (not mentioned itsef in this assembly xml), the
display name of the block, and two services that HelloWorld needs.
@@ -77,11 +98,19 @@
If you had configuration for an app, you;d specify it here in with eelement
and attribute names that are invented for the application.
</p>
</s1>
+ <s1 title="Starting your own server project">
+ <p>
+ Familiarity with Ant and it's build script would be a good place to start.
After learning how Cornerstone compiles and jars the demos would be a good second
step. Thirdly, as I've done before, take the demos out of Cornerstone, delete classes
and xml not relating to the HelloWorld server and rename from HelloWorld to whatever
suits you. I import into the lib dir avalon-cornerstone-compilation-0.x.jar to allow
things that use it to compile. I also import cornerstone-0.x.bar to the same place to
allow it's inclusion in the sar file being made. The build xml file even contains a
target that allow you to install the freshly made sar file into a nearby Avalon
installation - "build install", though for development you'll initially only be
running "build" and "build clean".
+ </p>
+ <p>
+ As a secondary process, it would be handy to learn xdocs (the technology
that allows the creation of these book pages). You're copying cornerstone to be
(after some selective trimming) the foundation stone for new server app, so you might
as well take adavantage of all it's templates.. "build xdocs" and look in build/docs.
All the Apache java based projects do this and then copy that to the website. The
project I'm involved with <link href="http://www.jesktop.org">Jesktop</link> does too.
+ </p>
+ </s1>
</body>
<footer>
<legal>
Copyright (c) @year@ The Jakarta Apache Project All rights reserved.
- $Revision: 1.2 $ $Date: 2001/03/11 17:02:21 $
+ $Revision: 1.3 $ $Date: 2001/03/15 23:51:01 $
</legal>
</footer>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]