Which one is easier to develop and work with (which saves the most time)? Which one would you go for? The name of the API represents its true purpose in this case by the way, createOrUpdate creates or updates the passed in meeting and create just creates the meeting. I will be the only one working on this project for now, although obviously, I would like others to work on it with me eventually.

  • none@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Even if I had a createOrUpdate function I would still have an explicit create function so that I can have a permission model that allows for creating but not updating. For meetings maybe it doesn’t matter, but I worked in a financial setting where a very unfortunate design decision was made early on in the development of a ledger where it was crucial that transactions couldn’t be updated, but the database was designed in such a way that there wasn’t a way to give the application permission to create new transactions without also allowing it to update existing ones. Required quite a bit of work to build around this limitation and have a way to prove that a series of transactions hadn’t been altered.