Sunday, 11 August 2013

Status update & news feed database design / architecture

Status update & news feed database design / architecture

Imagine a application similar to Facebook, where you have status updates
and a news feed. The names and profile pictures can be changed. There are
also several different types of updates requiring a different layout
template for each type.
I hate my implementation and would like some feedback on how to improve
it. When I store the status update in the database, I basically store the
HTML template in the database with some of the update specific information
in it as well. Since the profile pic and poster name can change, I'm
keeping placeholders in the HTML stored in the database like
'{USER_PROFILE_PIC}' and replacing that with the most current value when
the record is pulled & displayed. I hate doing it this way because if we
want to do a design change down the road, we are stuck with this HTML in
the database.
I'm doing this all in SQL Server. I'm open to other databases if needed, I
just am looking for a good way to pull dynamic status updates from a
database and display them with up to the moment info.
TIA

No comments:

Post a Comment