Is this particularly widely used? I don't think I'm aware of TypeID either. I don't see why the author's pretty light solution is inferior to this library.
So your IDs are now tightly bound to whatever "types" you've currently decided you have, forcing a narrow view of what an entity is and making the entire system extremely brittle to change? What is a "type" even supposed to be? This is forcing a doubling-down on an already problematic design principle: that every entity is exactly one type of thing and these types of things are completely different than those types of things and obviously you can just make the perfect set of types that will never change if you think think really hard and everyone will agree on what each type means and they'll never change and that will never be a problem.
A quick glance of the repo shows that the "type" is just a prefix. You can do whatever you want with it. Basically the same thing as what the article suggests, no?
You face the same issues with table names though. So do you not name your tables?
The solution to your entity problem should be the same. You do the reasonable, practical thing, and rename/refactor if they drift away from the original mental concept.
graypegg|1 year ago
shinzui|1 year ago
ForHackernews|1 year ago
paulddraper|1 year ago
layer8|1 year ago
sparklingmango|1 year ago
feoren|1 year ago
Jesus, what a nightmare.
michaelsalim|1 year ago
likium|1 year ago
The solution to your entity problem should be the same. You do the reasonable, practical thing, and rename/refactor if they drift away from the original mental concept.