Apache Cayenne in a Web App

918 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
918
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

×