Tapestry 5: Building Web Applications: A step-by-step guide to Java Web development with the developer-friendly Apache T

Tapestry 5: Building Web Applications: A step-by-step guide to Java Web development with the developer-friendly Apache T
Authors
Alexander Kolesnikov
ISBN
1847193072
Published
15 Jan 2008
Purchase online
amazon.com

In Detail This book is a practical step-by-step tutorial for those who want to build contemporary, real-life web applications with Tapestry 5, the Apache open-source framework for creating dynamic, robust, highly scalable web applications in Java. It shows the path of least resistance, so that the reader can learn all the essential skills quickly and easily. To give the reader an initial practical experience, a simple but useful web application is built throughout the chapters.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Bakul P. Brahmbhatt said
[...]This book is written with very simple examples. Few things are here and there but over all, this book will help you to get started in right direction. What this book is missing is information about Mixin, Ajax, integration with spring and hibernate. But purpose of this book was to give a jump start and not to teach everything. So don't be discouraged by reading negative comments of few people. Get your copy today.

John Yeary said
I received an offer to review the Tapestry 5 by Alexander Kolesnikov from Packt Publishing. I use JSF for most of my web based work and I knew nothing about Tapestry save the name. At first, I thought that I would decline the offer, but decided to check it out to broaden my knowledge. I am glad I decided to look into it.

Apache Tapestry 5 is still in beta on the Apache Foundation website. I found it interesting that Alexander decided to write about a work in progress. It turns out that Alexander is heavily invested in the Tapestry project and has written a fair amount of the Tapestry 4 tutorials. If there is anyone who knows the project, it is Alexander.

The book is generally well written. It has definitely given me the knowledge I need to do Tapestry development based on it.

My harshest critique of the book has to do with the examples. Most of them work, but the project is still a moving target and some of the examples will not work with the latest code drops. The code seems to be based on version 5.0.6, The latest version is 5.0.11. If you use the maven quickstart project, it will currently use 5.0.10 as of my blog post. This constantly moving target makes writing a book difficult, but makes it even harder on the person trying to learn how to use it.

I would recommend the book to those who want a jumpstart on Tapestry 5 development. Based on the amount of changes in the project until a final release, the book will be further adversely affected. I would give it (3/5 stars).

Chapter 1
Introduction to Tapestry

This chapter covers the history of Tapestry, and provides some details of why it is special. There is nothing really technical about the chapter.

It does mention one item of interest. Tapestry 5 is a complete code re-write. They decided that instead of building on top of an existing framework with its flaws, that it would be better to re-write it from the lessons learned.

You could skip this one.

Chapter 2
Creating Your Work Environment

This chapter provides the basis for the following chapters. It explains how to install the JDK, Apache Maven, and create a "quickstart" Tapestry project. It also explains how to configure Netbeans and Eclipse for Tapestry projects.

The project that is created has a more current copy of the Tapestry libraries than the book was created with. The latest version is 5.0.11. My review is based on 5.0.10.

Chapter 3
The Foundations of Tapestry

This is the first chapter in which you really start learning about Tapestry. Chapter 2 prepares your workspace for this chapter. This chapter works off of the project created in Chapter 2. It explains the basics (foundations) of Tapestry. The page template and page bean style may seem familiar to those of you who do visual JSF development in Netbeans, or Sun Java Studio Creator 2.

Tapestry components can be defined in three distinct ways and the book gives adequate examples of all three.

1. The components can be defined in an XML template.
2. The components can be embedded in HTML components
3. The components can be implemented as HTML components on the page and have all Java code annotated in the page backing bean.

The third example is the cleanest separation of code as the author notes, but is not the easiest to use. The author and I both prefer the second version.

One of the coolest things I like about Tapestry is the exception handling. Let's face it, we will have bugs. The best frameworks provide the developer (and end user) with a meaningful exception page which helps to track down the errors. Tapestry has the best exception handling I have seen. It is intuitive and sensible in its approach. The best exception handling also helps novices to understand the error and how to fix it. Tapestry wins here too.

Chapter 4
Simple Components

This chapter begins to get into the meat of the framework by discussing the most common components that a web developer is likely to use: TextField, PasswordField, Label, PageLink, ActionLink, Select, Checkbox, Submit, etc.

The author begins the chapter by starting a project called Celebrity Collector. This project serves as the basis for the examples in the remaining chapters of the book. I suggest that everyone follow along with the process in their favorite IDE instead of just parsing the chapter. You will be happy you did so.

My overall impression of the chapter was that was well written and provides the basics for development with Tapestry.

Chapter 5
Advanced Components

Let me start by saying that the Grid component in Tapestry is awesome! This chapter covers advanced components like Grid, BeanEditForm, and FCKEditor. This chapter was hit hard by changes in the framework, but I have some solutions to help you along.

Remember my solutions may not work in later versions of Tapestry. I suffer from the same issue as the author that the framework is a moving target.

The BeanEditForm is another really cool advanced component. It makes the process of editing data a piece of cake. It is also extremely easy to implement.

