Python Forum
How to create a social networking site?
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create a social networking site?
#4
When it comes to largish projects (like this), I always start with a database model (because I've found that's how I think best).  Once I know how the data is organized and stored, writing a front end to it is almost simple.

For a social network, you have a few obvious tables: Person, PersonFriendship, PersonComment.

A PersonComment would have a parent PersonComment, which would be a comment that that comment is a reply for.  Any PersonComment without a parent, would be a post to that person's Wall.

A little more fleshed out:
Person
 - id
 - NameFirst
 - NameLast

PersonFriendship
 - person_id1
 - person_id2
 - timestamp

PersonComment
 - id
 - person_id
 - parent_personComment_id
 - timestamp
 - Contents

And really, that's very close to the entire thing.  Adding a chat system could be added afterward, as could groups, notifications, etc.  Remember, when facebook first started, it was incredibly basic.
Reply


Messages In This Thread
RE: How to create a social networking site? - by nilamo - Dec-04-2017, 08:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Free Game -- Learn networking while playing Larz60+ 5 4,397 Oct-05-2017, 03:23 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020