• 11 Posts
  • 1.44K Comments
Joined 2 years ago
cake
Cake day: July 7th, 2023

help-circle




  • refusal to allow useful endpoints that aren’t sufficiently restful

    And there are good reasons for that, GraphQL-like endpoints seem great to use, but are often a bad idea. The more freedom is given through an API, the less guarantees one can deliver. Security, scalability, and maintainability all become more difficult for APIs with endpoints that attempt to do several things at once.

    But most importantly, REST doesn’t tell you exactly how to build your endpoints, as long as they’re stateless, cacheable, and refer to system resources with enough context to allow their direct manipulation.

    These are good principles for older and modern web apps, that hasn’t changed. In fact, one can argue that the larger and more complex the system the more important it is to simplify its endpoints. And you can build pretty complex systems while following these criteria.









  • Instead you could have a function, say t(“Ciao”) that kinda runs something like (of course loading all the translations in ram at startup and referencing that would be better than running a query for each and every string).

    this backfires when the same text translates to different strings depending on the context

    e.g. EN “Play” may translate to PT “Jogar” (as in play a game) or “Reproduzir” (as in play a video)