cmda-bt / be-course-19-20

🎓 Backend · 2019-2020 · Curriculum and Syllabus
Other
18 stars 7 forks source link

Week 3 #215

Closed IrisvanOllefen closed 4 years ago

IrisvanOllefen commented 4 years ago

Package

Name

Iris van Ollefen

Class

TECH 5

Repo link

Repo

Summary

I made a feature which asks people to fill in their top 3 favorite books and the book they are currently reading. Then, once they hit the go button, they'll get to a new page which returns those values. I made this using body-parser, the resources below and help from a friend. I think I want to see how I can incorporate this more in to my dating app, but this would mean I need to create a new page and more, so that is not yet ready.

Resources used

MDN. (2020, March 31). Sending form data. Retrieved May 23, 2020, from https://developer.mozilla.org/en-US/docs/Learn/Forms/Sending_and_retrieving_form_data MDN. (2020, May 17). Client-Server Overview. Retrieved May 23, 2020, from https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Client-Server_overview dougwilson. (2019, April 26). npm: body-parser. Retrieved May 23, 2020, from https://www.npmjs.com/package/body-parser MDN. (2019, December 15). Express Tutorial Part 6: Working with forms. Retrieved May 23, 2020, from https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/forms Zerner, A. (2018, June 21). How bodyParser() works. Retrieved May 23, 2020, from https://medium.com/@adamzerner/how-bodyparser-works-247897a93b90 MDN. (2020a, May 12). About form. Retrieved May 23, 2020, from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form

Any thoughts?

I found this exercise interesting. It was difficult to get in to it at first because I did not know where to start, but I found enough resources. I do think I would have liked more information about this in class, which I feel like I slightly missed. But everything worked out eventually!

Razpudding commented 4 years ago

Your rendering strategy is a bit more complex then it needs to be. Look up how other people handle rendering handelbars. There's no need to have the views saved in separate variables, you should be able to just reference the file and pass in the data.

We had a bunch of slides on inputting data. I feel like I went over this in class. Which info specifically did you miss? Btw you might need to add multi-part form data to your form when your input becomes more complex. Not sure how you got it to work now, in my experience I always needed to add that.

Have you tried connecting this to mongodb? I don't see any code referencing that yet.