-
Design
- Keep track of the changes you made to your back-end as you implemented your front-end. What changes did you need to make and why? Would you structure your back-end differently in the future?
The only changes I made to my backend was adding /api to my endpoints so that the proxy could work correctly, otherwise there were no other changes. Because the way my back end was originally put together, it was rather easy to use my endpoints, so in the future I would probably structure it similarly in the future unless I learn any new practices that make the endpoints better in some fashion.
- Did you also perform client-side validation or did you rely on server-side validation alone? What are the pros/cons of making either choice?
I did not write any tests, rather I manually tested all of the functionality. If the backend was set up correctly and the tests validate that the endpoints return what you are expecting, I feel like all of the front end functionality that is needed is just using the endpoints for some visualization of the data. So it may be overboard for testing both, especially for a SPA with components.
- Keep track of the changes you made to your back-end as you implemented your front-end. What changes did you need to make and why? Would you structure your back-end differently in the future?
-
React
- What was your experience manipulating state with React components (especially with the useEffect hook)? What kinds of things did you struggle with?
The useEffect hook was very useful, as it allowed me to do a bunch of different things such as control which page I wanted to display, the values of the search parameters, as well as the books and authors grabbed from my end points. I didn't really have any issues with the typing and what not.
- What was your experience using types with the front-end? Did they catch any bugs? Did you have to make a lot of manual annotations? Did you resort to using any frequently, and if so, why?
Typing in the front-end was a little annoying/confusing, especially when dealing with passing values to components. As I needed to create interfaces of what I was expecting to get and used that for the parameters intead of just saying like authors: Author[]. Besides the passing of values to components I didn't really have any other typing issues.
- What was your experience manipulating state with React components (especially with the useEffect hook)? What kinds of things did you struggle with?
-
Comparison
- Compare and contrast your experiences writing an SPA front-end with React to writing a MPA front-end like we did in CS375. Which was harder? Which did you enjoy more? How did you feel about the experience generally?
I think I prefer writing components rather than straight html and css, since those allow for more logic to be used in a cleaner way than large amount of JS either inside of script tag or from another file. It also was nice to be able to pass functions and values from a higher level spot to the lower level components that may not have had full access to certain values such as changing the value of the current component value used to determine which components were displayed.
- Compare and contrast your experiences writing an SPA front-end with React to writing a MPA front-end like we did in CS375. Which was harder? Which did you enjoy more? How did you feel about the experience generally?