You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Joe Germuska <Jo...@Germuska.com> on 2004/01/15 16:14:55 UTC
Action Config wild cards -- why not use regular expressions?
Since Struts already depends on jakarta-oro, is there a reason not to
use it for doing pattern-based mapping, rather than the home-grown
methodology that's in the current builds?
I don't have a use case for it yet, but since I was a perl hacker
before I came to Java, I speak regex reasonably fluently, so it seems
to me more useful to have the full power of regular expressions
available.
If there are strong feelings in favor of the status quo, I think it
would be easy enough to make "matcherClassName" a property of
ModuleConfigImpl and support pluggable matchers.
I guess technically, only Validator depends on jakarta-oro; I might
be persuaded that that's a reason to keep from adding it to the core,
maybe...
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers, and
nobody thinks of complaining."
-- Jef Raskin
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org
Re: Action Config wild cards -- why not use regular expressions?
Posted by Robert Leland <rl...@apache.org>.
Joe Germuska wrote:
> Since Struts already depends on jakarta-oro, is there a reason not to
> use it for doing pattern-based mapping, rather than the home-grown
> methodology that's in the current builds?
>
> I don't have a use case for it yet, but since I was a perl hacker
> before I came to Java, I speak regex reasonably fluently, so it seems
> to me more useful to have the full power of regular expressions
> available.
I have a few questions about simulating the ~= operation in ORO and
Javascript for the validator code,
but I'll save those for later.
>
> If there are strong feelings in favor of the status quo, I think it
> would be easy enough to make "matcherClassName" a property of
> ModuleConfigImpl and support pluggable matchers.
>
> I guess technically, only Validator depends on jakarta-oro; I might be
> persuaded that that's a reason to keep from adding it to the core,
> maybe...
I doubt anyone could object on the basis of performance, unless they
create a benchmark to support the claim it's much slower.
Anywhere we can simplify the logic and eliminate duplication is a good
thing.
>
> Joe
Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org
Re: Action Config wild cards -- why not use regular expressions?
Posted by David Graham <gr...@yahoo.com>.
Unless there's a solid use case, I'd prefer to leave things as they are.
You're right that only Validator uses ORO and the plan for Validator 2.0
is to replace it with the standard java.util.regex system which is twice
as fast. Since Struts 2.0 will depend on Java 1.4 we could add regex
action mapping then if there was a use for it.
David
--- Joe Germuska <Jo...@Germuska.com> wrote:
> Since Struts already depends on jakarta-oro, is there a reason not to
> use it for doing pattern-based mapping, rather than the home-grown
> methodology that's in the current builds?
>
> I don't have a use case for it yet, but since I was a perl hacker
> before I came to Java, I speak regex reasonably fluently, so it seems
> to me more useful to have the full power of regular expressions
> available.
>
> If there are strong feelings in favor of the status quo, I think it
> would be easy enough to make "matcherClassName" a property of
> ModuleConfigImpl and support pluggable matchers.
>
> I guess technically, only Validator depends on jakarta-oro; I might
> be persuaded that that's a reason to keep from adding it to the core,
> maybe...
>
> Joe
>
> --
> Joe Germuska
> Joe@Germuska.com
> http://blog.germuska.com
> "Imagine if every Thursday your shoes exploded if you tied them
> the usual way. This happens to us all the time with computers, and
> nobody thinks of complaining."
> -- Jef Raskin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org
Re: Action Config wild cards -- why not use regular expressions?
Posted by Don Brown <mr...@twdata.org>.
Certainly we could adopt the Cocoon model of pluggable matchers; I just
used the wildcard matcher as it is easy and straight forward. Using
complex pattern matching like Perl5-compatible regex as the default would
be more difficult for the average developer and my guess not necessary
for most cases.
Don
On Thu, 15 Jan 2004, Joe Germuska wrote:
> Since Struts already depends on jakarta-oro, is there a reason not to
> use it for doing pattern-based mapping, rather than the home-grown
> methodology that's in the current builds?
>
> I don't have a use case for it yet, but since I was a perl hacker
> before I came to Java, I speak regex reasonably fluently, so it seems
> to me more useful to have the full power of regular expressions
> available.
>
> If there are strong feelings in favor of the status quo, I think it
> would be easy enough to make "matcherClassName" a property of
> ModuleConfigImpl and support pluggable matchers.
>
> I guess technically, only Validator depends on jakarta-oro; I might
> be persuaded that that's a reason to keep from adding it to the core,
> maybe...
>
> Joe
>
> --
> Joe Germuska
> Joe@Germuska.com
> http://blog.germuska.com
> "Imagine if every Thursday your shoes exploded if you tied them
> the usual way. This happens to us all the time with computers, and
> nobody thinks of complaining."
> -- Jef Raskin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org