One main principle of Wheel is to maximize the speed of development. Wheel is compatible with all build environments including Ant and Maven 1/2 and will fit nicely to your build environment. However a full blown build cycle is quite a lenghty process to run every time you make a change in your UI-code which is why Wheel has strong built-in support for fast development. With a setup described in this document, you'll get a turn-over time of less than second with any servlet container that supports deploying exploded web applications.
Another important aspect of web application development with Wheel is exploiting certain IDE-features to the maximum.
Usually Java web-application development cycle consists of compiling classes, moving files from build directory to application server and then hotswapping or redeploying the application. Most application servers however support deploying exploded applications that reside outside of the server's installation directory. By exploiting this feature, we can create a development environment where the exploded application is inside the IDE workspace and classes and other resources are placed directly inside the application. In development mode Wheel will pick up all changes and refresh itself automatically and will do it fast.
The generic process of creating an optimal environment:
First download and install latest stable Tomcat and Eclipse. You won't need any special plugins for Eclipse and no special configuration for Tomcat. For this example we'll assume that the name of your project is MyApp and your workspace root is c:\workspace (for simplicity). Desired context path for the application is /myapp.
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <servlet> <servlet-name>wheel</servlet-name> <servlet-class>wheel.WheelServlet</servlet-class> <init-param> <param-name>basePackageForPages</param-name> <param-value>myapp.pages</param-value> </init-param> <init-param> <param-name>applicationPackages</param-name> <param-value>myapp.pages</param-value> </init-param> <init-param> <param-name>developmentMode</param-name> <param-value>true</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>wheel</servlet-name> <url-pattern>/app/*</url-pattern> </servlet-mapping> </web-app>
<Context path="/myapp" docBase="C:\workspace\myapp\webapp" debug="0" reloadable="false"/>
package myapp.pages; import wheel.components.StandaloneComponent; public class Home extends StandaloneComponent{ public void buildComponent() { h1("Hello World!"); } }
Open Build Path > Configure Build Path > Java Build Path > libraries > expand Wheel jar > Javadoc location > edit > select the directory where you've unzipped Wheel documentation and select apidocs. Now when you use Ctrl-Space, you'll get contextual help if feeling unsure what a method will do.