Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Yoga: RESTful and flexible

DZone's Guide to

Yoga: RESTful and flexible

· Java Zone
Free Resource

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

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

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
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.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}