This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am using Struts 1.1 for a current web project. To further break down the View into reusable, manageable pieces I am using Struts Templates, which I have found that I like a lot. Recently, I read a little bit about Struts-Tiles, which appears to perform the same thing as Struts-Templates. Which is the preferred approach, or is it just a matter of personal preference? Is this covered in the Author's new book?
Struts In Action has pretty good coverage of Tiles. I believe it was a full chapter, but I don't have the book in front of me right now.
Joined: Nov 06, 2001
Does it compare/contrast Tiles with Templates? I guess my concern is that I have already completed a fair amount of my project using Templates, so switching to Tiles could involve significant work. I am not opposed to that if there is some large benefit. Right now, they (Templates and Tiles) sound to me like different, equally-acceptable solutions. I have gotten decent with Struts, but I definitely do not consider myself an expert on this.
Hi Michael, Struts Tiles is a newer and more comprehensive approach to add Layout Management functionalities to Struts. It includes all the Struts Template tags. To switch from Struts Templates to Struts Tiles all you have to do is to change the *.tld like this:
There is no need to change the prefix from templates to tiles. Besides that the Tiles Framework goes much further: With 'Tiles Definitions' you can configure the whole Layout-Management with a XML file. You can catch the whole Screenflow of your project by just taking a glimpse in this XML file. You can even define and extend Tiles Definitions. It's fun and worth to give a try. Regards Berny Woehrlin
As Bernie pointed out, Tiles is specifically designed to be backwardly-compatible with the Template library, so you should not have any trouble migrating. Also, the Template library will be deprecated in the next iteration of Struts 1.1, if that counts for anything. HTH, Ted.
<a href="http://husted.com/struts/book.html" target="_blank" rel="nofollow">Struts in Action</a>