BT

The Value Of Atom?

by Mark Little on Oct 08, 2008 |
In response to How to GET a Cup of Coffee, Bill Burke, one of the main developers of RESTeasy, (a JAX-RS implementation), says:
The values of Atom haven't really clicked with me yet. In this particular example how is it better than something like "multipart/*". On your client or server, you have the added complexity of having to support the Atom XML interaction format. With multipart, we can have the same information(through Location, Content-Location, and Content-Type headers) in a much more condensed format.
Even better than multipart, why not just send back a comma delimited list of order URIs?
One of the things (but not the only thing) that attracted me to REST was that you could focus on the data format you were exchanging between your services and not tunnel your interactions with a intermediary protocol. So far, Atom to me is just a sexier replacement to SOAP.
Bill de hOra tries to help answer the question from (the other) Bill by outlining the 7 important aspects of Atom for him:
  1. atom:id
  2. atom:updated
  3. atom:link
  4. the extension rules (mustIgnore, foreign markup)
  5. the date construct rules
  6. the content encoding rules
  7. unordered elements
According to Bill (de hOra), the problem with SOAP (only one problem?) was (is?) that "the minimum envelope defined nothing, the extension rules took the wrong default [mustUnderstand] and content encoding was left as an exercise."

He then concludes with how these principles are actually much broader applicable than Atom:
Even if you don't like Atom (or XML for that matter), if your carrier format is going to survive on the web, you need to have addressed these 7 primitives. This is what I tell people who prefer something domain specific and direct instead of trying to map the domain in abstract  formats like Atom and SOAP - square off those and you're 80% there in terms of format quality and robustness. This applies I think to any format for use over the web or in a decentralised system, not just XML. Once a sloppy data format gets into the wild, you can't just refactor the callers, you have to version. And version. And version.
And one of the earliest articles on Atom mentions that ...
... the Atom API was designed with several guiding principles in mind:
  • Well-defined data model -- with schemas and everything!
  • Doc-literal style web services, not RPC
  • Take full advantage of XML and namespaces
  • Take full advantage of HTTP
  • Secure, so no passwords in the clear
Certainly a different start to SOAP. With more and more people embracing Atom for various reasons, it certainly seems like it is the favored child of REST at the moment.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT