struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Baroukh (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WW-1133) Deprecate the ww:push tag
Date Wed, 06 Dec 2006 18:30:57 GMT
    [ http://issues.apache.org/struts/browse/WW-1133?page=comments#action_39017 ] 
            
Mike Baroukh commented on WW-1133:
----------------------------------

I like s:push too : it's more easy to use than havin to specify an Id and more in the "stack"
spirit ...

> Deprecate the ww:push tag
> -------------------------
>
>                 Key: WW-1133
>                 URL: http://issues.apache.org/struts/browse/WW-1133
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Views
>    Affects Versions: WW 2.2
>            Reporter: Gabriel Zimmerman
>             Fix For: Future
>
>
> I think it would be an improvement for webwork to deprecate the push tag, and perhaps
modify how the iterator tag places each iterated object on the stack by setting as discussed
in XW-329, making the ww:iterator tag work more like the JSTL iterator tag in that respect.

> The reasons "setting" is better in my opinion than "pushing" for views are the following:
> 1) When you see a set object, it gives you the context of where it is coming from. <ww:property
value="child.name"/> is more descriptive than simply <ww:property value="name"/>

> 2) With pushing, there is a large possibility of clashing of property names. If I inadvertently
push a "parent" object on the stack and later push a "child" object on the stack, then <ww:property
value="name"/> would give you the child's name, there would be no way of accessing the
parent's. 
> 3) Setting is probably somewhat better for performance than pushing is. When XWork searches
on the stack for a pushed Object, it looks at all the properties of each object until it finds
the latest on the stack. That amount of introspection is bad for performance, worse, at least
than if it had to look up "child" in a Map, where a Map was the latest object on the stack
(as it would be if setting was done as discussed in XW-329.
> 4) It would be easier to implement "track back" features without pushing. If you have
a <ww:property value="name"/>, it would be harder to find where that name came from
than if you have <ww:property value="child.name"/>, where "child" was set sometime earlier.

> 5) It simplifies the API by removing a technology that adds nothing (pushing adds nothing
to setting when doing so within a given JSP)
> 6) It makes the API closer to JSTL, which makes it simpler to explain to a user who knows
JSTL.
> Thus, overall, I propose that the pushing should be done for actions onto the stack,
but only setting should be done within a given JSP.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message