The last component that the author covers is the FCKEditor. This is a component developed externally from the Apache Tapestry project. The author's intent is to show you how to implement 3rd party components.

Unfortunately, the project on Google Code has halted. The good news is it is part of a more extensive set of components also on Google. The old project has links to the new project: tapestry5-components. This project has a more extensive set of components.

Chapter 6
User Input Validation

This chapter covers user input validation. There have been a number of changes in the framework which have changed some of the behaviors expected. The results are the same, and I think better. The changes have made it easier to perform validation for the most part.

Chapter 7
Internationalization and Localization

I currently work for an international company, as a result, i18n and i10n are very important. If you are working in an international market: Internet. You should care. If your audience (customers) can't read the page, they will go someplace else.

This chapter shows how easy it is to implement internationalization and localization in your work. I was amazed at how easy it is to implement. If you need translations, I recommend Google Translate.

Chapter 8
Creating Custom Components

The book concludes on how to make custom components. This chapter was fun to do. It takes a lot of the work you have already done, and made it re-usable. It is quick and simple to do. If you have ever tried to make a custom JSF component, you know how difficult it can be. This is particularly true the more complex the component. Tapestry makes it so easy that I wish that this simplicity could be brought to fruition in JSF.

Appendix A
The Basics of Java for the Web

This chapter is an introduction to web development. It is for the novice who is just trying to understand what web development is about. Very basic information.

Appendix B
Creating a Real Data Source with db4o

I did not examine this chapter since I have no interest in the subject except mere curiosity. I did read it, but did not try it. I leave this to those who wish to comment on it.


Again, I would recommend the book to those who want a jumpstart on Tapestry 5 development. I would give it (3/5 stars).

I have a number of additional comments and errata located on my blog. Please see my blog for more details by chapter.
[...]

B. Hainey said
I really enjoyed reading Alexander's book on Tapestry 5. What I liked most was the fact that it takes the reader all the way from setting up the development environment to advanced topics like component development. Alexander's enthusiasm for the Tapestry 5 framework permeates the book and will definitely inspire any reader interested in adopting the framework. The insights provided into how the framework has evolved from version to version and how it is likely to evolve in the future are very interesting. It's obvious that Alexander has sound practical experience of using Tapestry on real life projects.

All in all a good complement to the existing Tapestry 5 literature.

David O'Meara said
Tapestry 5: Building Web Applications was not written by the creator of Tapestry, but the author Alexander Kolesnikov is a contributor to the project and has been associated with the technology for a while. I liked this since when the author is also the creator, they often want others to love their work the way they do, and the book either feels like they are selling something or it makes assumptions on knowledge required to learn the technology and misses key points.

The book builds on the features of Tapestry in an easy and nonthreatening manner, so that each example feels accessible to the reader. In fact it was quite pleasing the way that the features unfolded during the book, and to me this was more of an encouragement to use the framework than any type of forced sell. There is a pro-Tapestry stance throughout the book, but that shouldn't be too surprising!

It is worth pointing out that Tapestry was rewritten from version 3 to version 4 to version 5, and while initially this confused me and gave me fears for V6, it does allow the current version to make use of the full features of Java 5, all of which is laid out in the book. Since the book does target Tapestry version 5 only, it won't be of direct help to anyone needing help upgrading from a previous version. The book is also geared more towards learning Tapestry than being a useful resource, so this should also be taken into account when purchasing.

Now that I have read the book, "Tapestry 5" has succeeded in getting me interested in using Tapestry to build a project of my own, and the advanced section on creating your own components gave me some ideas...

Sankarshan M said
The book claims to be a step-by-step guide for those who want to build contemporary web applications. And it does stick to the objective. Without wasting too much time on discussing the what and what's new of Tapestry, the author does a quick general overview of web frameworks and existing flaws and proceeds towards explaining how Tapestry 5 fits in. He does mention fleetingly that Tapestry 5 is a complete re-write and hence not much of Tapestry 4 stuff is going to work.

Touching upon how to install, configure and get up and running with Tapestry and the related tools (Eclipse/NetBeans and Maven), the author starts off on the basics of what can be done by the 3rd chapter. Explaining the use of Tapestry in the light of the fundamental building blocks of an web application and architecture, the good thing about the book is that it puts in place the good practices to adhere to while taking the example of a standard web application. Liberal use of reference URLs, notes and things to watch out for also make it possible for the developer to be aware of the various gotchas that can become part of an application code. The chapter on i18n and l10n would be of special interest to developers who desire to globalize their applications.

The layout of the book is nice. Enough care is given to ensure that there is margin space for notes and the font selection does seem to work well on the eye. The author has taken a lot of care on the Appendices as well. A fact that most books seem to neglect.

If a web developer with existing knowledge of programming in Java and frameworks wishes to come up to speed with Tapestry 5, this would be a good book to have at hand and keep well-thumbed. It does have a lot of programming insights all of which may not be obvious at the first read, but would come of use with continuous development with Tapestry 5.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint Exupéry