Yoga: RESTful and flexible
Join the DZone community and get the full member experience.
Join For FreeI'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:
- User defined "traversal" of objects (for example, only show a specific "tree" from an ORMed POJO)
- Plug-and-play representations
- Content Negotiation is more than just format, it's about content as well.
- NO DTOs!
- Links should provide a mechanism to get additional information
- Create a surfable API (as seen in Dr. Jon Moore's Hypermedia APIs talk)
- 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.
- User code and integration should be as simple as possible.
- Allow for "augmentation" of the response data outside of the POJO
- Focus on documentation
- 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
Opinions expressed by DZone contributors are their own.
Comments