The Reflection

Since the time to work on this project is almost over, I can now reflect on the outcome, the group work, the planning and the other important things that were a part of it. We have basically been working on the page for two months now and I think time wise, we have done really well. We agreed to have the page finished before Easter so we could spend the time during the holiday to make smaller changes, comment the code, and look for errors or way to improve things that we did not like that much. Luckily most of our group worked really hard to reach this goal and when we went home, all the big parts, except for making it responsive where taken care of. During this development, we used GitHub as Rob suggested and we got to understand it pretty well. It was a very useful way of sharing code and keeping track of issues and things missing. Me and Tina created a lot of Issue files that could easily be closed once something was fixed. I have been uploading onto GitHub from the very start of the working process and every time I ran into an issue with the code, I could easily go back to an older version or track all the additions I had made. This was the first time ever, I worked on the development of a webpage but I can imagine that managing the code without GitHub would turn out very chaotic. I am happy that I now know how to use it and can keep using it for projects in the future.

Another thing I did along with the coding was blogging. It was a good way to reflect on things I had learned as well as a possibility for us to understand the thought process of our fellow group members. In case I forget something I might need for upcoming projects, I can now always go back and look at how I did it before.

Reflecting on our project now, I am very satisfied with the outcome. Our page does not only meet the basic needs but because we were finished with the coding early, we had time to add extras such as a logo, more PHP functions and a nice design. Of course, we focused on the PHP first, since it is the main part of this project bur once I had it done, we wanted to explore all the other ways we could improve our page.

Looking back at the beginning of the project, I am very happy with the way the planning went on. Tina joined our group a bit later but she helped from the very beginning and was enthusiastic about work and ended up redesigning and improving the welcome page Becky made with Bootstrap, after we decided not to use Bootstrap, from the very scratch. We all contributed logo ideas and Tina did a lot of research on the name. We also all looked into other projects similar to ours to make sure we understood what we were dealing with. We all showed up for our group meetings, except for Rafiel who disappeared after the second one and we stayed in a lot after workshops to work on the project and we all developed a clear idea on what the page was supposed to look and be like. Since my group members said that they were not very secure with coding, I ended up writing most of the PHP for the page though while my group members contributed in other important ways. I did not mind the extra work, but because I came from basically no web design and PHP background, I had to do a lot of research on it but now, I feel pretty secure with it. Of course I know I have only scratched the surface of it and there is way more to learn but I enjoyed the coding. Since the project is about us all understanding the code and working on it though, I also spent a lot of time explaining my group mates how to do things and going through the code with them. Becky then managed to write PHP for the search page as well as code for making the page responsive (she also worked on a report button that we sadly could not integrate) and Tina did the about-us page, did research on anonymity online, wrote a text for the page telling the users what it was supposed to be used for (and what not) and helped me with the design and CSS part. She also stayed in late with me a lot to make sure that she understood how everything worked and we could get it done in time. I also commented all the code so my group members could go through and ask questions about it in case they had not understood anything. Rafiel wanted to contribute doing a ‘like on Facebook’ button but he never replied to our messages again. In general, I think we all improved our knowledge in a lot of different ways but now we should be at a point where we know what is going on with the backend as well as the frontend of our page as well as having a pretty decent understanding of the area our page is in.

Advertisements

Edit and Delete button for Posts

After our meeting with Rob last Friday, I have been working on a “delete” and an “edit” button for the posts on our page. I knew it would be very similar to the code I had previously written for the “delete-account” button but also that I was faced with some complications.

First of all, the users had to be able to only delete their own posts. For that, I knew I would need the “user_id” that I previously saved as a session variable, so I could run a query checking if the “id” from the user table would be the same as the “user_id” in the posts table. Luckily, at this point I had already managed to save the “user_id” from the SESSION in the posts table. That made this whole thing a bit simpler, because I did not have to take care of that in addition, but could just run a simple check to ensure that the two numbers were the same.

