开发者

Would an Atom based feed work for a "resource change log"?

I a开发者_开发知识库m working on an api requiring a service that exposes a change log for a certain type of resources. I could roll my own format but i'd like to leverage existing standards where possible. Basically each entry would have the following data :

  • A date/timestamp
  • A change description (ex. order created, order processed...etc)
  • An author of the change

You know...basic audit data.


Yes this makes a whole lot of sense. The main advantage being that there are many clients out there that would be able to consume this data immediately. There are feed reader clients on phones, on desktops, in browsers. Mail clients like Outlook can read it.

Using a standard format like this is a whole lot of win.


This is purely subjective, but I think it would work. If it is largely for machine consumption (in other words custom clients will be fetching/parsing/displaying the data) then you'd get a nice combination of easily human-debuggable (just open it in a browser) as well as easily machine-parseable.

One other suggestion that may be lighter weight might be a stream of JSON objects, similar to what the Facebook Graph API and Twitter use for their status updates. Not quite as nicely standard, but trivially consumable in HTML clients, which may make some things easier. You can parse XML but JSON is quite frankly easier for the browser environment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