format

From IndieWeb
(Redirected from formats)


A format typically refers to a "data format", a defined way of representing information, and a key building block of the IndieWeb.

On the IndieWeb the following formats are in wide use:

FAQ

Why formats instead of APIs

Q: With so many companies publishing APIs for their services, why work on and support formats instead of APIs?

A: APIs are ephemeral froth. They appear, break, disappear just like waves on the beach. If you want to build something that lasts, formats tend to last much longer, get archived, etc. If you build your site/app dependent on APIs, they and your site will inevitably break, likely within a year if not sooner.

When is a protocol better

Q: If the preference is to publish and consume formats for functionality, when (if ever) is it better to use (create if necessary) a protocol?

A: Protocols (including APIs) in general are an optional layer on top of formats. If they disappear, all the content should still "work".

That being said, protocols are useful for realtime communication such as notifications (e.g. Webmention, PuSH).

Protocols should be as minimal as possible and focus on being based only on URLs if possible with more information (as needed) present at those URLs published in open formats. E.g. Webmention works this way, no XML needed, just a couple of URL parameters, and all the rest of the information (e.g. in-reply-to) is present at those URLs.

See Also