Tuesday, August 3, 2021

JavaScript and Web: MarshieNet

Project MarshieNet

Building my first project with Node.js and MySQL, a simple social media site.   You can find the project by clicking the Github icon. ->GitHub

Abstract


My single page web application for this coursework was initially presented as MarshieChat and was supposed to be a simple chat app, but instead I decided to go in a different direction and do a small scale social media site, MarshieNet. It isn’t as big as I hoped it would be, but it allows users to post any text (up to 200 characters) or photo and allows other users to view them. 

It consists of the login page, the home page, the user’s profile page and a search page. These are the only four screens of this website and are shown in the next section. Along with Node.js and Express, there were a few other modules that were used, such as cookie-parser, body-parser, mysql (to link with the database). The database is explained in more detail below.


Design and Development









Testing with Selenium


The below test tests the number of characters that are counted. It starts with 200, types in ‘hello’, and the expected result should be 195, which it is.


The below test checks if the ‘text’ and ‘photo’ buttons on the post tab are doing their job. Starting off with text, it makes sure that the textarea is present and click at photo, verifies that the choose file option is available.


The below test does a search and matches the number of search results. The search of ‘test’ will provide ‘3’ search results.


The below test checks if the login has worked. I tried to do an ‘assert alert’ and ‘assert confirmation’, with the alert output, but that didn’t seem to work. So, instead, I showed an instance of where it shows the user details once logged in.


The below test checks the logout. Once you click the logout button, it shows that the login page is available again. Again, I have tried the ‘assert alert’ and ‘assert confirmation’, with the alert output, but it didn’t seem to work.

Database


This database, done with mySQL, has two tables USERS and POSTS. The relationship is as shows below.

Entity Relationship Diagram

Evaluation



MarshieNet: project video


Additional Elements


These are just a few elements I thought of adding, and given time could’ve been worked on.
  • Editing of user details (this is input into the page, but does not work) 
  • Viewing of other profiles
  • Adding friends
  • Searching for posts (and viewing more than the brief of search results)
  • Messaging
  • Following
  • Likes
  • Comments

0 comments:

Post a Comment




 
Loading...