Pros and Cons of Apache Tiles framework
Asked Answered
K

3

6

Greetings for the day, I was just trying to find out pros and cons of using Apache Tiles framework. Please let me know your valuable suggestions, comments, inputs regarding the same.

Kennithkennon answered 23/1, 2013 at 6:36 Comment(0)
S
7

(similar to this)

With Tiles, it seems that when I have 100 actions I need to creates 100 jsp files and create 100 definitions in tiles.xml - true, unfortunately

This is not true. And a common lingering misconception about tiles.

Such boilerplate configuration is a hang-up from tiles-1 days. It really isn't necessary with tiles-2 when wildcards were introduced, and especially with tiles-3 along with the OptionsRenderer.

Here's a tutorial that will help you with

  • spring to tiles integration,
  • definitions with wildcards,
  • implementing a fallback pattern using the OptionsRenderer, and
  • definitions composition.
Schwartz answered 28/5, 2013 at 18:42 Comment(0)
M
5

I'm been using Apache Tiles for a non-commercial project and I'm becoming less enthusiastic with it every week. But this may be caused by very basic documentation, too few examples (and no examples on advanced topics) and quite a small community.

Besides, I'd recommend you to look at those resources:

To sum up - advantages:

  • ability to build up complex (composite) views out of basic views, UI reuse
  • it's been around for some time and it's supported in some major frameworks, such as Spring (it's easy to start with it)

disadvantages:

  • small community, not very active IMHO
  • basic docs, few examples, difficult to find valuable up-to-date resources on the web - you'll be forced to dive deeply into Java interfaces and classes all the time to find what apache tiles provides
  • composite view instead of decorator - in my private opinion the decorator pattern is more flexible - you may define variables, slots, attributes, etc. in the very end of the request handling, whereas in composite view you need to focus on when you define the attribute (all attributes of a sub-view have to be defined before it's rendered - attributes overriding is more difficult)
Multitude answered 26/2, 2013 at 10:52 Comment(0)
J
2

I have been working with tiles for quite some time now and I must say once you get into it and you know all features you will love it. At the beginning it looked so complex and cumbersome and you will spend a lot of time googling. But after that you will leverage amount of great features you wont find in another frameworks or concepts like templates inheritance, overriding, flexible composition, wildcard view matching, view preparers, etc... And it integrates very well with Spring. On the other hand only feature I miss till now is the impossibility to define parent template directly in view (that would actually break the Tiles concept).

Johansen answered 30/8, 2013 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.