- Revision
- 177
- Author
- paul
- Date
- 2007-06-20 20:09:57 -0500 (Wed, 20 Jun 2007)
Log Message
more words
Modified Paths
Added Paths
Diff
Added: trunk/distribution/src/site/content/helloworld.html (0 => 177)
--- trunk/distribution/src/site/content/helloworld.html (rev 0) +++ trunk/distribution/src/site/content/helloworld.html 2007-06-21 01:09:57 UTC (rev 177) @@ -0,0 +1,49 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html> + <head> + <title>Hello World example</title> + <body class="composite"> + <div id="center" class="Content2Column"> <!-- Content3Column for index --> + <div id="content"> + + <div id="bodyColumn"> + <div id="contentBox"> + <div class="section"><h2>Example: Hello World</h2><p>Our first example is the obligatory <b>Hello World</b>. However it'll provide a good overview on how simple it is to create Waffle web applications. The process can be broken down into 3 simple steps:</p><ol type="1"><li>Create a Controller</li><li>Register that Controller with the Registrar</li><li>Create the View</li></ol><div class="section"><h3>Controller</h3><p>The Controller object which will be responsible for handling user requests. This class is simply a POJO and is <b>not</b> required to extend from any Waffle base classes. The Controller below below does NOT have any ActionMethods.</p><div class="source"><pre>public class HelloWorldController { + + public String getGreeting() { + return "Hello World!"; + } +}</pre></div></div><div class="section"><h3>Registrar</h3><p>All Controllers need to be registered with Waffle. This is done through the Registrar. Line <b>9</b> in the <i>MyRegistrar</i> class below registers the <i>HelloWorldAction</i> under the name <b>"helloworld"</b>. This Registrar will need to referenced in the <a href="" class="source"><pre>public class MyRegistrar extends AbstractRegistrar { + + public MyRegistrar(Registrar delegate) { + super(delegate); + } + + public void application() { + register("helloworld", HelloWorldAction.class); + } +}</pre></div></div><div class="section"><h3>View (helloworld.jspx)</h3><p>A View in Waffle is no different than what you would expect from any Java based web framework. Waffle exposes the underlying Controller for use in your View under the key <b>controller</b>. Notice line 12 <b>${controller.greeting}</b>, this is calling the <i>greeting</i> property exposed in the <i>HelloWorldController</i>.</p><p>The example below uses <b>jspx</b> but <a href="" and <a href="" </a> are also supported.</p><div class="source"><pre><?xml version="1.0" encoding="UTF-8"?> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:jsp="http://java.sun.com/JSP/Page"> + +<jsp:output doctype-root-element="html" + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" + doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> +<jsp:directive.page contentType="text/html;charset=UTF-8"/> + +<head><title>Hello World Controller</title></head> +<body> +<h1>${controller.greeting}</h1> +</body> +</html></pre></div><div class="section"><h4>Running...</h4><img src="" /></div></div></div> + </div> + </div> + + + + </div> + </div> + + </body> + +</html>
Modified: trunk/distribution/src/site/content/index.html (176 => 177)
--- trunk/distribution/src/site/content/index.html 2007-06-20 22:30:55 UTC (rev 176) +++ trunk/distribution/src/site/content/index.html 2007-06-21 01:09:57 UTC (rev 177) @@ -10,11 +10,45 @@ <div id="contentBox"> <div class="section"><h2>Waffle Web Framework</h2> -<p>Waffle is a Java web framework that makes the process of developing Java based web applications easier. It was built to support enterprise level web-based business applications.</p> +<p>Waffle is a Java web framework that makes the process of developing Java based web applications easier. It was built to support enterprise level web-based business applications, but with the least possible number of source lines to achieve that. </p> -<p>Waffle is different than the multitude of web frameworks that exist today.</p><ul><li>it does <b>NOT</b> have any proprietary XML configuration files</li><li>it does <b>NOT</b> have a steep learning curve</li><li>it does <b>NOT</b> have a proprietary UI templating language</li><li>easily maps an http request directly to any Java classes method</li></ul> +<p>Waffle is different than the multitude of web frameworks that exist today. Waffle :</p><ul> + <li>does <b>NOT</b> have any mandatory XML configuration files beyond a minimalist web.xml for the webapp </li> + <li>does <b>NOT</b> have a steep learning curve </li> + <li>does <b>NOT</b> have a proprietary UI templating language</li> + <li>does <strong>NOT</strong> force you to extend or implment base classes or interfaces </li> + <li>does <strong>NOT</strong> have a cumbersome series of setXXX() methods and an execute for controllers </li> + </ul> -<p>Application built upon Waffle only need to be aware of three things:</p><ol type="1"><li><b>Controllers</b> - an controller in Waffle does <b>not</b> need to extend or implement any specific class or interface because <b>a controller is simply a plain old Java object (Pojo)</b>.</li><li><b>ActionMethod</b> - in Waffle <b>an ActionMethod is simply a method defined in your Controller class</b>. Any method can be used regardless of its signature or return type. Waffle will react differently depending on what is returned from the ActionMethod so take a look at this section for further details.</li><li><b>Registrar</b> - the Registrar is where you go to register the <i>Controllers</i>, and other common components, your application is dependent on. Typically most web frameworks require your applications to create special XML file(s) for this, but <b>with Waffle you'll spend less time playing with XML and more time building business value.</b></li></ol><div class="section"><h3>Getting started</h3><p>The best way to get started is to look at the examples</p><ul><li><a href="" Hello World</a></li><li><a href="" Simple Calculator</a></li></ul></div></div> +<p>Application built upon Waffle only need to be aware of three things:</p><ol type="1"> + <li><b>Controllers</b> - an controller in Waffle does <b>not</b> need to extend or implement any specific class or interface because <b>a controller is simply a plain old Java object (POJO)</b>.</li> + <li><b>ActionMethod</b> - in Waffle <b>an ActionMethod is simply a method defined in your Controller class</b>. Any method can be used regardless of its signature or return type. Waffle will react differently depending on what is returned from the ActionMethod so take a look at this section for further details.</li> +<li><b>Registrar</b> - the Registrar is where you go to register the <i>Controllers</i>, and other common components, your application is dependent on. Typically most web frameworks require your applications to create special XML file(s) for this, but <b>with Waffle you'll spend less time playing with XML and more time building business logic.</b></li> +</ol> +<p>Additionally, Waffle provides:</p> +<ul> + <li>Transparent REST functionality for controllers. </li> + <li>Transparent JSON functionality for controllers.</li> +</ul> +<div class="section"> + <h3>Getting started</h3> + <p>The best way to get started is to look at the examples</p> + <ul> + <li><a href="" Hello World</a></li> + <li><a href="" Simple Calculator</a></li> + </ul> +</div> + <div class="section"> + <h3>Choices of markup language </h3> + <p>As Waffle does not come with a HTML markup technology, it plays well with other 'best practice' solutions: </p> + <ul> + <li>JSP with or without supplied taglibs </li> + <li>Freemarker</li> + <li>Velocity</li> + <li>Ruby's ERB</li> + </ul> + </div> + </div> </div> </div> <div class="clear">
To unsubscribe from this list please visit:
