HW2 Response

Node

Keep track of any changes you made to your back end as you implemented your front end. What changes did you need to make and why? If you could go back in time, is there anything you would change about the way you approached making your back end for HW1?

I changed my back-end routes to start with /api so the React front end could talk to the server. I also updated the book routes so they returned data the UI actually needed, like the author’s name instead of just the author ID. I added support for query parameters so filtering and searching could be done cleanly from the front end. If I could go back to HW1, I would design the API responses with the UI in mind from the beginning, especially for things like joins and filtering.

When adding books and authors, did you only use server-side validation, or did you also use client-side validation? What are the pros/cons of making either choice?

I mostly used server-side validation and only relied on the front end for basic user feedback. Server-side validation is safer because it cannot be bypassed and keeps the database protected. The downside is that users only see errors after submitting a form. Client side validation gives faster feedback and feels better to use, but it adds more code and still cannot replace what server-side checks.

React

What was your general experience using React? What did you struggle with? What did you enjoy?

My experience with React was mostly positive. I liked how state controls the UI and how it helps organize the code. I struggled most with managing state between components, especially getting the table to refresh after adding a book.

Compare and contrast writing React versus writing plain JS DOM manipulation code as you did in CS375. How was your experience different? Which do you prefer and why?

With plain JavaScript code, you have to manually update elements, which becomes messy as the app grows. React lets you describe what the UI should look like based on state, and it updates automatically. I prefer React because it scales better and keeps the UI cleaner.

What was your experience using types with the front-end? Did they catch any bugs? Did you struggle to type things correctly? Did they feel helpful, useless, tedious?

Types helped catch mistakes like using the wrong fields from API responses. They were sometimes annoying to write, especially with Axios and props, but they did helped prevent bugs. Overall, they were more helpful than frustrating.

LLMs

Did you use LLMs to help you write your code? If yes, explain how you used them.

I did use LLMs but only to fill in code that I was going to write. For example, when I have something in mind to type down, and the LLMs suggested the same thing, I would just use the suggestion. In these cases, LLMs can be useful since it does speed up my progress.

If you used LLMs, reflect on how they changed your experience of coding. Did they make it more or less fun? Did they save you time? How do you think they affected what you learned from this assignment?

Overall, I still think the LLMs are not very accurate. I think their code suggestions are often wrong compared to right, so it does slow down development if I were to use them consistently. I did not use them much during this assignment so I don't think it affected what I learned from this assignment.