Quick 'n Easy SiteMesh Tutorial
SiteMesh is a kick-ass tool. It's much easier to use and configure than Tiles, although I don't know if its as powerful. Tiles has Controllers that you can assign to a definition and it supports easy i18n. I've been using Tiles for over 3 years and I've only used SiteMesh for a few months. However, SiteMesh already seems to suite all my needs. I'm guessing that most people use Tiles over SiteMesh because they haven't given SiteMesh the 10 minute test.
Anyway, back to the point of this post. Rick Reumann has put together a nice tutorial titled Use SiteMesh instead of Tiles.
I think you will quickly see the benefits after going through this brief example. In summary, the main reason I like SiteMesh more than Tiles is that SiteMesh is much easier to configure and use (less typing and easier to understand).
Good stuff - thanks Rick! As part of the WebWork integration into AppFuse, I was planning on using SiteMesh. I'm already using it in Spring Live sample app and it's pretty slick. I haven't had to touch it since I integrate it. Compare this with Tiles where you have to add a new definition (or JSP) everytime you want a new page. If nothing else, I think Tiles needs to learn from SiteMesh and add a Filter that can be used to decorate pages.
Posted by Jason Carreira on June 14, 2004 at 01:05 AM MDT #
Posted by Tim Chen on June 14, 2004 at 03:39 AM MDT #
Posted by Jason Carreira on June 14, 2004 at 04:20 AM MDT #
Posted by Tim Chen on June 14, 2004 at 12:30 PM MDT #
I have seen SiteMesh mentioned in alot of blogs and other websites so it seems there is fairly strong following. It definitely looks like something worth checking out.
Posted by Dave Keller on June 14, 2004 at 12:48 PM MDT #
CSS can definitely make your pages lightweight and easy to re-design, but it doesn't eliminate the need for templating systems. If you don't use a templating system, you'll have to specify DOCENGINE, <html>, <head> and other elements for each page. With a good templating system, you can just write the contents of that page (i.e. a <form>) and be done with it. Of course, I <em>highly</em> recommend using CSS as much as you can - AppFuse and other projects I've developed have only a few <div>'s in the HTML and everything else is handled by CSS. In fact, Struts-Resume and AppFuse have virtually no structural differences in their respective baseLayout.jsp files - even though their designs are very different.
Posted by Matt Raible on June 14, 2004 at 01:39 PM MDT #
Posted by Greg Jones on June 14, 2004 at 08:56 PM MDT #
Adding it is one thing, re-doing the Tiles implementation with it is another. It'll probably only take a few hours, but I don't have the bandwidth right now. Maybe in July.
Posted by Matt Raible on June 14, 2004 at 09:18 PM MDT #
Posted by A3T on June 15, 2004 at 04:59 AM MDT #