DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Yoga: RESTful and flexible

Yoga: RESTful and flexible

Solomon Duskis user avatar by
Solomon Duskis
·
Sep. 30, 11 · Interview
Like (2)
Save
Tweet
Share
6.44K Views

Join the DZone community and get the full member experience.

Join For Free

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

REST Web Protocols

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Best Use Java Records as DTOs in Spring Boot 3
  • AWS CodeCommit and GitKraken Basics: Essential Skills for Every Developer
  • Accelerating Enterprise Software Delivery Through Automated Release Processes in Scaled Agile Framework (SAFe)
  • How To Build an Effective CI/CD Pipeline

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: