• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring and Tiles

 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I noticed in my Spring book that Spring supports Tiles. What do you guys suggest using to reduce the duplication of JSP code. Do most people use Tiles, JSP includes, what?

Thanks,
Ray
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Tiles is a layout engine that allows you to create re-usable areas of screens. This is definitely something I use in my applications. An alternative to Tiles is Sitemesh. The first uses composition while the latter uses decoration. They are two different approaches for solving the same problem. Spring will work with either, although it seems most books, blogs etc seem to prefer Tiles. There are pros and cons to each and a google search will result in quite a few discussions favoring one or the other. I think which one you choose depends on preference, familiarity, or project requirements. I would definitely strongly encourage the use of one or the other though,
 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We used Tiles with Struts in 2004 on a project, but then I got away from Web applications and was working with Oracle Service Bus. I'm now back to Web applications and didn't know what was used these days. Thank you for your reply, I definitely see the benefits of this technology and am a fan of them.
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I would say it is Tiles or Sitemesh, with the former appearing to be a little more prevalent. There are some good arguments for both though.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a project to reduce the massive code duplication which exists in our servlets-and-JSP (not Spring) web application. I'm using Tiles to do that and it works well to get rid of the duplicate code which is caused by all of the pages having similar headers and footers. But templates only go so far in getting rid of duplication, you'll find there are other forms of duplication which can't be templated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic