4 ms·
Is it just user-ids we should discuss or is it all kind of ids represented as an int? on one side you have the convenience and simplicity and on the other side
by makach 4y ago
Is it just user-ids we should discuss or is it all kind of ids represented as an int? on one side you have the convenience and simplicity and on the other side you have a set of experience, best practice, security considerations to take into account.
It can be overwhelming because the correct way seems obvious, listen to the experts and do as somebody think you should do - but it never is as easy as that. You need to balance your structure. Everything you do has a performance hit in some way or another and you need to consider the impact said practice will make in your environment.
- Semaphor 4y ago> Is it just user-ids we should discuss or is it all kind of ids represented as an int? Strongly typed ID’s are a thing advocated for in general [0], yes. And they aren’t even inconvenient in some languages. Modern C# for example makes it very easy to use them [1]. [0]: https://andrewlock.net/using-strongly-typed-entity-ids-to-avoid-primitive-obsession-part-1/ https://andrewlock.net/using-strongly-typed-entity-ids-to-av... [1]: https://github.com/andrewlock/StronglyTypedId https://github.com/andrewlock/StronglyTypedId