Hi list!
Today I am going to take the train to spend my 2-weeks holidays in my homeland, so I will not be able to read the list that much (maybe just a look every now and then :-) ). Anyway before going away for a while, I would like to hear from you a concept that came into my mind. Everything started with the "beanName" and similar attributes in Tiles tags, because we wondered what were their use; once it became clear, suddenly a bunch of people wrote in Struts-Users about them (coincidence?). What I noticed is that Tiles attributes (in conjunction with <tiles:importAttribute> and <tiles:put>) are like "setXXX" methods in Java classes, at least from my POV. In this context, Tiles definitions files resemble Spring configuration files, just replace:
- <definition> with <bean>
- <put> with <property> and <ref>
It seems that Tiles is Inversion of Control (or Dependency Injection, choose you favourite term :-) ) applied to the view layer!

Today it seems that everyone loves IoC, but not in view layers where everyone loves to "get" attributes from the correct scope (I have in mind JSP obviously). Once I saw a discussion at AppFuse, where developers decided to use Sitemesh instead of Tiles because Sitemesh uses a "pull" strategy, while Tiles is essentially "push" based. But if you think about IoC, it is "push"-based too, so why do these people love Spring and "hate" Tiles? (I should say "don't prefer")

In conclusion, I think that Tiles could be promoted as an IoC engine for the view layer because, pushing it to the extreme, there will be no JSP page that has a reference to a bean in a scope different to "page", because Tiles already pushed (i.e. injected) the correct dependent bean!
What do you think about it?
I hope I did not confuse you too much :-)

Ciao
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to