For this assignment, we needed to create an e-commerce website, along with a working login and user register page that enabled a user to register and create an account and have that information saved onto our servers. The user must log in before being able to purchase anything as well. Then after the user registers, they are then able to use the login page to complete their purchase and continue to the invoice page.
Click here to see more information about Assignment 2
I learned more about how to be able to have a user create an account with their username, password, etc., and have that written in a .json file so that their information is saved and they are able to log in again without having to register. I also learned how to create a login and register page, and have information from a previous page, such as the products display page, transfer from one webpage to another. This is so that that information, such as the quantity they ordered, can be carried to the invoice page and the invoice would update and display correctly.
I did not work with a partner for this assignemnt.
When I needed help, I either contacted our TA Zenan, or went in during office hours and got help with Rick. I also referenced the internet for some of my code. I mainly needed help with how to put "rules" on the registration page so that it would bring up certain errors when inputting invalid keys. One example would be that the users full name could not contain numbers, or their username could not be 2 letters long, but no more than 30. I also needed help with certain codes on the server side and how to encrypt passwords so that it would not show up on the server without encryption.
This assignment was different as it involved new problems, such as carrying information from one page to another. One main example of the problems I was running into was getting the inputted email and quantities be contained in the query string so that the next page, such as the invoice page, can read the query string and print out the necessary information it needed to display correctly.
I feel about 30% of the time was spent thinking about how to do something, 20% writing code, and 50% testing and debugging. A lot of the time spent debugging also included thinking, as I sat for hours and hours thinking about how to debug something and what was wrong with the code and testing to see if it worked or not, and changing code line by line to see what worked and what didn't. I feel that I also spent a lot of time logically thinking of how things worked and what code did what so that I could get my code to work.
I feel that the code overall worked well, and that all the hours I spent debugging were not wasted, as the end result ended up working decently well. Although my time management was horrible as I pulled one too many overnighters as I would have liked to. I would also like to work on my styling so that my website looks cleaner and more put together.
I would definitely start on the assignment sooner. This is so that I won't have to spend all night trying and stressing over debugging my code. With more sleep, I think I would have gotten some of the work done faster, as I was learning how to use certain codes such as implementing errors onto my registration page, I found the answer to be more simple than I made it out to be.