9

Working on the design of a web-application and since it will be a large application so can not reply on jsp include feature so have to use some other solution and for that we came up with Tiles and Sitemesh.

We are new to both of them so any insight from the community will be much appreciated.For additional information we will use Struts2.x as our mail MVC framework with Spring for the other layer(Business)

Which option is better since the application have to do with lots of content and frequent UI changes

Tomas Narros
  • 13,390
  • 2
  • 40
  • 56
Umesh Awasthi
  • 23,407
  • 37
  • 132
  • 204

2 Answers2

11

From my personal experience, I would recommend Tiles2: Easy and clean integration with Struts2, allows you to reuse avery single component along various templates, the templates composition can be as complex as you want (supports nesting, pattern inheritance, components referencce, etc), etc. As a negative point, I would mention the XML configuration, which for large project can imply kilometric XML files. Anyway, this can be easily avoided segmenting the config files (i.e a file for general templates, and a separate file for the views if each module), but still, you end up having lots of XML config files...

Another point for the use of Tiles2, is that it's an active project (last release published on June 2010), while Sitemesh project seems a little abandoned (last release on March 2009 as seen here).

Anyway, to check the different points of view (Composite View vs. Decorator pattern), you could take a look here and there, and see which approach will fit better your requirements.

Edgard Leal
  • 2,592
  • 26
  • 30
Tomas Narros
  • 13,390
  • 2
  • 40
  • 56
  • +1 Thomas as i saw Sitemesh is not haveing any latest release – Umesh Awasthi Dec 14 '10 at 14:53
  • 2
    SiteMesh 3.0 is under development (see http://www.sitemesh.org/). Tiles 3.0 is also under development (http://tiles.apache.org/index.html). Neither have been updated since 2010. – Will Iverson Feb 23 '12 at 00:25
  • +1 Tiles 2.2 is easy to integrate with struts2 and the wild card support can greatly reduce the size of the xml files. – Quaternion Mar 21 '12 at 05:48
3

Tiles-3 has been released.

Along with wildcarding there is also a OptionsRenderer to further reducte xml. See http://tech.finn.no/the-ultimate-view-tiles-3/

mck
  • 31
  • 1