language agnostic - Why is separation of user and profile data considered good? -
I am reading this and felt that I do not quite agree with the statement the separation of the user and the profile Data is a good touch
.
As I saw it, profile data, such as, e.g. Creating a new object (and table) with 1-to-1 relation for the user object, creating such data in the country or user object, separating it into profiles. Is this kind of isolation considered to be a good practice because of just the beauty reasons? (You only see user input data in one table and the generated data is in another)
Good, it Only if you believe there are 1-to-1 relationships in the user and profile.
If this is always a guarantee of becoming a case, then due to separation it may be purely beauty, although there may still be performance reasons, for example, profile data should be accessed by other users. Can be cached without much attention, often for quick invalidation etc.
They are different types of concept data - even if they have 1-to-1 relationships I do not cache the user's login details - but then I will not show it programmatically modules which only Profile data are required.
It is logical that if 1-to-1 relationship can be guaranteed to catch it, what is it?
If you allow multiple login credentials (or multiple login methods) per user, then it has become more interesting now. For example, cookie-based sessions are often stored on a server side in an unstable storage (that is rarely needed to strengthen that data), would you point to that information by pointing to a user object, or profile object Can you?
You can have a one-directional relationship - the user has a pointer in the profile, but not from the profile to the user. In this way, modules with profile data can not change login details.
Finally, if you use a solution like Facebook, then allow multiple login emails per user, and login via additional openID and through an iPhone / Android app? Will you then agree that the profile and the user are still the same?
Comments
Post a Comment