Tiles is a tough sell.

Tiles seems to be a tough sell in my group, which includes a bona-fide JSP and web development guru. He has some good points. Tiles promises that you can define all of your page's layouts with a couple of template files. The goal is to reduce JSP code duplication and makes it easy to apply global changes to your site. But, if your pages use a completely CSS-driven layout and your site's entire look, feel, and layout can be changed by altering a single CSS file then what does Tiles buy you? To reduce JSP code duplication a couple of header and footer includes will do. Bringing a new web developer into a project is difficult enough with the Struts learning curve. Is the added complexity of Tiles really worth it?



Like this post?  del.icio.us Bookmark it   |   submit to dig digg.com Digg it   |   slashdot Slashdot it   |   technorati See who links to it

Comments:

The first time you copy-n-paste information from one JSP to the next, think to yourself "Tiles could solve this for me." It reduces duplication, simple as that. Your implementation can be extremely simple, or extremely complicated - it allows for both.

Posted by Matt Raible on September 04, 2003 at 10:36 PM EDT #

For what Tiles does, it *is* fairly complex and that's pretty much the reason I've also stayed away from it. The old Struts template tags were much, much easier to use although not as full featured. I'm personally looking forward to a production quality implementation of Tomcat 5 with JSP 2.0 preludes and codas in addition to tag files and the EL. :-)

Posted by Simon Brown on September 05, 2003 at 02:25 AM EDT #

Juste have a look on <a href="http://struts.application-servers.com">struts-layout</a>. It is CSS oriented and it is compatible with Tiles.

Posted by Unknown on September 05, 2003 at 02:59 AM EDT #

Yeah, I came to the same conclusion for the same exact reasons just the other day. Especially when using XHTML/CSS, there's not as compelling of a reason to use it. Tiles is a solution for the bad old days of web design with nested tables and all that. -Russ

Posted by Russ on September 05, 2003 at 03:28 AM EDT #

Tiles scares me.

Posted by Rafe on September 05, 2003 at 11:52 AM EDT #

I am going to have to say that as a *user* of Tiles - it isn't that hard. Have any of you used it? It does make a lot of stuff easier. Sure you can do the same thing with includes, but then you have to make sure you have an include in each JSP where you need them - not so with Tiles. You can simply develop the content that needs to change. For instance, just a form - rather than a JSP that has the form, and includes the menu, header and footer. It is merely an extension of the old Struts template tags - and you can use it as such. Therefore, as Simon says "it's much easier to use." ;-)

Posted by Matt Raible on September 05, 2003 at 07:12 PM EDT #

I've used it pretty extensively and I don't think it is that difficult, but it is another thing to learn and another layer of architecture. It is not clear to me that the benefits outweight the added complexity.

Posted by Dave Johnson on September 05, 2003 at 08:23 PM EDT #

Post a Comment:
  • HTML Syntax: Allowed

This work is licensed under a Creative Commons License.
Copyright 2002-2007, David M Johnson (dave.johnson at rollerweblogger.org)

This is a personal weblog, I do not speak for my employer.