You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by David Graham <gr...@yahoo.com> on 2003/07/31 02:57:24 UTC

Refactoring RequestUtils

The movement of JSP specific methods to TagUtils is nearly completed
except for moving the externalized messages.  I'd like to refactor
RequestUtils even more to reduce its hefty size.  There are 2 distinct
groups of methods: URL related and Module related.

1.  I suggest we move the module methods into a new ModuleUtils class.

2.  I would suggest that there also be a UrlUtils class except that 4 of
the URL methods aren't used in Struts and 2 of them should be moved into
TagUtils.  serverURL(), absoluteURL(), actionURL(), and printableURL() are
not used.  encodeURL() and pageURL() should go to TagUtils.  What do we do
with the 4 unused methods?

Thoughts?

David



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: Refactoring RequestUtils

Posted by Rob Leland <rl...@apache.org>.
David Graham wrote:

>The movement of JSP specific methods to TagUtils is nearly completed
>except for moving the externalized messages.  I'd like to refactor
>RequestUtils even more to reduce its hefty size.  There are 2 distinct
>groups of methods: URL related and Module related.
>
>1.  I suggest we move the module methods into a new ModuleUtils class.
>
>2.  I would suggest that there also be a UrlUtils class except that 4 of
>the URL methods aren't used in Struts and 2 of them should be moved into
>TagUtils.  serverURL(), absoluteURL(), actionURL(), and printableURL() are
>not used.  
>
absoluteURL() is the original method in RequestUtils January 05 2001, 
and was originally used by
the Include, Link, and Redirect tags in struts Beta 1. It was removed 
from these tags
in May 2001, and replaced by inline stringBuffer appends.

actionURL() was contributed by Chris Smith Jan 25 2001, as part of the 
FormTag but was migrated
later to the ReuqestUtils.

Two options come to mind, deprecation or place it in a 'user space' set 
of utilities. These would
be convience methods not used by struts but available for a user. I am 
+1 on either route

>encodeURL() and pageURL() should go to TagUtils.  What do we do
>with the 4 unused methods?
>
>Thoughts?
>
>David
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free, easy-to-use web site design software
>http://sitebuilder.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
>
>  
>


-- 
-----
Rob Leland (703-525-3580)


Choose a job you love, and you will never have to work a day of your life.
                                                                                      -Confucius.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org