Over a million developers have joined DZone.

Yoga: RESTful and flexible

· Java Zone

Navigate the Maze of the End-User Experience and pick up this APM Essential guide, brought to you in partnership with CA Technologies

I've been working on yoga a hybrid REST theory/practice framework that "rests" on top of other Java REST MVC frameworks. The core of the framework is a custom rendering engine that converts POJOs to the user's desired representation. The guiding principles we used were:

  1. User defined "traversal" of objects (for example, only show a specific "tree" from an ORMed POJO)
  2. Plug-and-play representations
  3. Content Negotiation is more than just format, it's about content as well.
  4. NO DTOs!
  5. Links should provide a mechanism to get additional information
  6. Create a surfable API (as seen in Dr. Jon Moore's Hypermedia APIs talk)
  7. Allow flexibility to specify the "view" they care about - which will allow the user to reduce N+1 chattiness that so many REST systems have. - inspired by LinkedIn’s JavaOne presentation on building flexible REST interfaces.
  8. User code and integration should be as simple as possible.
  9. Allow for "augmentation" of the response data outside of the POJO
  10. Focus on documentation
  11. Showcase the runtime

We've done quite a bit of work to achieve the current state. The next steps include some additions of metadata and a UI that can "surf" that metadata.

Feedback would be greatly appreciated. We don't have a "real life" usage of Yoga yet, but will gladly support a "real life" endeavor


From http://www.jroller.com/Solomon/entry/yoga_restful_and_flexible

Thrive in the application economy with an APM model that is strategic. Be E.P.I.C. with CA APM.  Brought to you in partnership with CA Technologies.


The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}