Apache Cayenne in a Web App(practical demonstration)by Andrus Adamchik, ObjectStyle LLC
Building a CMS
CMS: HTML appTapestry stack
CMS: HTML appInitial schema
HTML App - Goals• Setup a dev environment• Setup a Tapestry webapp project• Create Cayenne mapping• Build web UI tied to p...
HTML App(demo)
HTML App - Takeaway• Vagrant is a helpful tool to maintain the dev env• Cayenne works ;)• Between CayenneModeler and Maven...
CMS: REST appTapestry / Jersey stack
REST App - Goals• Create a JAX-RS REST interface within the same application• Reuse service code between the two frontends
REST App(demo)
REST App - Takeaway• Jersey REST apps can coexist with Tapestry• Tapestry services can be injected into REST resources the...
Q&AAndrus Adamchikandrus@objectstyle.comtwitter.com/andrus_a
Apache Cayenne in a Web App
Prochain SlideShare
Chargement dans…5
×

Apache Cayenne in a Web App

925 vues

Publié le

Publié dans : Technologie, Formation
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

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

×