| Apache Cayenne > Index > Cayenne FAQ > Web Application Environments |
Cayenne is agnostic in respect to the view technology. Almost any Java application can take advantage of Cayenne. Web applications are no exception. JSP, Struts, JSF, Spring, Tapestry, WebWork, Click or any other concievable Java web technology will work just fine with Cayenne.
Cayenne provides standard deployment procedure
for the web container environment. As this procedure is based on the Java Servlet Specification standard, it works for all of the frameworks above. In addition Cayenne Examples page contains a number of samples showing various tricks for smoother integration with specific framework lifecycles and object serialization techniques. Also Click
framework has a special form control
to build editors of Cayenne DataObjects.
I've successfully used Cayenne with Tapestry 4. My general pattern is to store a Cayenne DataContext in a Tapestry session object and request that DataContext across my pages to perform database operations. I also generally use the volatile="ognl:true" parameter on the @For component to prevent Cayenne objects from being serialized into the HTML page. Some suggest using a Tapestry DataSqueezer (the Tapestry wiki has examples for Cayenne), but I prefer to not use that technique because the DataSqueezer includes database primary keys in the HTML and those can be forged on the return trip into the web application, which can be a potential data security issue (one shouldn't include database keys on hyperlinks, either). -
Michael Gentry