Tuesday, April 5, 2016

Building a social network: Introduction(P1).

Introduction:
 Have you ever asked yourself that how Facebook, Twitter or Instagram were built? How can Mark Zuckerberg build the Facebook? Can I do one for myself? What things do I need to learn in order to build them? My answer for these questions is that you can do it if you are really desired to learn about it. In this project I'll guide you how to build a social network by using PHP and MySQL. Because this tutorial is quite long so I will divide it into many parts. The result for this project:http://socialnetworks.16mb.com and the demo as below:



Requirements:
- In order to understand this project it requires you to have a solid knowledge about PHP and MySQL as well as a basic understanding about HTML, CSS and AJAX.


Design a social network site:
 There are a couple of things that we need to plan before we build a social network:
- A sign-up process
- A login form
- A logout facility
- Session control
- User profiles with uploaded thumbnails
- A member directory
- Adding members as friends
- Public and private messaging between members
- How to style the project
This project includes several code files:
1. functions.php - includes functions + database login.
2. header.php - this file is included by other files so each page of the project can be accessed to the same features for uniformity.
3. setup.php - creates MySQL tables. This file needs to be executed first to setup initial database.
4. index.php - home page. Display a simple welcome message.
5. signup.php - sign up page. Enable users to join the network.
6. checkuser.php - check whether creating username is duplicated with existing users in database or not.
7. login.php - sign in page. Authenticate user's login.
8. profile.php - create a profile.
9. members.php - list of members you can find and add as friends (or drop if already friends).
10. friends.php - list of mutual friends, followers and following users.
11. messages.php - messages are posted in public or private mode.
12. logout.php - logout the site.
13. style.css - layout the site.
14. javascript.js - contains some functions for scripting and combines with HTML5 to draw the logo.

Conclusion:
 In this section I just introduced some ideas about our project. I hope that you have an image of how our project looks like. I will dive into the project next sections.

No comments:

Post a Comment