cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam_Wal...@eFunds.com
Subject Re: Combining Cocoon with Struts Tag libs
Date Tue, 05 Feb 2002 14:08:54 GMT

Werner,

The situation is this:

1) I need to accomplish a validation of a 5 part form that is validated and
filled incrementally.
2) Take the contents of this composite form and create one xml from it's
contents.
3) Submit to a Transforming servlet that takes this xml and spits back an
xml response after retrieving info from a Mainframe app.
4a) Display xml response as a page with 6 tabs ( one page w/ layers or six
pages with links to the others)
4b) If there are errors in the response for any of the six parts it needs
to display the form with the corresponding inputs filled in for corrections
to be made.
5) Accept re-submission and re-validate
6) Submit reponse to back-end again, loop sequence.

This sequence is the bulk of the app.  There is security and other stuff,
but that is the core of it.

The debate is over performance, use of languages, and ease of support.
With performance coming at the top of that list.

One other concern I have about splitting the architecture into two servlets
is session management.  Where do I put the timeout logic is another
question I need to answer?

The developers not surprisingly are skeptic of anything that involves xml
based coding, instead of what they are comfortable with(Model 2).

I need to come up with a good reason not to use Struts.

-Adam


                                                                                         
                                                    
                      Werner Guttmann                                                    
                                                    
                      <Werner.Guttmann@morgans        To:       cocoon-users@xml.apache.org,
ldexp-dev <ldexp-dev@ms.com>, ldwebdeb@ms.com    
                      tanley.com>                     cc:                             
                                                       
                                                      Subject:  Re: Combining Cocoon with
Struts Tag libs                                     
                      06/17/02 10:53 AM                                                  
                                                    
                      Please respond to                                                  
                                                    
                      cocoon-users                                                       
                                                    
                                                                                         
                                                    
                                                                                         
                                                    




Adam,

there's a couple of alternatives you seem to have, one of them using
XMLForms
et alias to implement functionality of Struts in Cocoon. As this
functionality
has only become available in the recent past, we have taken a different
approach using the XMLizable interface of Cocoon to integrate our business
domain model with both Struts and Coccon.

In our case, an inbound HTTP request is

1) picked up by Struts, which a) populates its FormBean(s) , and b)
forwards
to a pre-configured Action for additional validation. If successful, we
then
forward control to an XSP ... in order to avoid introducing dependencies
between Struts and Cocoon, we decided to implement our own set of JavaBeans
to
keep the set of parameters as selected in the HTML form, which we attached
to
the request/session scope as attributes.

b) On Coccon receiving the HTTP request (forward), Coocon kicked in and
invoked the relevant pipeline. That pipeline uses the ServerPages generator
to
invoke an XSP that uses the following code fragment:

<xsp:logic>
   XMLizable xmlizable = new XTransformer();
</xsp:logic>

<some_entities><xsp:expr>xmlizable</xsp:expr></some_entities>

Cocoon - when processing the <xsp:exp> element - will invoke the
toSAX(ContentHandler) method on our XTransformer class, and expects this
method to insert SAX events into the event stream. In our case, for each
business entity we have a corresponding Transformer instance that uses the
aforementioned Criteria object, a business delegate and (potentially) a
value
list handler implementation to get a collection of business entities from
our
business backend, and render them to SAX events. From there on, it's
business
as usual with Cocoon executing the remainder of the pipeline.

Now, having followed some of the traffic on this list re: XMLForms, etc., I
am
under the impression that most of the stuff could (and maybe should) be
done
through the use of XMLForms, ValidatorAction, etc. Unfortunately, I have
not
had the time to evaluate the various offering (yet).

I hope this helps.
Werner



Adam_Waldal@eFunds.com wrote:

> Cocoon-Collective,
>
> I am still trying to make architecture decisions.  I have a pretty good
> understanding of both Struts and Cocoon architectures.  I have seen a
> couple of other people inquire about a hybrid solution using the
strengths
> in both.  Has anyone considered or done this successfully and seemingly
> painlessly?
>
> I guess this really comes down to a comparison of xsp vs. jsp and which
to
> use.  The other major consideration is performance, the system I need to
> build will be high traffic and transactional.  Does anyone have a similar
> situation or opinion that will help my decision process?
>
> Thanks,
> Adam
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>







---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message