E5 - Reflecting on Assignment 2

08 May 2020
  1. Provide a brief introduction to the assignment along with a link to this page for further details

The point of assignment 2 was to add on pages to our dynamic e-commerce web page. We had to personalize the site for our users by adding a login page and registration page that they had to go through before checking out their products. The task was to link the products display page to the login page and the new user registration page then from there depending on which route they take both pages will end up at the invoice display page. We had to make sure to use app.post() on the server to do most of the server side processing for the site as well as to make sure the appropriate html files were redirected correctly to follow the desired route.

  1. What did you learn from this assignment?

Through this assignment I was able to learn how to properly use app.post(), response.redirect(), and other functions that related to the query strings and if/else statements. I learned how to link different dynamic pages to follow an order as well as how to create error messages using errors.push(). I also learned a lot more about arrays and objects. Additionally, I learned to use myParser and connect a json file of user data.

  1. Did you work with a partner? Assign an estimated percentage on the amount each team member contributed to the assignment (including yourself).

I did not work with a partner. I did the assignment individually so I did 100% of the assignment. I did get help from professor Port a few times though.

  1. How did you get help when you needed it? What did you need help with?

I just emailed professor Port and asked him to help where I had difficulties regarding the assignment and was given a zoom link for one on one help. I needed a lot of help with everything to be honest however the key parts that I needed help on was to make sure the login and registration page kept their query strings of products in order to be processed through invoice. I also had a hard time trying to figure out how to attach the username to every page when they logged in or registered. Additionally, things like error messages took me a little long to figure out. Overall, I needed a lot of help to clean up my code.

  1. How was developing this assignment different than assignment #1?

Developing this assignment was similar yet different from assignment 1. The similarity came from doing all the same things you would do for assignment 1 when it came to creating the html page files and changing the app.get() to an app.post(). The difference stems from creating a route that you want the user to stay within while using the site by going from products to login or registration and invoice which requires a lot of redirecting. Additionally, this assignment required us to develop a user data jason that took new entries live for the new users. We also had to do a lot of validations because of the login and registration pages.

  1. Estimate the % of time you spent (a) thinking about how to do something, (b) writing code (but do not include testing, (c) testing and debugging

To be completely honest I feel like everything blended together but if I had to estimate I think it took me about 1-2 hours thinking about how to do something then just hoping right in to write code which took about another 4-5 hours because I had to look for the things I needed through labs, WODs, and online resources. As for testing and debugging that took the longest because things wouldn’t work here and there then I would have to figure out what section is wrong and fix it so that took about 6-7 hours (over a continuous span of time).

  1. Describe what worked well with this project? What did not work well?

I think the actual coding of the web page like the content and styling was what worked well with the project. I really enjoyed the creativity of designing the website. I think the making or the app.post() wasn’t too bad but the thing that didn’t work well for me was all the routing with the redirecting and if and else statements. I got confused a lot along the way.

  1. If you could go back in time and do things differently, what would you do differently?

If I could go back in time and do things differently, I would ask for help way way way in advance because it was extremely helpful. Also, instead of adding so much code because I thought I needed everything I think the next time I would focus on doing one thing at a time to make sure I don’t overlap and write more than I need to. Advice that I wish I took was coding and testing step by step to make sure you know what you changed, if it worked, if it didn’t why didn’t and fix it.