- Revision
- 702
- Author
- mauro
- Date
- 2008-06-13 10:39:19 -0500 (Fri, 13 Jun 2008)
Log Message
Updated docs following refactors.
Modified Paths
- trunk/waffle-distribution/pom.xml
- trunk/waffle-distribution/src/site/content/binding.html
- trunk/waffle-distribution/src/site/content/download.html
- trunk/waffle-distribution/src/site/content/pluggability.html
- trunk/waffle-distribution/src/site/content/ruby-controllers.html
- trunk/waffle-distribution/src/site/content/sitemap.xml
Diff
Modified: trunk/waffle-distribution/pom.xml (701 => 702)
--- trunk/waffle-distribution/pom.xml 2008-06-13 15:24:55 UTC (rev 701) +++ trunk/waffle-distribution/pom.xml 2008-06-13 15:39:19 UTC (rev 702) @@ -17,6 +17,11 @@ </dependency> <dependency> <groupId>${pom.groupId}</groupId> + <artifactId>waffle-ruby</artifactId> + <version>${pom.version}</version> + </dependency> + <dependency> + <groupId>${pom.groupId}</groupId> <artifactId>waffle-mock</artifactId> <version>${pom.version}</version> </dependency> @@ -72,6 +77,26 @@ </configuration> </execution> <execution> + <id>unpack-javadoc-ruby</id> + <phase>install</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <outputDirectory>${project.build.directory}/site/javadoc/ruby</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <artifactItems> + <artifactItem> + <groupId>${pom.groupId}</groupId> + <artifactId>waffle-ruby</artifactId> + <version>${pom.version}</version> + <classifier>javadoc</classifier> + </artifactItem> + </artifactItems> + </configuration> + </execution> + <execution> <id>unpack-javadoc-mock</id> <phase>install</phase> <goals>
Modified: trunk/waffle-distribution/src/site/content/binding.html (701 => 702)
--- trunk/waffle-distribution/src/site/content/binding.html 2008-06-13 15:24:55 UTC (rev 701) +++ trunk/waffle-distribution/src/site/content/binding.html 2008-06-13 15:39:19 UTC (rev 702) @@ -10,7 +10,7 @@ <h3>Default Ognl-base binding</h3> <p> - By default all binding of fields to <b>Controllers</b> is handled by Ognl. Waffle's <i>OgnlDataBinder</i> + By default all binding of fields to <b>Controllers</b> is handled by Ognl. Waffle's <i>OgnlControllerDataBinder</i> allows for the injection of a <i>ValueConverterFinder</i>, which by default is only configured to use <i>OgnlValueConverter</i>, but can be customized to use any number of Waffle <code>ValueConverter</code>s. The <i>OgnlValueConverter</i> allows fields of standard types (e.g. String, Number, primitives) to be
Modified: trunk/waffle-distribution/src/site/content/download.html (701 => 702)
--- trunk/waffle-distribution/src/site/content/download.html 2008-06-13 15:24:55 UTC (rev 701) +++ trunk/waffle-distribution/src/site/content/download.html 2008-06-13 15:39:19 UTC (rev 702) @@ -25,10 +25,10 @@ Be sure to choose the snapshot with the latest version and the filename with the latest timestamp. </p> -<h2 id="maven">Using Maven 2 Artifacts</h2> +<h2 id="maven">Using Maven Artifacts</h2> <p> - If you use Maven 2 as the build system (or one that is compatible with the Maven 2 Repository), + If you use Maven as the build system (or one that is compatible with the Maven Repository), you can declare Waffle dependencies as <textarea class="xml:nogutter:nocontrols" name="code"> <dependency> @@ -37,9 +37,10 @@ <version>[version]</version> </dependency> </textarea> - specifying the desired module and version. Currently, Waffle comprises of four Java modules: + specifying the desired module and version. Currently, Waffle comprises of five Java modules: <ul> <li><a href="" + <li><a href="" <li><a href="" <li><a href="" <li><a href=""
Modified: trunk/waffle-distribution/src/site/content/pluggability.html (701 => 702)
--- trunk/waffle-distribution/src/site/content/pluggability.html 2008-06-13 15:24:55 UTC (rev 701) +++ trunk/waffle-distribution/src/site/content/pluggability.html 2008-06-13 15:39:19 UTC (rev 702) @@ -2,156 +2,144 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>Pluggability</title> +<title>Pluggability</title> </head> <body> <h2>Pluggability</h2> -<p> - Waffle was designed to provide default functionality that should - be suitable for most any application. However in order to provide - complete flexibility Waffle allows its foundational components to be - over-written with custom implementations. As an example Waffle uses Ognl - for data binding properties from a users request to the actions. It is - easy to plug-in your own <b>org.codehaus.waffle.bind.DataBinder</b> by - adding the following to the applications <b>web.xml</b>: -</p> +<p>Waffle was designed to provide default functionality that should be suitable for most any application. However in +order to provide complete flexibility Waffle allows its foundational components to be over-written with custom +implementations. As an example Waffle uses Ognl for data binding properties from a users request to the actions. It is +easy to plug-in your own <b>org.codehaus.waffle.bind.ControllerDataBinder</b> by adding the following to the +applications <b>web.xml</b>:</p> <textarea class="xml:nogutter:nocontrols" name="code"> <context-param> - <param-name>org.codehaus.waffle.bind.DataBinder</param-name> - <param-value>com.mycompany.MyDataBinder</param-value> + <param-name>org.codehaus.waffle.bind.ControllerDataBinder</param-name> + <param-value>com.mycompany.MyControllerDataBinder</param-value> </context-param> </textarea> -<p> - The <b>param-name</b> defines the interface of the component to - be over-written and the <b>param-value</b> represents the implementing - class. The following table lists the components that can - currently be customized in Waffle (excluding <a href="" - </p> - <table class="bodyTable"> - <tbody> - <tr class="a"> - <td align="left"><b>Interface</b></td><td align="left"><b>Default Implementation</b></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.action.ActionMethodExecutor</a></td> - <td align="left"><a href="" - org.codehaus.waffle.action.InterceptingActionMethodExecutor</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.action.ActionMethodResponseHandler</a></td> - <td align="left"><a href="" - org.codehaus.waffle.action.DefaultActionMethodResponseHandler</a></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.action.ArgumentResolver</a></td> - <td align="left"><a href="" - org.codehaus.waffle.action.HierarchicalArgumentResolver</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.action.MethodDefinitionFinder</a></td> - <td align="left"><a href="" - org.codehaus.waffle.action.AnnotatedMethodDefinitionFinder</a></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.action.MethodNameResolver</a></td> - <td align="left"><a href="" - org.codehaus.waffle.action.RequestParameterMethodNameResolver</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.bind.BindErrorMessageResolver</a></td> - <td align="left"><a href="" - org.codehaus.waffle.bind.ognl.OgnlBindErrorMessageResolver</a></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.bind.DataBinder</a></td> - <td align="left"><a href="" - org.codehaus.waffle.bind.ognl.OgnlDataBinder</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.bind.RequestAttributeBinder</a></td> - <td align="left"><a href="" - org.codehaus.waffle.bind.IntrospectingRequestAttributeBinder</a></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.bind.ValueConverterFinder</a></td> - <td align="left"><a href="" - org.codehaus.waffle.bind.ognl.OgnlValueConverterFinder</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.context.ContextContainerFactory</a></td> - <td align="left"><a href="" - org.codehaus.waffle.context.PicoContextContainerFactory</a></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.controller.ControllerDefinitionFactory</a></td> - <td align="left"><a href="" - org.codehaus.waffle.controller.ContextControllerDefinitionFactory</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.controller.ControllerNameResolver</a></td> - <td align="left"><a href="" - org.codehaus.waffle.controller.ContextPathControllerNameResolver</a></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.i18n.MessageResources</a></td> - <td align="left"><a href="" - org.codehaus.waffle.i18n.DefaultMessageResources</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.validation.Validator</a></td> - <td align="left"><a href="" - org.codehaus.waffle.validation.DefaultValidator</a></td> - </tr> - <tr class="b"> - <td align="left"><a href="" - org.codehaus.waffle.view.ViewDispatcher</a></td> - <td align="left"><a href="" - org.codehaus.waffle.view.DefaultViewDispatcher</a></td> - </tr> - <tr class="a"> - <td align="left"><a href="" - org.codehaus.waffle.view.ViewResolver</a></td> - <td align="left"><a href="" - org.codehaus.waffle.view.DefaultViewResolver</a></td> - </tr> - </tbody> - </table> - -<p> - Most application will never need to deal with any of these - components. But it is nice to know that you can change any of the - default behaviour if you so desire. -</p> +<p>The <b>param-name</b> defines the interface of the component to be over-written and the <b>param-value</b> +represents the implementing class. The following table lists the components that can currently be customized in Waffle +(excluding <a href="" +<table class="bodyTable"> + <tbody> + <tr class="a"> + <td align="left"><b>Interface</b></td> + <td align="left"><b>Default Implementation</b></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.action.ActionMethodExecutor</a></td> + <td align="left"><a href="" + org.codehaus.waffle.action.InterceptingActionMethodExecutor</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.action.ActionMethodResponseHandler</a></td> + <td align="left"><a href="" + org.codehaus.waffle.action.DefaultActionMethodResponseHandler</a></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.action.ArgumentResolver</a></td> + <td align="left"><a href="" + org.codehaus.waffle.action.HierarchicalArgumentResolver</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.action.MethodDefinitionFinder</a></td> + <td align="left"><a href="" + org.codehaus.waffle.action.AnnotatedMethodDefinitionFinder</a></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.action.MethodNameResolver</a></td> + <td align="left"><a href="" + org.codehaus.waffle.action.RequestParameterMethodNameResolver</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.bind.BindErrorMessageResolver</a></td> + <td align="left"><a href="" + org.codehaus.waffle.bind.ognl.OgnlBindErrorMessageResolver</a></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.bind.ControllerDataBinder</a></td> + <td align="left"><a href="" + org.codehaus.waffle.bind.ognl.OgnlControllerDataBinder</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.bind.ViewDataBinder</a></td> + <td align="left"><a href="" + org.codehaus.waffle.bind.IntrospectingViewDataBinder</a></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.bind.ValueConverterFinder</a></td> + <td align="left"><a href="" + org.codehaus.waffle.bind.ognl.OgnlValueConverterFinder</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.context.ContextContainerFactory</a></td> + <td align="left"><a href="" + org.codehaus.waffle.context.PicoContextContainerFactory</a></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.controller.ControllerDefinitionFactory</a></td> + <td align="left"><a + href="" + org.codehaus.waffle.controller.ContextControllerDefinitionFactory</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.controller.ControllerNameResolver</a></td> + <td align="left"><a href="" + org.codehaus.waffle.controller.ContextPathControllerNameResolver</a></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.i18n.MessageResources</a></td> + <td align="left"><a href="" + org.codehaus.waffle.i18n.DefaultMessageResources</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.validation.Validator</a></td> + <td align="left"><a href="" + org.codehaus.waffle.validation.DefaultValidator</a></td> + </tr> + <tr class="b"> + <td align="left"><a href="" + org.codehaus.waffle.view.ViewDispatcher</a></td> + <td align="left"><a href="" + org.codehaus.waffle.view.DefaultViewDispatcher</a></td> + </tr> + <tr class="a"> + <td align="left"><a href="" + org.codehaus.waffle.view.ViewResolver</a></td> + <td align="left"><a href="" + org.codehaus.waffle.view.DefaultViewResolver</a></td> + </tr> + </tbody> +</table> +<p>Most application will never need to deal with any of these components. But it is nice to know that you can change +any of the default behaviour if you so desire.</p> + <h2>Other components</h2> -<p> - Waffle also allows you to plug-in your own custom components - which don't need to extend or implement any Waffle components. This is - easy to do by adding <b>context-param</b>'s to your <b>web.xml</b> file. - Notice the <b>register:</b> prefix in the <i>param-name</i> node below. - When Waffle runs across such <i>context-param</i> it will register it - for use in your application. You can also use the prefix <b>registerNonCaching:</b> - for those components that should be instantiated new each time. -</p> +<p>Waffle also allows you to plug-in your own custom components which don't need to extend or implement any Waffle +components. This is easy to do by adding <b>context-param</b>'s to your <b>web.xml</b> file. Notice the <b>register:</b> +prefix in the <i>param-name</i> node below. When Waffle runs across such <i>context-param</i> it will register it for +use in your application. You can also use the prefix <b>registerNonCaching:</b> for those components that should be +instantiated new each time.</p> <textarea class="xml:nogutter:nocontrols" name="code"> <context-param> @@ -160,17 +148,12 @@ </context-param> </textarea> -<p> - For a more concrete example Waffle defines the interface <i> - <a href="" - org.codehaus.waffle.bind.ValueConverter</a></i>. - Implementations of this interface allows you to write custom conversions - for a specific class type. The following is an example of how you can - register your converters with Waffle. Waffle's <i>DefaultValueConverterFinder</i> - is dependent on all <i>org.codehaus.waffle.bind.ValueConverter</i> - that are registered in the <b>web.xml</b>. So the following example will - provide 2 custom converters for use in your application. -</p> +<p>For a more concrete example Waffle defines the interface <i> <a + href="" org.codehaus.waffle.bind.ValueConverter</a></i>. +Implementations of this interface allows you to write custom conversions for a specific class type. The following is an +example of how you can register your converters with Waffle. Waffle's <i>DefaultValueConverterFinder</i> is dependent on +all <i>org.codehaus.waffle.bind.ValueConverter</i> that are registered in the <b>web.xml</b>. So the following example +will provide 2 custom converters for use in your application.</p> <textarea class="xml:nogutter:nocontrols" name="code"> <context-param> @@ -186,11 +169,8 @@ <dl> <dt>Note:</dt> - <dd> - Everything registered with Waffle must be registered under a - unique name. The interface name should be used when over-writing - default or providing unique behaviour. - </dd> + <dd>Everything registered with Waffle must be registered under a unique name. The interface name should be used + when over-writing default or providing unique behaviour.</dd> </dl> </body>
Modified: trunk/waffle-distribution/src/site/content/ruby-controllers.html (701 => 702)
--- trunk/waffle-distribution/src/site/content/ruby-controllers.html 2008-06-13 15:24:55 UTC (rev 701) +++ trunk/waffle-distribution/src/site/content/ruby-controllers.html 2008-06-13 15:39:19 UTC (rev 702) @@ -1,75 +1,76 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html><head> -<title>Ruby Controllers</title></head> +<html> +<head> +<title>Ruby Controllers</title> +</head> <body> - <h2>Utilizing Ruby in a Waffle web application</h2> -Waffle now provides built in support for JRuby. -This will allow you to easily write your Controllers in Ruby. The -integration is simple and straightforward, taking advantage of -functionality Waffle provides (without being a Rails clone). -<br /><br /> -A key feature of Waffle has always been its pluggable architecture. From -the beginning we believed that the default behavior defined by the -Waffle team might not be suitable for every situation. Therefor Waffle -was built following an Interface driven approach. Practically all of -Waffle's built-in functionality can easily be extended or replaced. -This design made integrating JRuby support quite easy. The next 3 steps -give a brief overview of how to integrate JRuby support into your -Waffle based applications. -<br /><br /> -<span style="font-weight: bold;">Step 1</span> - configure Waffle to be "Ruby Aware" -<br /><br /> -Waffle avoids XML like the plague but we still need to have a web.xml for our -applications. This web.xml is where we can take advantage of Waffle's -pluggability. The following three context-param nodes need to be added -to your applications web.xml. This alerts Waffle that a few of its -foundational components should be replaced with alternate -implementations. +<h2>Utilizing Ruby in a Waffle web application</h2> +Waffle now provides built in support for Ruby. This will allow you to easily write your Controllers in Ruby. The +integration is simple and straightforward, taking advantage of functionality Waffle provides (without being a Rails +clone). +<br /> +<br /> +A key feature of Waffle has always been its pluggable architecture. From the beginning we believed that the default +behavior defined by the Waffle team might not be suitable for every situation. Therefor Waffle was built following an +Interface driven approach. Practically all of Waffle's built-in functionality can easily be extended or replaced. This +design made integrating Ruby support quite easy. The next 3 steps give a brief overview of how to integrate Ruby +support into your Waffle based applications. +<br /> +<br /> +<span style="font-weight: bold;">Step 0</span> +- Ensure dependency on waffle-ruby module +<br /> +<span style="font-weight: bold;">Step 1</span> +- configure Waffle to be "Script Aware" +<br /> +<br /> +Waffle avoids XML like the plague but we still need to have a web.xml for our applications. This web.xml is where we can +take advantage of Waffle's pluggability. The following three context-param nodes need to be added to your applications +web.xml. This alerts Waffle that a few of its foundational components should be replaced with alternate implementations. <textarea class="xml:nogutter:nocontrols" name="code"><context-param> <param-name>org.codehaus.waffle.context.ContextContainerFactory</param-name> - <param-value>org.codehaus.waffle.context.pico.RubyAwarePicoContextContainerFactory</param-value> + <param-value>org.codehaus.waffle.context.pico.RubyPicoContextContainerFactory</param-value> </context-param> <context-param> - <param-name>org.codehaus.waffle.bind.DataBinder</param-name> - <param-value>org.codehaus.waffle.bind.RubyDataBinder</param-value> + <param-name>org.codehaus.waffle.bind.ControllerControllerDataBinder</param-name> + <param-value>org.codehaus.waffle.bind.RubyControllerControllerDataBinder</param-value> </context-param> <context-param> <param-name>org.codehaus.waffle.controller.ControllerDefinitionFactory</param-name> <param-value>org.codehaus.waffle.controller.RubyControllerDefinitionFactory</param-value> </context-param></textarea> -<span style="font-weight: bold;">Step -2</span> - Your application's Registrar should extended -AbstractRubyAwareRegistrar. <br /><br /> -This exposes a new registration method to -use within your Registrar ... registerRubyScript(String key, String -className). See the example below: +<span style="font-weight: bold;">Step 2</span> +- Your application's Registrar should extended <a href="" +<br /> +<br /> +This exposes a new registration method to use within your Registrar ... registerScript(String key, String +className). See the example below: -<textarea class="java:nogutter:nocontrols" name="code">public class MyRegistrar extends AbstractRubyAwareRegistrar { +<textarea class="java:nogutter:nocontrols" name="code">public class MyRegistrar extends AbstractScriptedRegistrar { public MyRegistrar(Registrar delegate) { super(delegate); } @Override public void application() { - registerRubyScript("foobar", "FooBar"); + registerScript("foobar", "FooBar"); } ... -}</textarea>In -this example the Ruby class named 'FooBar' will be exposed as a -Controller under the name 'foobar' (e.g. -http://localhost:8080/jruby/foobar.waffle). -<br /><br /> -<span style="font-weight: bold;">Step 3</span> - Write -your Ruby Controller class. Notice in the following example that your -class does not need to extend or include anything. +}</textarea> +In this example the Ruby class named 'FooBar' will be exposed as a Controller under the name 'foobar' (e.g. +http://localhost:8080/ruby/foobar.waffle). +<br /> +<br /> +<span style="font-weight: bold;">Step 3</span> +- Write your Ruby Controller class. Notice in the following example that your class does not need to extend or include +anything. <textarea class="ruby:nogutter:nocontrols" name="code">class FooBar def index # This is the default action "<h1>Hello World</h1>" end -end</textarea>And -that is all the steps required to integrate JRuby within your Waffle -Applications. +end</textarea> +And that is all the steps required to integrate Ruby within your Waffle Applications. <h3>Why are Ruby controllers desirable?</h3> TODO
Modified: trunk/waffle-distribution/src/site/content/sitemap.xml (701 => 702)
--- trunk/waffle-distribution/src/site/content/sitemap.xml 2008-06-13 15:24:55 UTC (rev 701) +++ trunk/waffle-distribution/src/site/content/sitemap.xml 2008-06-13 15:39:19 UTC (rev 702) @@ -71,6 +71,7 @@ <section> <name>JavaDoc</name> <link title="Core">javadoc/core/index.html</link> + <link title="Ruby">javadoc/ruby/index.html</link> <link title="Mock">javadoc/mock/index.html</link> <link title="Taglib">javadoc/taglib/index.html</link> </section>
To unsubscribe from this list please visit:
