incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Incubator Wiki] Update of "xap/XAPStruts" by Robert Buffone
Date Fri, 02 Mar 2007 03:48:54 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Incubator Wiki" for change notification.

The following page has been changed by Robert Buffone:
http://wiki.apache.org/incubator/xap/XAPStruts

------------------------------------------------------------------------------
  
  This page describes how to integrate [http://incubator.apache.org/xap Apache XAP] with [http://struts.apache.org
Struts2]. I use the Person Manager struts sample to illustrate how to upgrade an html application
to use XAP. Overall the integration is quite simple.  I was able to repurpose all of the Java
code (Data Model, ActionHandlers) from the sample.  All that needed to be done was to re-write
the *.ftl files to output a combination of ''xModify'' and ''XAL'' instead of html.
  
- I have uploaded a zip file of the converted Person Manager application to my people directory.
 [http://people.apache.org/~bbuffone/share/xap-struts-example.zip Download the XAP Person
Manager Code]  To run the code unzip the archive ontop of the an exploded version of the struts2-showcase-2.0.6.war.
 You can then run the sample by going to http://<server-address>:<port>/struts2-showcase-2.0.6/xap/ajax-index.html
+ I have uploaded a zip file of the converted Person Manager application to my people directory.
 [http://people.apache.org/~bbuffone/share/xap-struts-example.zip Download the XAP Person
Manager Code]  To run the code unzip the archive ontop of an exploded version of the struts2-showcase-2.0.6.war.
 You can then run the sample by going to http://<server-address>:<port>/struts2-showcase-2.0.6/xap/ajax-index.html
  
  The reason why integration with web frameworks is so easy, is that the XAP client retrieves
the markup used to describe the application from the server and then renders it entirely on
the client.  This is the opposite of other Ajax toolkits where:
  
- *You either are responsible for moving data from the server to the client using XHR and
updating the UI with JavaScript code
+ *You either are responsible for moving data from the server to the client using XHR and
updating the UI with JavaScript code or
  
  *The markup is down convert into HTML and JavaScript on the server as in some JSF implementation.
  
- By rendering the markup on the client the developer can reuse alot of existing code they
already have in there application.  Most of the time the Model and the controller code is
reused.  This leave developers to only change the view layer of their application.  This is
exactly what I did in the conversion of the Person Manager Sample.
+ By rendering the markup on the client, the developer can reuse alot of existing code they
already have in their application.  Most of the time the Model and Controller code is reused.
 This leave developers to only change the view layer of their application.  This is exactly
what I did in the conversion of the Person Manager Sample.
  
- Another reason that integration is fairly seamless with web frameworks is that XAP communicates
with the server in the same manner that a HTML application does through the use of HTTP get
and posts.  
+ Another reason that integration is fairly seamless with web frameworks is that XAP communicates
with the server in the same manner that a HTML application does, which is through the use
of HTTP get and posts.  
  
- == Sample Walk Through ==
+ == Sample Files ==
  
  In the example there are the following files
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message