[Building Sakai] Tapestry 5 Integration with Sakai

Earle Nietzel earle.nietzel at gmail.com
Sat Jun 25 09:17:28 PDT 2011


Hello,

The last 6 months I have been using Tapestry 5 and have come to enjoy using
it very much.

It is a very powerful but yet simple Java web framework that is often
compared to Wicket a lot since it shares many of the same ideas.

I did look at Wicket prior to Tapestry and was not satisfied by the amount
of code that goes into a Wicket App.

Tapestry is like a breath of fresh air, it's power comes from its own DSL by
use of annotations. It has its own IoC container allowing the ability to
create pages with minimal amounts of code, often resulting in 1 page of code
because of its excellent use of annotations. To give you an example even
validation is added using an annotation, just a simple one liner for
example:

@Validate("required,regexp")
public String zip;

And you can i18n the error message and the regular expression to a
properties file:
zip-regexp=^\\d{5}(-\\d{4})?$
zip-regexp-message=Zip Codes are five or nine digits.  Example: 12589 or
12589-0000.

Those that have used features from lombok will like to know these are built
into Tapestry 5.

Of course there is so much more so take a look at their web site
http://tapestry.apache.org/ where they have a 10 minute video
http://blog.markwshead.com/900/tapestry-5-10-minute-demo/

The video is a great way to see what Tapestry can offer over a coffee break.


I have looked at integrating Tapestry 5 with Sakai.

What I have found is that Tapestry (as well as newer versions of Wicket) is
invoked as a web filter i.e. TapestryFilter, currenlty Sakai does not
support using filters as tools in fact it must be a servlet. This appears to
be due to the tool registration as it registers a tool id with a servlet and
then uses RequestDispatcher to dispatch requests to the appropriate tool.

I have opened the following JIRA
KNL-754<https://jira.sakaiproject.org/browse/KNL-754>to track this
feature.

I would also like to know if there is interest in this?

Earle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110625/58648f94/attachment.html 


More information about the sakai-dev mailing list