Design Structure for Notifications System

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
pws5068
Forum Newbie
Posts: 2
Joined: Wed Aug 12, 2009 2:03 pm

Design Structure for Notifications System

Post by pws5068 »

I'm trying to redesign my motorist social networking site's notification system (concept similar to facebook's).

Currently, it stores messages like this:

Code: Select all

<a href="page.php?id=someID">UserName</a> commented on your <a href="vehiclePage.php?id=someID">VehicleName</a>
I Know this is redundant and poorly designed, so now I'm trying to decide the best way to do it.

My theory: (Just examples)

Code: Select all

 
{U:904} commented on your {V:201}
System Message: We are temporarily experiencing server issues.
{U:904} and {U:905} invited you to join the club {C:500}
 
I hope you can see why I cannot simply create columns for the obj ID, namely because of the last example which includes 3 dynamic links. With this design I could use regular expressions to rewrite the url and reduce redundancy.

Is this a practical design?
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Design Structure for Notifications System

Post by jackpf »

Why not use something like bbcode?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Design Structure for Notifications System

Post by josh »

Post Reply