|
From: March, A. <am...@so...> - 2005-04-21 17:01:41
|
Thanks for the reply. I am interested in webflow but wow there is a lot of stuff in there. I was not sure that it was focused on multiple actions per request. I thought it was generally for multipage actions. Good to hear that it has that capability. I will take another look. It seems like a little overkill for what I need to do. Basically I just want to call 1-to-many service methods for a single request. I want to be able to configure this in the app-context preferably, so that I don't have to create a controller for every request. I opened SPR-871 to track this stuff. I attached some code that basically does what I want but is kinda ugly. =20 Then I thought it would be simpler if multiple controllers/handlers could be specified for each request. I could easily make a generic controller bean that would have a property to know which service method to call and would just stick the result in the model. At the end of all those, a final controller would return the ModelAndView. I guess it would be nice to use webflow if it already has this capability but I hope it is not too much trouble to set up. =20 Thoughts?=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Seth Ladd > Sent: Wednesday, April 20, 2005 7:08 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Any plans to add support for > multiple handlers per request >=20 > > Any plans to add support for multiple handlers per request? Any > > architectural reasons for not doing this? For what I'm doing, > interceptors > > really do not suit my needs. >=20 > Have you looked at Web Flows for this? It's quite easy to string > together many actions in a flow before you end up at your view state. >=20 > As for the MVC world, you could write a HandlerInterceptor that merely > delegates to a Controller (your handler). What part of the > interceptor is falling short of your needs? >=20 > Seth >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: New Crystal Reports XI. > Version 11 adds new functionality designed to reduce time involved in > creating, integrating, and deploying reporting solutions. Free runtime > info, > new features, or free trial, at: http://www.businessobjects.com/devxi/728 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: March, A. <am...@so...> - 2005-04-21 18:54:53
|
> -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Seth Ladd > Sent: Thursday, April 21, 2005 11:13 AM > To: spr...@li... > Subject: Re: [Springframework-developer] Any plans to add support for > multiple handlers per request >=20 > On 4/21/05, March, Andres <am...@so...> wrote: > > Thanks for the reply. I am interested in webflow but wow there is a lot > > of stuff in there. I was not sure that it was focused on multiple > > actions per request. I thought it was generally for multipage actions. >=20 > Using webflow, you would configure multiple <action>'s to string > together, finally landing on a <view>. So it's a simple way to model > a flow diagram (often coming from management) as a webflow workflow. > It's actually very simple to setup. If you understand Spring MVC then > setting up webflow will be very straight forward. Cool! >=20 > > Basically I just want to call 1-to-many service methods for a single > > request. I want to be able to configure this in the app-context > > preferably, so that I don't have to create a controller for every > > request. I opened SPR-871 to track this stuff. I attached some code > > that basically does what I want but is kinda ugly. >=20 > Ahh... so you want to bind N service calls directly to a request > without a controller? How would you marshall request parameters into > the service layer and back? This is the job for the controller, imho. > So the controller is pretty thin, but does glue my service layer to > the web mvc world. Definitely the dealing with request parameters is the toughest part but not insurmountable. And if you have hundreds of requests that just return some data, it is well worth the time. I think the Binder can solve many of these problem. The main type of binder I'm interested in is one that basically creates a HashMap derived object to represent the query parameters. This would be able to support multivalued, ranges, and other constraints. But other binders could be configurable that could handle any type of service method parameters. Although I think the QueryBinder I created is great for many and complex parameters, a Binder could be written that inspects the method signature and works the same way the command objects are bound. Anyway this could be a long conversation but I hope this type of thing is valuable to more than just me. I already have written stuff for our needs but making it more generic for others would be nice.=20 >=20 > If this is what you want, webflow will still require you to write an > Action method for each step along the way. >=20 > > > > Then I thought it would be simpler if multiple controllers/handlers > > could be specified for each request. I could easily make a generic > > controller bean that would have a property to know which service method > > to call and would just stick the result in the model. At the end of all > > those, a final controller would return the ModelAndView. >=20 > Again, how do you know what the method parameters would be for each > service call? A binder implementation like I describe above. >=20 > > > > I guess it would be nice to use webflow if it already has this > > capability but I hope it is not too much trouble to set up. >=20 > Now that you have explained this, webflow (afaik) does not have > exactly this feature. You will still need to write a method that > handles the Action, taking a RequestContext and returning an Event. >=20 I know there would be some work to do but I guess I'm looking for the best extension point and if it is useful to others. I'd much rather use something more people work on then just me. I tend to have bugs in my code ;) I have run across this problem often but I guess if most of your app deals with POSTs, then this type of thing would not be of much use. I think large reporting applications would be a good example of when this functionality would be useful. > Seth >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer |
|
From: Seth L. <set...@gm...> - 2005-04-21 18:12:55
|
On 4/21/05, March, Andres <am...@so...> wrote: > Thanks for the reply. I am interested in webflow but wow there is a lot > of stuff in there. I was not sure that it was focused on multiple > actions per request. I thought it was generally for multipage actions. Using webflow, you would configure multiple <action>'s to string together, finally landing on a <view>. So it's a simple way to model a flow diagram (often coming from management) as a webflow workflow.=20 It's actually very simple to setup. If you understand Spring MVC then setting up webflow will be very straight forward. > Basically I just want to call 1-to-many service methods for a single > request. I want to be able to configure this in the app-context > preferably, so that I don't have to create a controller for every > request. I opened SPR-871 to track this stuff. I attached some code > that basically does what I want but is kinda ugly. Ahh... so you want to bind N service calls directly to a request without a controller? How would you marshall request parameters into the service layer and back? This is the job for the controller, imho. So the controller is pretty thin, but does glue my service layer to the web mvc world. If this is what you want, webflow will still require you to write an Action method for each step along the way. >=20 > Then I thought it would be simpler if multiple controllers/handlers > could be specified for each request. I could easily make a generic > controller bean that would have a property to know which service method > to call and would just stick the result in the model. At the end of all > those, a final controller would return the ModelAndView. Again, how do you know what the method parameters would be for each service call? >=20 > I guess it would be nice to use webflow if it already has this > capability but I hope it is not too much trouble to set up. Now that you have explained this, webflow (afaik) does not have exactly this feature. You will still need to write a method that handles the Action, taking a RequestContext and returning an Event. Seth |
|
From: Keith D. <ke...@in...> - 2005-04-21 18:54:28
|
While webflow does indeed make chaining actions (commands) together = easy, I'm not clear if it is your best choice here or not. Is there really a workflow that spans some steps in play here? I'm not sure if multiple controllers forwarding to each other would be = the best solution here either--seems quite brittle. It seems like what you = want is a generic form of the ChainOfResponsibility pattern--maybe something similar to what commons chain does. I could see a single controller, = and behind it a chain of commands, where each command in the chain invokes = some method on a service object, and puts the return value in some context = which is add to the model. If that's what you need... -- In any case web flow is pretty easy to setup. It is powerful but not complex to use. Download PR2 and head to the Quick Start. If it = doesn't pass the 15 minute test please let us know. There are a wealth of sample applications available with the = distribution as well that should help you get up and running fast (see samples/webflow). Keith -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf = Of March, Andres Sent: Thursday, April 21, 2005 1:02 PM To: spr...@li... Subject: RE: [Springframework-developer] Any plans to add support for multiple handlers per request Thanks for the reply. I am interested in webflow but wow there is a lot of stuff in there. I was not sure that it was focused on multiple actions per request. I thought it was generally for multipage actions. Good to hear that it has that capability. I will take another look. It seems like a little overkill for what I need to do. Basically I just want to call 1-to-many service methods for a single request. I want to be able to configure this in the app-context preferably, so that I don't have to create a controller for every request. I opened SPR-871 to track this stuff. I attached some code that basically does what I want but is kinda ugly. =20 Then I thought it would be simpler if multiple controllers/handlers could be specified for each request. I could easily make a generic controller bean that would have a property to know which service method to call and would just stick the result in the model. At the end of all those, a final controller would return the ModelAndView. I guess it would be nice to use webflow if it already has this capability but I hope it is not too much trouble to set up. =20 Thoughts?=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] On Behalf > Of Seth Ladd > Sent: Wednesday, April 20, 2005 7:08 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Any plans to add support for > multiple handlers per request >=20 > > Any plans to add support for multiple handlers per request? Any > > architectural reasons for not doing this? For what I'm doing, > interceptors > > really do not suit my needs. >=20 > Have you looked at Web Flows for this? It's quite easy to string > together many actions in a flow before you end up at your view state. >=20 > As for the MVC world, you could write a HandlerInterceptor that merely > delegates to a Controller (your handler). What part of the > interceptor is falling short of your needs? >=20 > Seth >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: New Crystal Reports XI. > Version 11 adds new functionality designed to reduce time involved in > creating, integrating, and deploying reporting solutions. Free runtime > info, > new features, or free trial, at: http://www.businessobjects.com/devxi/728 > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |