Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Apache Cayenne in a Web App

934 views

Published on

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

Apache Cayenne in a Web App

  1. 1. Apache Cayenne in a Web App(practical demonstration)by Andrus Adamchik, ObjectStyle LLC
  2. 2. Building a CMS
  3. 3. CMS: HTML appTapestry stack
  4. 4. CMS: HTML appInitial schema
  5. 5. HTML App - Goals• Setup a dev environment• Setup a Tapestry webapp project• Create Cayenne mapping• Build web UI tied to persistent backend
  6. 6. HTML App(demo)
  7. 7. HTML App - Takeaway• Vagrant is a helpful tool to maintain the dev env• Cayenne works ;)• Between CayenneModeler and Maven we can quickly make ORMmodel changes and synchronize them both ways - to DB and Java• Tapestry is a decent component web framework that alsoprovides an easy to use DI• Organizing backend into injectable services encapsulates third-party sub-systems (Cayenne) and our own contextual logic(determining site for the current request)
  8. 8. CMS: REST appTapestry / Jersey stack
  9. 9. REST App - Goals• Create a JAX-RS REST interface within the same application• Reuse service code between the two frontends
  10. 10. REST App(demo)
  11. 11. REST App - Takeaway• Jersey REST apps can coexist with Tapestry• Tapestry services can be injected into REST resources the sameway they are injected to pages (business logic reuse)• JAX-RS specification is high-level enough to be useful as is• Serialization is pretty basic
  12. 12. Q&AAndrus Adamchikandrus@objectstyle.comtwitter.com/andrus_a

×