Database suggestions

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
3/11/2010 10:23:32 AM
Gravatar
Total Posts 9

Database suggestions

I'm a new dev and not nearly as knowledgeable as Joe, but here are some things that would help me(and maybe others).  Just some things to consider.

 

mp_Users

  •  There are a lot of fields here that I think should be optional and would fit better in mp_UserProperties
  •       Like MSN, Yahoo, Interests, Occupation, and ICQ.
  •       Maybe these are added/removed during setup installation???

 

  • There are some fields that are needed, but I'm not crazy about keeping them in mp_Users.
  • Like LastActivityDate and some of the other dates.  Maybe keep this in a log table so the mp_Users table doesn't get updated every time to user clicks a link.

 

  • Add a "Dirty" flag to the mp_User and mp_UserProperties so we can tell when items have been updated since the last time it was checked.

 

Just some ideas.

3/12/2010 1:12:07 PM
Gravatar
Total Posts 18439

Re: Database suggestions

Hi,

The story on why those fields are on mp_Users is because they existed there in the earliest version of mojoPortal before we had a custom user profile system. After the user profile system was added I mapped them so that they could be used or not just like other profile properties but I map them to the existing fields. Could I move those into the mp_UserProperties and then drop the fields from mp_Users, yes maybe, but it would have to be done carefully to be backward compatible and not break anything. Frankly there are much more important things to work on to add value to mojoPortal. I may eventually do that but it is not a priority. This is the way things go when you work on an application for 5 or 6 years, there will always be things you would do differently if you were implementing them today, but if you go back and re-do everything you never get more important things done.

So fields like Like MSN, Yahoo, Interests, Occupation, and ICQ are in fact optional even though they are not in mp_UserProperties, you can use a custom profile config file and remove those. In fact as you can see in your user profile on this site I do not have those fields as I use a custom profile config file instead of the default mojoPortofile.config

I don't see how it is any problem to have a last user activity or other date fields on mp_Users. It is easier to retrieve it with the user if it is in the table and it is no more expensive to update in one table vs another table. 

If you want to disable user activity tracking you can add this to your user.config:

<add key="TrackAuthenticatedRequests" value="false" />

The tracking occurs in the Application_EndRequest method which fires after the page has been rendered so it should not impact user perception of performance.

I've never seen an IsDirty field in a table. The only time I've seen an isDirty flag used is when you have made changes to an object but not yet saved the data, once the data is saved having an isDirty set to true is meaningless and provides no extra value vs lastModifiedDate. 

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.