You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Paul Benedict <pa...@yahoo.com> on 2006/06/29 02:34:47 UTC
Thoughts on 1.3.x
I have two concerns on the 1.3.x line. What do you think?
1) Spring 2.0 has fabulous support for dependency injection for Struts. In particular, the great Autowiring(Tiles)RequestProcessor will automatically inject dependencies into the actions as they are created. This supports the "legacy" RequestProcessor and I have no personal plans to depart from its use. So my question today is: does the RP in 1.3 function just as it did in 1.2? If not, I may not want to upgrade to 1.3.x until it does.
2) I learned the tough way that it is [a] impossible to write a stateless application in Struts and [b] use Struts' locality features at the same time. This is because Struts only stores the locale in the session, and there is no way (currently) to move that into a cookie, or into request scope. I found scattered code among RequestProcessor, RequestUtils and TaglibUtils which look only into the session for the current locale.
I propose (and I will write this) that we allow pluggable implementations into how to store the locale. It will be defaulted into the session, with other pluggable implementations provided. However (sorry fans of CoR) this implementation must be wrapped into a bean so that other libraries, like Tiles and Taglibs, can retrieve the locale and set it without knowing the pluggable strategy. So the solution itself cannot be limited to the RP chain, even though that is where it is initiated.
Paul
---------------------------------
Want to be your own boss? Learn how on Yahoo! Small Business.
Re: Thoughts on 1.3.x
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Paul Benedict wrote:
> I have two concerns on the 1.3.x line. What do you think?
>
> 1) Spring 2.0 has fabulous support for dependency injection for Struts. In particular, the great Autowiring(Tiles)RequestProcessor will automatically inject dependencies into the actions as they are created. This supports the "legacy" RequestProcessor and I have no personal plans to depart from its use. So my question today is: does the RP in 1.3 function just as it did in 1.2? If not, I may not want to upgrade to 1.3.x until it does.
I would be willing to bet good money that in 1.3, you could integrate
with Spring trivially easily without having to worry about an RP... just
modify the chain to inject the dependencies after the Action is
instantiated (I don't know the Commands in the chain off the top of my
head, so I can't be any more specific than that).
AFAIK, the "RP" in 1.3 does ultimately function the same as is 1.2, it
just performs that set of functions in a wholly different way. It's a
way that should make a lot of what you and Michael are talking about
rather easy to implement without actually changing any core Struts
code... that is in a nutshell the main reason for moving to the
CoR-based RP (there's probably other reasons, but I suspect that's the
most important one).
> 2) I learned the tough way that it is [a] impossible to write a stateless application in Struts and [b] use Struts' locality features at the same time. This is because Struts only stores the locale in the session, and there is no way (currently) to move that into a cookie, or into request scope. I found scattered code among RequestProcessor, RequestUtils and TaglibUtils which look only into the session for the current locale.
I can't say for sure, but again, I'd bet on the power of the chain :)
Incidentally, it's not so much the CoR pattern that's helpful here, it's
the basic idea that small units of work are loosely coupled to form a
larger processing cycle. That's where the true power comes from. You
could implement that same thing without CoR (although arguably it'd
still be CoR anyway).
> Paul
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Ted Husted <hu...@apache.org>.
On 6/30/06, Alexandru Popescu <th...@gmail.com> wrote:
> I am not sure I understand this proposal. As far as I know this is
> already supported by WW and quite nicely. So, why would we want to add
> just another dependency?
Well,
Naill asked if Clintoo did anything that Struts 2 didn't already do well.
Jason said "Nope, we're good."
Then, the chat turned to whether we should use it with Struts 1,
because s1 doesn't do everything s2 or Clintoo can do in terms of
locale resolution. And, if we used it for s1 (the logic went) should
we use it for s2?
At which point, Ted and Alex said, "s2 ain't broke."
My suggestion would be that if we want to do something different or
better with the Struts 1 locale resolution, then we should look
inhouse to s2 first, before (as Jason said) adopting someone else's
1.0 release.
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Alexandru Popescu <th...@gmail.com>.
I am not sure I understand this proposal. As far as I know this is
already supported by WW and quite nicely. So, why would we want to add
just another dependency?
./alex
--
.w( the_mindstorm )p.
---
(http://themindstorms.blogspot.com)
On 6/30/06, Don Brown <mr...@twdata.org> wrote:
> If Struts 1 decided to go with Cintoo, I think it would be good for Struts 2 to
> adopt it as well, as it would make migration easier, and reduce the number of
> differences between the two versions. I'd like to take that approach with other
> areas like validation and annotations in the future.
>
> Don
>
> Niall Pemberton wrote:
> > On 6/30/06, Paul Benedict <pa...@yahoo.com> wrote:
> >> Joe Germuska <Jo...@Germuska.com> wrote:That said, I don't think you
> >> should not do the work you describe,
> >> just because you may have to leave the Localizer (or whatever you
> >> call it) in the ServletContext under a well known key. It's just
> >> that it feels so outdated!
> >>
> >> Here's my solution. Unless anyone feels strongly about it, I am going
> >> to open up a ticket and submit my patch.
> >>
> >> 1) I am going to retain the Globals.LOCAL_KEY as the constant for
> >> session-strategy localization. Previous applications will continue
> >> using this without a problem.
> >>
> >> 2) I am going to add a LOCAL_RESOLVER_KEY constant which returns an
> >> object that implements these methods:
> >>
> >> Locale resolveLocale(HttpServletRequest request);
> >>
> >>
> >> void setLocale(HttpServletRequest request, HttpServletResponse
> >> response, Locale locale);
> >>
> >>
> >> These methods will not be of any interface. The resolver object can be
> >> any class which implements those two methods, and I will use BeanUtils
> >> to retrieve them. The reason I am choosing this design over an
> >> interface is because I want to plug in implementations from any
> >> framework (like Struts2 or Spring) without requiring an adapter
> >> interface. At most, the adapter interface would be just a pass-through
> >> and so it has questionable value.
> >>
> >> 3) Modify RequestUtils.getUserLocale to lookup the stategy first and
> >> use it. RequestUtils will have a pre-built strategy for doing session
> >> look-up, to implement requirement #1 (see above).
> >>
> >> 4) Modify Action.get/setLocale to delegate to the locale strategy. The
> >> retrieval of the strategy will most likely be in RequestUtils.
> >>
> >> If this works right, I should be able to punch to bridge Struts 1,
> >> Struts 2, and Spring all behind the scenes. For those developing
> >> Struts 2, do you have any class which comes close to the above? I'd
> >> like to coordinate with you so that Struts1-Struts2 apps can bridge
> >> localization in the 2.0.0 release.
> >
> > I had a quick peek at Cintoo messages today (Apache 2 license) -
> > initial impression was its a nice implementation for i18n. They use
> > ThreadLocale to store the Locale which makes it available everywhere.
> > I believe that approach has been used by the ww guys and from memory I
> > think there are similar concepts for configuring resources
> > (packaging). It would interesting to hear one of the WW guys if they
> > had time to look at it. Perhaps we can use it to do the job Commons
> > Resources was intended for.
> >
> > Anyway I digress, this would be one way of making Locale available all
> > over the place (messages, validation, tiles) without necessarily
> > changing the API.
> >
> > http://messages.cintoo.org/
> > http://www.theserverside.com/news/thread.tss?thread_id=41116
> > http://www.infoq.com/news/Cintoo-Messages-1.0-i18n
> >
> > Niall
> >
> > P.S. don't look at the cintoo site using IE - its a mess - OK in firefox
> > though.
> >
> >> I am targetting 1.3.6+
> >>
> >> Paul
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Ted Husted <hu...@apache.org>.
I created a ticket for this thread, so that we can pick it up after 1.3.5.
* http://issues.apache.org/struts/browse/STR-2897
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Martin Cooper <ma...@apache.org>.
On 6/30/06, Paul Benedict <pa...@yahoo.com> wrote:
>
> What does Clintoo do that standard ThreadLocal cannot? I am trying to
> understand the benefit here of this package.
For one thing, it introduces funky syntax that I personally dislike. ;-)
Using '$' and '_' as method names isn't my idea of clarity in programming.
--
Martin Cooper
Ted Husted <hu...@apache.org> wrote: Yes, but we should let one framework
> go first, and prove something
> works in practices, before adopting something new in both
>
> On 6/30/06, Don Brown wrote:
> > If Struts 1 decided to go with Cintoo, I think it would be good for
> Struts 2 to
> > adopt it as well, as it would make migration easier, and reduce the
> number of
> > differences between the two versions. I'd like to take that approach
> with other
> > areas like validation and annotations in the future.
>
> I might amend that to say if Struts 1 decides to go with Cllntoo, and
> we ship a stable release or two with Clintoo, and we decide we really
> like Cintoo, then, sure, we would want to consider it for Struts 2.x
> as well. But, there's no reason to rush both frameworks to judgment.
>
> Of course, we should try to stablize the feature set between s1 and
> s2. We added wildcards to s2, and I'm sure we will find some other
> things to add next month too.
>
> At the same time, we should look for things we can backport to s1. One
> thing Michael mentioned on the rough spots page was better POJO
> support for s1.
>
> * http://wiki.apache.org/struts/SAF1RoughSpots
>
> -Ted.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call
> rates.
>
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Paul Benedict <pa...@yahoo.com>.
What does Clintoo do that standard ThreadLocal cannot? I am trying to understand the benefit here of this package.
Ted Husted <hu...@apache.org> wrote: Yes, but we should let one framework go first, and prove something
works in practices, before adopting something new in both
On 6/30/06, Don Brown wrote:
> If Struts 1 decided to go with Cintoo, I think it would be good for Struts 2 to
> adopt it as well, as it would make migration easier, and reduce the number of
> differences between the two versions. I'd like to take that approach with other
> areas like validation and annotations in the future.
I might amend that to say if Struts 1 decides to go with Cllntoo, and
we ship a stable release or two with Clintoo, and we decide we really
like Cintoo, then, sure, we would want to consider it for Struts 2.x
as well. But, there's no reason to rush both frameworks to judgment.
Of course, we should try to stablize the feature set between s1 and
s2. We added wildcards to s2, and I'm sure we will find some other
things to add next month too.
At the same time, we should look for things we can backport to s1. One
thing Michael mentioned on the rough spots page was better POJO
support for s1.
* http://wiki.apache.org/struts/SAF1RoughSpots
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
---------------------------------
How low will we go? Check out Yahoo! MessengerÂ’s low PC-to-Phone call rates.
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Ted Husted <hu...@apache.org>.
Yes, but we should let one framework go first, and prove something
works in practices, before adopting something new in both
On 6/30/06, Don Brown <mr...@twdata.org> wrote:
> If Struts 1 decided to go with Cintoo, I think it would be good for Struts 2 to
> adopt it as well, as it would make migration easier, and reduce the number of
> differences between the two versions. I'd like to take that approach with other
> areas like validation and annotations in the future.
I might amend that to say if Struts 1 decides to go with Cllntoo, and
we ship a stable release or two with Clintoo, and we decide we really
like Cintoo, then, sure, we would want to consider it for Struts 2.x
as well. But, there's no reason to rush both frameworks to judgment.
Of course, we should try to stablize the feature set between s1 and
s2. We added wildcards to s2, and I'm sure we will find some other
things to add next month too.
At the same time, we should look for things we can backport to s1. One
thing Michael mentioned on the rough spots page was better POJO
support for s1.
* http://wiki.apache.org/struts/SAF1RoughSpots
-Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Don Brown <mr...@twdata.org>.
If Struts 1 decided to go with Cintoo, I think it would be good for Struts 2 to
adopt it as well, as it would make migration easier, and reduce the number of
differences between the two versions. I'd like to take that approach with other
areas like validation and annotations in the future.
Don
Niall Pemberton wrote:
> On 6/30/06, Paul Benedict <pa...@yahoo.com> wrote:
>> Joe Germuska <Jo...@Germuska.com> wrote:That said, I don't think you
>> should not do the work you describe,
>> just because you may have to leave the Localizer (or whatever you
>> call it) in the ServletContext under a well known key. It's just
>> that it feels so outdated!
>>
>> Here's my solution. Unless anyone feels strongly about it, I am going
>> to open up a ticket and submit my patch.
>>
>> 1) I am going to retain the Globals.LOCAL_KEY as the constant for
>> session-strategy localization. Previous applications will continue
>> using this without a problem.
>>
>> 2) I am going to add a LOCAL_RESOLVER_KEY constant which returns an
>> object that implements these methods:
>>
>> Locale resolveLocale(HttpServletRequest request);
>>
>>
>> void setLocale(HttpServletRequest request, HttpServletResponse
>> response, Locale locale);
>>
>>
>> These methods will not be of any interface. The resolver object can be
>> any class which implements those two methods, and I will use BeanUtils
>> to retrieve them. The reason I am choosing this design over an
>> interface is because I want to plug in implementations from any
>> framework (like Struts2 or Spring) without requiring an adapter
>> interface. At most, the adapter interface would be just a pass-through
>> and so it has questionable value.
>>
>> 3) Modify RequestUtils.getUserLocale to lookup the stategy first and
>> use it. RequestUtils will have a pre-built strategy for doing session
>> look-up, to implement requirement #1 (see above).
>>
>> 4) Modify Action.get/setLocale to delegate to the locale strategy. The
>> retrieval of the strategy will most likely be in RequestUtils.
>>
>> If this works right, I should be able to punch to bridge Struts 1,
>> Struts 2, and Spring all behind the scenes. For those developing
>> Struts 2, do you have any class which comes close to the above? I'd
>> like to coordinate with you so that Struts1-Struts2 apps can bridge
>> localization in the 2.0.0 release.
>
> I had a quick peek at Cintoo messages today (Apache 2 license) -
> initial impression was its a nice implementation for i18n. They use
> ThreadLocale to store the Locale which makes it available everywhere.
> I believe that approach has been used by the ww guys and from memory I
> think there are similar concepts for configuring resources
> (packaging). It would interesting to hear one of the WW guys if they
> had time to look at it. Perhaps we can use it to do the job Commons
> Resources was intended for.
>
> Anyway I digress, this would be one way of making Locale available all
> over the place (messages, validation, tiles) without necessarily
> changing the API.
>
> http://messages.cintoo.org/
> http://www.theserverside.com/news/thread.tss?thread_id=41116
> http://www.infoq.com/news/Cintoo-Messages-1.0-i18n
>
> Niall
>
> P.S. don't look at the cintoo site using IE - its a mess - OK in firefox
> though.
>
>> I am targetting 1.3.6+
>>
>> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Niall Pemberton <ni...@gmail.com>.
On 6/30/06, Paul Benedict <pa...@yahoo.com> wrote:
> Joe Germuska <Jo...@Germuska.com> wrote:That said, I don't think you should not do the work you describe,
> just because you may have to leave the Localizer (or whatever you
> call it) in the ServletContext under a well known key. It's just
> that it feels so outdated!
>
> Here's my solution. Unless anyone feels strongly about it, I am going to open up a ticket and submit my patch.
>
> 1) I am going to retain the Globals.LOCAL_KEY as the constant for session-strategy localization. Previous applications will continue using this without a problem.
>
> 2) I am going to add a LOCAL_RESOLVER_KEY constant which returns an object that implements these methods:
>
> Locale resolveLocale(HttpServletRequest request);
>
>
> void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale);
>
>
> These methods will not be of any interface. The resolver object can be any class which implements those two methods, and I will use BeanUtils to retrieve them. The reason I am choosing this design over an interface is because I want to plug in implementations from any framework (like Struts2 or Spring) without requiring an adapter interface. At most, the adapter interface would be just a pass-through and so it has questionable value.
>
> 3) Modify RequestUtils.getUserLocale to lookup the stategy first and use it. RequestUtils will have a pre-built strategy for doing session look-up, to implement requirement #1 (see above).
>
> 4) Modify Action.get/setLocale to delegate to the locale strategy. The retrieval of the strategy will most likely be in RequestUtils.
>
> If this works right, I should be able to punch to bridge Struts 1, Struts 2, and Spring all behind the scenes. For those developing Struts 2, do you have any class which comes close to the above? I'd like to coordinate with you so that Struts1-Struts2 apps can bridge localization in the 2.0.0 release.
I had a quick peek at Cintoo messages today (Apache 2 license) -
initial impression was its a nice implementation for i18n. They use
ThreadLocale to store the Locale which makes it available everywhere.
I believe that approach has been used by the ww guys and from memory I
think there are similar concepts for configuring resources
(packaging). It would interesting to hear one of the WW guys if they
had time to look at it. Perhaps we can use it to do the job Commons
Resources was intended for.
Anyway I digress, this would be one way of making Locale available all
over the place (messages, validation, tiles) without necessarily
changing the API.
http://messages.cintoo.org/
http://www.theserverside.com/news/thread.tss?thread_id=41116
http://www.infoq.com/news/Cintoo-Messages-1.0-i18n
Niall
P.S. don't look at the cintoo site using IE - its a mess - OK in firefox though.
> I am targetting 1.3.6+
>
> Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Localization Bridge (was Re: Thoughts on 1.3.x)
Posted by Paul Benedict <pa...@yahoo.com>.
Joe Germuska <Jo...@Germuska.com> wrote:That said, I don't think you should not do the work you describe,
just because you may have to leave the Localizer (or whatever you
call it) in the ServletContext under a well known key. It's just
that it feels so outdated!
Here's my solution. Unless anyone feels strongly about it, I am going to open up a ticket and submit my patch.
1) I am going to retain the Globals.LOCAL_KEY as the constant for session-strategy localization. Previous applications will continue using this without a problem.
2) I am going to add a LOCAL_RESOLVER_KEY constant which returns an object that implements these methods:
Locale resolveLocale(HttpServletRequest request);
void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale);
These methods will not be of any interface. The resolver object can be any class which implements those two methods, and I will use BeanUtils to retrieve them. The reason I am choosing this design over an interface is because I want to plug in implementations from any framework (like Struts2 or Spring) without requiring an adapter interface. At most, the adapter interface would be just a pass-through and so it has questionable value.
3) Modify RequestUtils.getUserLocale to lookup the stategy first and use it. RequestUtils will have a pre-built strategy for doing session look-up, to implement requirement #1 (see above).
4) Modify Action.get/setLocale to delegate to the locale strategy. The retrieval of the strategy will most likely be in RequestUtils.
If this works right, I should be able to punch to bridge Struts 1, Struts 2, and Spring all behind the scenes. For those developing Struts 2, do you have any class which comes close to the above? I'd like to coordinate with you so that Struts1-Struts2 apps can bridge localization in the 2.0.0 release.
I am targetting 1.3.6+
Paul
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
Re: Thoughts on 1.3.x
Posted by Joe Germuska <Jo...@Germuska.com>.
At 5:34 PM -0700 6/28/06, Paul Benedict wrote:
>I have two concerns on the 1.3.x line. What do you think?
>
>1) Spring 2.0 has fabulous support for dependency injection for
>Struts. In particular, the great Autowiring(Tiles)RequestProcessor
>will automatically inject dependencies into the actions as they are
>created. This supports the "legacy" RequestProcessor and I have no
>personal plans to depart from its use. So my question today is: does
>the RP in 1.3 function just as it did in 1.2? If not, I may not want
>to upgrade to 1.3.x until it does.
You can use an AutowiringRequestProcessor in Struts 1.3, but you will
not gain any behavior which has only been implemented in commands
since Struts 1.2. Specifically, any action mapping or forward
mapping can specify a chain command which should be executed as part
of processing.
As far as I can remember (but don't bet money), none of the other
major functional changes in 1.3 are in the chain commands only. You
could probably go for a while using some other subclass of
RequestProcessor instead of ComposableRequestProcessor, but I think
everyone is on board in general with deprecating the original request
processing functionality, so over time, this statement is likely to
become less true.
Also, as Frank noted, it is pretty easy to write custom commands that
get actions in a different way, and in fact, in general, the whole
point of this is that it is much easier now to make changes to the
request processing cycle without having to have an infinite
combination of request processor classes which all have different
lineages depending on whether you want or don't want Tiles
processing, want or don't want X, want or don't want Y, etc.
Admittedly, if lots of people embrace casually changing the RP chain,
we will have some work to do in making that a little more
straightforward, but it's far from a huge burden now.
>2) I learned the tough way that it is [a] impossible to write a
>stateless application in Struts and [b] use Struts' locality
>features at the same time. This is because Struts only stores the
>locale in the session, and there is no way (currently) to move that
>into a cookie, or into request scope. I found scattered code among
>RequestProcessor, RequestUtils and TaglibUtils which look only into
>the session for the current locale.
>
>I propose (and I will write this) that we allow pluggable
>implementations into how to store the locale. It will be defaulted
>into the session, with other pluggable implementations provided.
>However (sorry fans of CoR) this implementation must be wrapped into
>a bean so that other libraries, like Tiles and Taglibs, can retrieve
>the locale and set it without knowing the pluggable strategy. So the
>solution itself cannot be limited to the RP chain, even though that
>is where it is initiated.
I don't see any problem with that. Being a fan of the composable
request processor isn't the same as being a zealot who wants the CRP
to do everything!
I think this just raises one of the fundamental weaknesses of Struts
1.x - the lack of a dependency injection management system leaves the
process of setting up services for use by multiple components in a
fragile and awkward state. I have really soured on the idea that
everything should just be thrown into the ServletContext to be found
by whomever needs it.
That said, I don't think you should not do the work you describe,
just because you may have to leave the Localizer (or whatever you
call it) in the ServletContext under a well known key. It's just
that it feels so outdated!
Joe
--
Joe Germuska
Joe@Germuska.com * http://blog.germuska.com
"You really can't burn anything out by trying something new, and
even if you can burn it out, it can be fixed. Try something new."
-- Robert Moog
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Thoughts on 1.3.x
Posted by Michael Jouravlev <jm...@gmail.com>.
Paul, not related to your issues (and I do not have answer/opinion on
them), but more related to the message header: see more 1.3
issues/features/questions here:
http://wiki.apache.org/struts/SAF1RoughSpots
I don't know what is the best place to discuss all this stuff, here or
in Wiki. I am ok with either.
About sessions and pluggable implementations. I was thinking about
borrowing FlashScope idea from Tapestry/Stripes. But you have
generalized it, making it just pluggable storage. This is definetely
something to think about!
Stuff like FlashScope will help primarily implementing
Redirect-After-Post (sure, what else can I think of) with greater
ease.
Also, ASP.NET has SQL database scope. Basically just MS SQL database
configured for temp entries with automatic removal of
orphaned/obsoleted entries. This is also something to consider.
On 6/28/06, Paul Benedict <pa...@yahoo.com> wrote:
> I have two concerns on the 1.3.x line. What do you think?
>
> 1) Spring 2.0 has fabulous support for dependency injection for Struts. In particular, the great Autowiring(Tiles)RequestProcessor will automatically inject dependencies into the actions as they are created. This supports the "legacy" RequestProcessor and I have no personal plans to depart from its use. So my question today is: does the RP in 1.3 function just as it did in 1.2? If not, I may not want to upgrade to 1.3.x until it does.
>
> 2) I learned the tough way that it is [a] impossible to write a stateless application in Struts and [b] use Struts' locality features at the same time. This is because Struts only stores the locale in the session, and there is no way (currently) to move that into a cookie, or into request scope. I found scattered code among RequestProcessor, RequestUtils and TaglibUtils which look only into the session for the current locale.
>
> I propose (and I will write this) that we allow pluggable implementations into how to store the locale. It will be defaulted into the session, with other pluggable implementations provided. However (sorry fans of CoR) this implementation must be wrapped into a bean so that other libraries, like Tiles and Taglibs, can retrieve the locale and set it without knowing the pluggable strategy. So the solution itself cannot be limited to the RP chain, even though that is where it is initiated.
>
> Paul
>
>
>
> ---------------------------------
> Want to be your own boss? Learn how on Yahoo! Small Business.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org