Confidently Incorrect - Social Networking

bradley-hill

Bradley Hill

Posted on February 23, 2024

Confidently Incorrect - Social Networking

Confidently Incorrect since 1987

Social Network using PHP and a database!

In contrast with the previous project, going into this project it felt like an enormous undertaking!
Luckily (perhaps) we were given a decent amount of code already written for us to build on.

As had now become standard for our group projects, we set up a group Trello for organising our tasks and dividing up the responsibility of completing them, as well as agreeing to a daily meeting to discuss the remaining tasks and difficulties and successes from the previous day.

There were three levels proposed to completing this project:

Level One

  • The proposed social network (inspired by Twitter or Facebook) will display user messages on different pages (the latest messages, those from a particular user, those from followed users, and those associated with a particular keyword).

As we were initially given a large amount of pre-written code, HTML/CSS and PHP, also several SQL requests were pre-constructed. The completion of this first level was largely an exercise in filling in blanks and refactoring erroneous code, some small adjustments to the SQL requests to ensure that the correct data is being recuperated and displayed on the pages. Despite our initial issues with installing and setting up our environment, we all ended up using the MAMP stack, and I believe we had completed all the corrections necessary to be displaying the relevant information from the database after the third day. The first day had been mostly spent setting up the Trello and installing/troubleshooting the environments, and the second day we spent the first half reading a variety of documentation on PHP and SQL, and then begin familiarising ourselves with the code which we had been provided.

Level Two

  • PHP processing of HTML forms, as well as registration and authentication issues.

This section of the project took as some time, mostly learning some of the nuances of PHP and how to implement the functionality that we wanted. The change in symbol for concatenating kept us on our toes, and eventually, with the help of our teachers, got to grips with the idea of Superglobal variables which enabled us to keep track of a particular user being logged in across the pages of the app as well as managing the visibility of posts users create and who can see what, permissions being managed basically. Which definitely took some work and misfires, but eventually we found that it all started to fit together into an effective web of relations.

We did have an issue with the likes increasing with a page refresh, despite no additionally entries being registered in the database, which I think we resolved on the final day of the project, but for the life of me I can't remember for sure if we did, how we did it....

The project as a whole was very interesting, not only our first introduction to PHP and writing SQL requests and manipulating a database, but also being given an existing codebase to refactor and build from, allowing us to get some practice with reading others code and understanding its purpose and what we can build from it.
The link to the GitHub repository is here

Although I must say the readme file could do with some work, perhaps in the future I will go back and improve it!

Next week is the largest group project we worked on, with two separate teams, for Front and Back ends, with a switching of roles after the first week.

💖 💪 🙅 🚩
bradley-hill
Bradley Hill

Posted on February 23, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related