Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Books

Journal ebolaZaireRules's Journal: Tapestry 5 - Building Web Applications

Tapestry 5
Building Web Applications
by Alexander Kolesnikov

All new programming tools, methodologies and frameworks have a 'learning curve'. Some are easier to pick up than others, and some are more effective than others. One thing that they all share, however, is that getting started is the biggest hurdle of all.

If you would like to set the bar as low as possible to begin with, this book (and Tapestry 5) are for you.

The first chapter of the book contains no technical information at all, but is rather a look at some the history behind Tapestry, and also a look at what makes a successful framework, during which he breaks the news: Java, once the leader in web technologies, has lagged a long way behind the leaders.

But there is good news for Java fans and Web designers alike... Tapestry set to be 'up there with the best of them'.

But why would you believe such a statement as that? As the good book says, 'Taste and see'...

Chapter two concerns itself with setting the a development environment, as is (I confess) the real reason I got the book.
The chapter starts at the very beginning, with step by step instructions starting with installing the JDK, and ending with a server running a stub project.

Both Eclipse and Netbeans are covered as development environments, both in setup, and throughout the book.

Tapestry 5 is built via Maven, a tool which extends the build process to include dependency management.
I've never really gotten on with build tools, and Maven is no exception. No matter what I did, I couldn't get the project to work. Then when I got the book, I followed Alex's steps, and in 5 minutes I a project I could work with up and running.

Just a note... Maven has changed since the book was published, and the command is out of date. To save you the hassle of looking for it, this is what I used... Hopefully it still works for you:
mvn archetype:create -DarchetypeGroupId=org.apache.tapestry -DarchetypeArtifactId=quickstart -DarchetypeVersion=5.0.11 -DgroupId=koncept -DartifactId=test1 -DpackageName=koncept.test1

Once up and running, Alex wastes no time in getting moving. After flying through adding components (well, it _is_ pretty simple), he moves on to storing data - dealing with both persistence and state. State is not stored, and will often be passed back to the page. Persistence is stored in the application (session), and as such continues to require memory once the request has been processed. Unsurprising if you are a web developer, but well received none the less.

Chapters four and five continue to focus on components, moving through the essentials of the Tapestry component library. Since I don't bother to do the 'code along' style, I raced through these chapters, only referring to them the first time I used some of the more interesting components.

The sixth chapters focus is validation. In todays world of interactive websites, information flows two ways, and as the saying goes 'Garbage in, Garbage out'. Alex walks the reader through all the steps required. Its not that validation is particularly difficult in Tapestry, but the fact that it can be scaled up to almost any complexity that makes it merit a whole chapter.

Alex is Russian. I only speak english. Neither of us understand German. If I want to look at a site in a foreign language, I use babelfish (and then give up). Tapestry supports the standard method of internationalisation, both for text and images. If you are new to web development, the chapter is required reading, but for those more experienced, a brief glance will suffice.

In the last chapter, Alex deals with custom components. This is where the fun is, in writing your own components. The grand finale, as it were. Once you can write and use your own custom components, there isn't much you can't achieve in Tapestry. In his step by step manner, he shows us how to create a date component from three drop downs (instead of using Tapestry's 'calendar page' date component).

The last part of the last chapter is to do with creating your own custom library. Its only a short section, but it shows us how far we have come. Short though it may be, the book contains enough information to write an entire web applicaton, including custom (and exportable) libraries. Pick the book up, take a look at it. Its not the biggest book in the world. Its worth is not in the number of pages, or in delving into all the nuances of different persistence annotations, but in its practical approach to getting stuff done (TM).

On a final note, I did read the appendices. He includes a section on db4o. While db4o is not my first choice of technology for storage, it does illustrate the ease integration with Tapestry.

Finally, I would like to say that overall, I thought that the book was useful. It was straight forward, and was concerned with getting things done. For those who don't have patience, you can skim read most it, and refer back to it for little tips and tricks.

I am particularly thankful for the chapter on environmental setup. I _really_ don't like maven. I am a build tool phobic. I guess how I used it goes for the whole book - if you don't get it, there are step by step instructions, usually with a brief 'why' included as well.

OK, well, there we go. I would like to say that I do know Alex, that I'm not affiliated with Packt Publishing in any way at all, that I develop with Tapestry 5, and that these are my honest opinions.

--nK
--nicholas Krul

This discussion has been archived. No new comments can be posted.

Tapestry 5 - Building Web Applications

Comments Filter:

"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."

Working...