1

I keep reading about "well defined interfaces", as here, here or here, specially when talking about microservices.

What's an example of the opposite, an interface that is not well-defined?

4
  • 2
    Please make your question self contained (i.e. cite from the articles you have linked). Commented Jun 21, 2020 at 13:19
  • 1
    This is a good topic. But πάντα ῥεῖ is correct. We don't support link only questions. See also discuss this blog. Commented Jun 21, 2020 at 14:36
  • 3
    The links aren't necessary to understand the question. They are just in support of the claim. Commented Jun 21, 2020 at 15:17
  • "whatever the server actually does" Commented Jun 23, 2020 at 16:15

1 Answer 1

8

Any interface definition that isn't specific enough to determine whether a client or service implementation conforms to it is not well-defined. Some examples:

  • unspecified character encoding (one side using utf-8 while the other uses iso8859-1)
  • unspecified number representation (decimal point versus comma)
  • implicit sequencing requirements (need to call createFooList before you can call addFoo)
  • incomplete specification of limits, constraints, semantic rules etc.

In general, if developers argue about the correct usage or implementation of an interface it's a good indicator that the interface is ill-defined (or that the developers didn't understand it, which also happens.)

Just being awkward or difficult to use doesn't make an interface ill-defined, though.

1
  • ... It makes ammending the interfaces definition to get it well-defined if even possible much more difficult though. And especially for the last part, +1 Commented Jun 21, 2020 at 16:51

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.