Develoraptor Blog


Let's Get Together and Define Some Protocols

In software, protocols are a very useful but often overlooked concept.

Having different libraries that share the same signature or interface can be very useful;

  • library developers don't have to think so much about interface design
  • library consumers don't have to learn so many APIs
  • applications have more flexible dependencies without extra logic

In Javascript, protocols are generally either defined by standards bodies (e.g. Promises and Iterators are defined by Ecma International) or become de facto standards through general usage patterns.

But there are plenty of use cases that don't have any specific protocols yet - for example filesystem browsing: the Node JS filesystem interface is different from the interface being developed for browsers. Or SQL execution: any given postgres client is likely to have a slightly different interface to an sqlite client, for example.

So there is work to be done here. Let's get together and figure it out.

Log in with Mastodon to comment.