Once that was accomplished, I thought about the second problem that I had to solve. At this point the user would click a button and end up deleting all of his posts no matter which button he picked (as long as it was one of his posts). That happened because the users “id” and the “user_id” from the posts table would be same for all the posts a user made. That meant that the “user_id” to select a certain post was not enough criteria and that I had to query for the post “id” as well.

The solution for that was creating another file, called “delete_post”.php and when doing the “href” adding the unique post “id” to the URL. That happened with the following code:


            <div class="delete_edit" id="delete_post"><a href="delete_post.php?id=<?php echo $row["id"]; ?>">Delete post?</a></div>

I then would get the post “id” and run my query like this:


            $query = "DELETE FROM posts WHERE id = '{$postID}' and user_id = '{$_SESSION['user_id']}'";

In the end the user was able to delete his posts, but not all at once. Instead he could click on the posts’ “delete” button ending up deleting just this one post (of course, still just his own post, not others). That was almost everything and could have probably ended up staying like that but it was slightly distracting that all the posts had “delete” buttons but some of them just would not work. That’s why I used an if-statement to hide the button for all but the users own post. You can see the code here:


<?php if ($_SESSION["user_id"] == $row["user_id"]) {?>

        <div class="delete_edit" id="delete_post"><a href="delete_post.php?id=<?php echo $row["id"]; ?>">Delete post?</a></div>

        <div class="delete_edit" id="edit_post"><a href="edit_post.php?id=<?php echo $row["id"]; ?>">Edit post?</a></div> 

<?php } ?>

Also, in the following you can see a screenshot of the “posting-page” so far. All the posts with “edit” and “delete” buttons are the one made by the user logged in. In addition to the buttons’ obvious function, they are also an option for the user to keep track of their posts since they can easily get lost in the mass of anonymity and still stay anonymous (since other people can only see that certain posts were not made by them but not by who).

Screenshot (285)

Background Research: Inspiration

This post, I want to devote to explaining where we got our Inspiration from and talking a bit about the two applications.

The very first idea of doing an anonymous Posting-Website for students was inspired by a German App called Yodel. It is not very well known in England, but a lot of my friends from home are using it to keep track of what is happening around them. The app is following a very similar concept to our website. Smartphone users can download it and then anonymously post and others can read those posts and rate them. The user only sees the posts from people close by, for example in their city. It is mostly used by people aged 18-25 to express their thoughts and ideas without sharing their true identity.

After looking into it, me and my teammates found another app that uses the same principle. It is pretty similar to Yodel and called YikYak. So I decided to look a bit into it, hoping to learn something for our project:

YikYak was first launched in 2013 by Tyler Droll and Brooks Buffington. Both of them are graduates from a college in the US. The app allows people to create and view so called “Yaks” within a 10 mile radius. Just six months after the App was released, it became the 9th most downloaded app in the US.

Here you can see both, the webpage as well the app interface of YikYak:

80edd2fd-2698-4548-b32d-7a965d0ade59-620x519 Screenshot (260) Screenshot (261)


References:

YikYak, 2013. Available from: http://www.yikyakapp.com/ [Accessed: 11th March 2015]

Itunes Applestore Preview, Yik Yak LLC, Available from: https://itunes.apple.com/gb/app/yik-yak/id730992767?mt=8 [Accessed: 11th March 2015]

Dredge, S., 2014. The Guardian. Yik Yak is the hottest messaging app in the world. So how are Brits using it? Available from: http://www.theguardian.com/technology/2014/dec/16/yik-yak-messaging-app-brits [Accessed: 11th March 2015]

ERD Draft for “ANONYMOUS” Projectv

After our first group meeting, I created a “draft ERD” for our project. Before actually starting with PHPmyAdmin, it was important for me get a view of the kind of Database categories needed and their relationship to each other. This is just a quick sketch I made, I am sure this ERD will get way more complex the further we are into planning the project.

Also, it focuses on the two main components, STUDENTS and POSTS. Later, there will probably be more categories added, like LOCATION, STUDENT_ID or RATING.

Untitled-2