naming question, software dev
For an API that lets you define the structure of a database, which of these naming schemes is better? It should be clear and *feel* nice and unintimidating to work with.
naming question, software dev
@joepie91 i feel like createCollection/addField/createIndex (maybe addIndex instead); "create" means that it exists on its own, whereas "add" is always to something. if it all has to be same i think i'd prefer "add".
re: naming question, software dev
@joepie91 'create' feels mysterious and generic like "you don't need to know what's in there" and 'add' makes me expect more array/stack dynamics, but there's really a lot of context missing that could sway this by a lot.
naming question, software dev
@joepie91 I think both options have a very different meaning. First one (create) implies it creates it and fails on subsequent calls since it exists. Add on the other hand implies to me that it might add something to the existing one if it already exists (as in create and update). So this really depends on the behaviour you want to have imho.
naming question, software dev
@joepie91 my take would be to give the HTTP request types appropriate meaning
that is, creating a field would be a POST (or maybe PUT) request to /fields/