--
From Down & Around, Inc.
Innovative IT Solutions
Software Architecture * Design * Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
web: www.fdar.com email [EMAIL PROTECTED] phone: 617.821.5430
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Frank W. Zammetti wrote:
On Wed, May 24, 2006 12:38 pm, Ian Roughley wrote:
There is a point that I would like to re-iterate.  The proposal is for 2
separate approaches:

#1 - Have struts2 actions accept JSON / XML content when being called
from a URI and have JSON/XML responses.  This is to allow struts2 to
interact with any ajax/XHR framework, and would involve new interceptors
and result types.

I agree that a new interceptor or two to take XML/JSON input and populate
the Action fields from it would be very nice indeed.  Would definitely be
a big productivity booster.

I wonder about the response though... one thing I've found is that people
for some reason, generally anyway, don't realize that they can use a JSP
to render an Ajax response.  Maybe all the examples they see shows the
response being constructed manually in a servlet or Action and they figure
that's what you have to do.  I mean, constructing JSON or XML in a JSP is
childs' play, and you get the benefit of being able to use all the same
tags you use to create an HTML response.  I wonder if it might be
sufficient to simply demonstrate this to people and make it more
well-known, rather than writing anything to do it specifically, and then
getting into new result types and all that?  What do you think?
True, but it would be nice if a pre-determined XML structure or JSON could be automatically generated by using the model from the ModelAware interface. It would lower the entry point for people using the feature.
#2 - Use DWR for struts2 ajax-based widgets.  This should be a tight
coupling of a UI element to a back-end function / action - i.e. get a
list of things to display in the UI.

Someone suggested to me privately integrating GWT with SAF2 for all our
widget needs... I love the work Don did to get JSF components involved,
but I wonder it GWT is the larger answer?

I sat in on the google presentation on this at J1. The feeling I get is that GWT is for constructing entire application rather than for individual components, and it ties in heavily to the custom logic. I need to look into it further though.
The way I see #2 working is this - we have a specialized DWR object that
accepts requests and calls an action (from a preconfigured package) the
same way that it does today via Http. We also introduce several new
interfaces - for example lets say AjaxList and AjaxObject.  The
specialized DWR object has several methods that can be called depending
on the type being returned (i.e. the interface that it uses to return
the result, or whether the result is rendered and returned).

This is very similar to what Alex has.  Damn it!  You guys beat me to
this ;-)

Yeah, he beat me to it too ;)  Always nice to have your theories proven
out, whether you did the work or not!

/Ian

Frank



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to