I’m setting up a generic social networking application where users have profiles, but the fields in these profiles are not static, but can be managed by the administrator of the app.
Right now, I have a Profile, Field and Field_Value model:
The Field model saves the metadata for a field, like its type, whether it’s required or not, and the display order.
The Field_Value model saves the value of such a field per user.
Now, I obviously want users to be able to edit their profiles, so the profile/edit action should collect all applicable Fields, retrieve their values and save them to the Field_Value model where necessary.
Since I’m kind of new to this MVC thing, I’m looking for some input on how to elegantly handle this situation. Any ideas are appreciated