Hello,
before continuing to evaluate JSF 2, I would like to help out to improve
the Tapestry documentation. This is something, I have quite some
experience with.
I would like to update the quick start documentation and defined the
following goals:
- setup with and without Maven
- stable Maven setup (possibly fall back to old archetype configuration)
- the sample application should look smart
- Expect a minimum of Java and IDE knowhow but take care that everything
is explained in details
- Always explain first, what we are going to do, show diagrams or screen
shots and then go forward step by step
- Provide enough 'power functionality' like mixins or self made
components and explain the usefulness
- Provide a helpful outlook, where to go next after the tutorial.
I would like to publish the tutorial on my website and in addition give
it under Apache licence to the Tapestry project. In my opinion this
should live either on the normal Tapestry website or in the Tapestry
Wiki area.
Are you interested in this effort and is this likely to be accepted? (A
question to be answered by commiters.)
I started to write the tutorial and prepared some chapters. You can find
the current state at the end of this mail. I would appreciate your comments.
Which functionality should be included in addition?
What do you think about taking the effort to translate this tutorial?
Keep in mind that this comes with a lot of effort as we have
continuously translate all changes into all support languages. We would
probably need to have 2-3 people per language, to have enough fall backs
to keep this in sync.
--
Best Regards / Viele Grüße
Sebastian Hennebrueder
-----
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de
My sample structure and content
1Introduction to Tapestry 5
Tapestry is an innovative Java based web framework. It provides great
support for modern
Ajax enabled applications. It is component and object oriented, which
allows to build a web
application with a minimum of duplicated code.
In this tutorial we are going to have a look at important concepts of
Tapestry, while building a
nice application.
2Setting up the application
There are three setup options:
• Generating a sample application using Apache Maven
The generated project can be imported into your preferred development
environment
like Eclipse, Netbeans or IntelliJ
• Using a prepared project for the Eclipse development environment
• Using a prepared project for the IntelliJ development environment
2.1 Setup with Apache Maven
You need to install Apache Maven first. The download and documentation
of Maven can be
found on its website http://maven.apache.org/
If Maven is successfully installed, you should be able to type the
following command in a shell
or in a terminal.
mvn -version
Outputs something like:
Maven version: 2.0.10
Java version: 1.6.0_13
OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
The following command will use a Maven archetype to setup a ready to run
Tapestry
application. An archetype is just a kind of prototype or template. In
addition all required
libraries will be downloaded.
2.2 Setup with Eclipse project
First, we download the prepared Eclipse project and the Tapestry
libraries, then we are going
to copy the required libraries to the library folder of the web
application.
Download the project at
http://www.laliluna.de/download/tapestry-5-eclipse.zip
Unzip the project
Download a stable Tapestry 5 release at
http://tapestry.apache.org/download.html
Unzip the Tapestry download and copy the following libraries to the
folder Webroot/WEB-INF/
of the unzipped project.
• antlr-runtime-3.1.1.jar
• commons-codec-1.3.jar
• javassist-3.9.0.GA.jar
• log4j-1.2.14.jar
• slf4j-api-1.5.2.jar
• slf4j-log4j12-1.5.2.jar
• stax-api-1.0.1.jar
• stax2-api-3.0.1.jar
• tapestry-core-5.1.0.5.jar
• tapestry-ioc-5.1.0.5.jar
• tapestry5-annotations-5.1.0.5.jar
• woodstox-core-asl-4.0.3.jar
2.3 Setup with IntelliJ project
We are going to use the option to import a standard Eclipse project.
Follow the steps of the
Eclipse project setup.
Once this is finished, select new project from the file menu and select
Import model from
external source.
You need to input or select the folder of the Eclipse project and just
accept the other settings.
2.4 Starting the application a first time
For development we recommend the Jetty servlet engine. It starts up
extremely fast and is
easy to integrate into Eclipse, Netbeans and IntelliJ.
Eclipse
Netbeans
IntelliJ
3Exploring the application
We are going to have a look, what was already prepared for you.
Web.xml
default resource bundle
a page class
4Extending the application
We will add a page showing a list of turtles, then we will add a page to
show details of a turtle,
create, edit and finally delete a turtle.
Show the use of page links
Show the use of beaneditform, validation and overwriting defaults to
show a textarea
Show the use of action links
5Adding Ajax to our application
Tapestry provides the concept of zones to update only a part of the page
using Ajax. We are
going to use this to integrate the detail page into the turtle listing.
In a second step, we will add autocomplete support to the edit dialog.
Tapestry has a concept
of mixins which allows to change the behavior of existing components. If
you like Design
Patterns, you could think of a kind of Strategy Pattern applied to
components.
6Your first component
At the beginning, we have stated that Tapestry helps you to avoid
redundant code. In this
chapter, you will see how you can achieve this by writing your own
component.
Something like
<t:show value=”foo” label=”message:foo-label”/>
to render
<div><label for=”foo”>bar</label><div>this is foo</div></div>
7Integrating Hibernate
Moving the existing crud to Hibernate
8What's next?
We would like to provide you with different pointers to informations to
learn more about
Tapestry.
The user guide explains most functionality of Tapestry.
http://tapestry.apache.org/tapestry5.1/index.html
The Tapestry wiki has a large number of examples how to solve common
problems, create
components, integrate other frameworks like Hibernate, Spring, Spring
Security, Google Web
Toolkit and many others.
http://wiki.apache.org/tapestry/Tapestry5HowTos
There is a reference of all Tapestry components. The reference is
generated from the source
code documentation.
http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/
If you like to see a large sample application, you can try out the
JumpStart application. It is a
fully functional application with a large number of functional demos.
http://jumpstart.doublenegative.com.au/
Furthermore, you can ask questions on the mailing list.
http://tapestry.apache.org/tapestry5.1/mail-lists.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org