3 ms·
You can mitigate both examples with appropriate internal API choices. Though the second is much harder to retro fit into an application as it grows than the fir
by emeraldd 3y ago
You can mitigate both examples with appropriate internal API choices. Though the second is much harder to retro fit into an application as it grows than the first. For the email example, you build something with a similar API to what you would expect the database to expose (DAO, etc ...) and eventually replace the code backing it with something more robust using the API.
The second example is harder, but not insurmountable. I would probably start with principle/credential reference of some sort that is provided to an evaluator along with a "right" reference rather than adding a method directly to users. If you keep the mechanism mostly opaque to the business code, you can retrofit more complexity into the system as the needs arise. Retrofitting that into a system get's really complicated really fast if you don't have a reasonable API to start with though.
- andirk 3y agoPipes that can easily be swapped out. Is there a name for that? I've said "hooks". Like when a 3rd party application allows you to squeeze in between the steps that it's internally taking and that you can't (shant) edit.
- potatoman22 3y agoAbstractions is a good word for it. We do it a lot in computer engineering https://en.wikipedia.org/wiki/Hardware_abstraction https://en.wikipedia.org/wiki/Hardware_abstraction