You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tiles.apache.org by Antonio Petrelli <an...@gmail.com> on 2010/01/16 20:07:50 UTC
Velocity support: I was completely wrong
Hi all
this is a rant against myself :-D
I just discovered that I did the Velocity support in the wrong way,
since I somewhat forced the concept of Tool in Velocity to become a
tag.
In fact, I noticed that the best way to write the corresponding
concept of tag in Velocity into custom *directives*. For this reason I
opened this issue:
http://issues.apache.org/struts/browse/TILES-490
Note that the VelocityStyleTilesTool is ok, since it is a *real* tool:
http://tiles.apache.org/framework/apidocs/org/apache/tiles/velocity/template/VelocityStyleTilesTool.html
Now the question is: what should we do with the "Tiles2Tool" that is a
chimera between a tool and a tag?
http://tiles.apache.org/framework/apidocs/org/apache/tiles/velocity/template/Tiles2Tool.html
IMHO the best thing to do is to delete it, though we released a beta
version of the 2.2 series.
What do you think?
Antonio
Re: Velocity support: I was completely wrong
Posted by Antonio Petrelli <an...@gmail.com>.
2010/1/18 Greg Reddin <gr...@gmail.com>:
> On Sat, Jan 16, 2010 at 1:07 PM, Antonio Petrelli
> <an...@gmail.com> wrote:
>> IMHO the best thing to do is to delete it, though we released a beta
>> version of the 2.2 series.
>
> Could we just do a poll on the user list and see if anybody's
> depending on it? It's beta, not GA. We could still change it IMO.
It's worth a try...
Antonio
Re: Velocity support: I was completely wrong
Posted by Greg Reddin <gr...@gmail.com>.
On Sat, Jan 16, 2010 at 1:07 PM, Antonio Petrelli
<an...@gmail.com> wrote:
> IMHO the best thing to do is to delete it, though we released a beta
> version of the 2.2 series.
Could we just do a poll on the user list and see if anybody's
depending on it? It's beta, not GA. We could still change it IMO.
Greg
Re: Velocity support: I was completely wrong
Posted by Antonio Petrelli <an...@gmail.com>.
2010/1/16 Nathan Bubna <nb...@gmail.com>:
> On Sat, Jan 16, 2010 at 11:42 AM, Antonio Petrelli
> <an...@gmail.com> wrote:
>> 2010/1/16 Nathan Bubna <nb...@gmail.com>:
>>>> Note that the VelocityStyleTilesTool is ok, since it is a *real* tool:
>>>> http://tiles.apache.org/framework/apidocs/org/apache/tiles/velocity/template/VelocityStyleTilesTool.html
>>>
>>> yep. even if it's API is a bit verbose. ;)
>>
>> Why verbose? It's got only 11 methods and 0 or 1 parameter. What are
>> you referring to?
>
> the method names, not the size or complexity of the API.
> specifically, 9 of 11 methods include the word 'Attribute'.
> Personally, i would leave that to be implied, especially with things
> like renderAttribute(Attribute) or cloneAttribute(Attribute) where it
> is clearly redundant, and shrinking getAttribute(String) to
> get(String) would enable the much cleaner $tiles.myAttrKey syntax.
>
> granted, the explicitness of the current method names offers extra
> mental clarity/simplicity. i know enough people who prefer that to
> short and/or overloaded method names, that i'm not dogmatic. i just
> can't help making comments sometimes. :)
I agree completely, I knew this rule but it seems that I forgot it
when I wrote this tool :-D
Can you open a Jira issue for this please?
Thanks
Antonio
Re: Velocity support: I was completely wrong
Posted by Nathan Bubna <nb...@gmail.com>.
On Sat, Jan 16, 2010 at 11:42 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2010/1/16 Nathan Bubna <nb...@gmail.com>:
>>> Note that the VelocityStyleTilesTool is ok, since it is a *real* tool:
>>> http://tiles.apache.org/framework/apidocs/org/apache/tiles/velocity/template/VelocityStyleTilesTool.html
>>
>> yep. even if it's API is a bit verbose. ;)
>
> Why verbose? It's got only 11 methods and 0 or 1 parameter. What are
> you referring to?
the method names, not the size or complexity of the API.
specifically, 9 of 11 methods include the word 'Attribute'.
Personally, i would leave that to be implied, especially with things
like renderAttribute(Attribute) or cloneAttribute(Attribute) where it
is clearly redundant, and shrinking getAttribute(String) to
get(String) would enable the much cleaner $tiles.myAttrKey syntax.
granted, the explicitness of the current method names offers extra
mental clarity/simplicity. i know enough people who prefer that to
short and/or overloaded method names, that i'm not dogmatic. i just
can't help making comments sometimes. :)
>>> IMHO the best thing to do is to delete it, though we released a beta
>>> version of the 2.2 series.
>>
>> i have no love for it. but beta is not alpha. can we deprecate for a
>> version and delete in the subsequent one?
>
> Sure, it will be deleted in 3.0
>
> Thanks
> Antonio
>
Re: Velocity support: I was completely wrong
Posted by Antonio Petrelli <an...@gmail.com>.
2010/1/16 Nathan Bubna <nb...@gmail.com>:
>> Note that the VelocityStyleTilesTool is ok, since it is a *real* tool:
>> http://tiles.apache.org/framework/apidocs/org/apache/tiles/velocity/template/VelocityStyleTilesTool.html
>
> yep. even if it's API is a bit verbose. ;)
Why verbose? It's got only 11 methods and 0 or 1 parameter. What are
you referring to?
>> IMHO the best thing to do is to delete it, though we released a beta
>> version of the 2.2 series.
>
> i have no love for it. but beta is not alpha. can we deprecate for a
> version and delete in the subsequent one?
Sure, it will be deleted in 3.0
Thanks
Antonio
Re: Velocity support: I was completely wrong
Posted by Nathan Bubna <nb...@gmail.com>.
On Sat, Jan 16, 2010 at 11:07 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> Hi all
> this is a rant against myself :-D
> I just discovered that I did the Velocity support in the wrong way,
> since I somewhat forced the concept of Tool in Velocity to become a
> tag.
> In fact, I noticed that the best way to write the corresponding
> concept of tag in Velocity into custom *directives*. For this reason I
> opened this issue:
> http://issues.apache.org/struts/browse/TILES-490
>
> Note that the VelocityStyleTilesTool is ok, since it is a *real* tool:
> http://tiles.apache.org/framework/apidocs/org/apache/tiles/velocity/template/VelocityStyleTilesTool.html
yep. even if it's API is a bit verbose. ;)
> Now the question is: what should we do with the "Tiles2Tool" that is a
> chimera between a tool and a tag?
> http://tiles.apache.org/framework/apidocs/org/apache/tiles/velocity/template/Tiles2Tool.html
>
> IMHO the best thing to do is to delete it, though we released a beta
> version of the 2.2 series.
i have no love for it. but beta is not alpha. can we deprecate for a
version and delete in the subsequent one?
> What do you think?
>
> Antonio
>