Skip to content

Sockets - Jansen#37

Open
JansenMartin wants to merge 22 commits intoAda-C11:masterfrom
JansenMartin:master
Open

Sockets - Jansen#37
JansenMartin wants to merge 22 commits intoAda-C11:masterfrom
JansenMartin:master

Conversation

@JansenMartin
Copy link

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? It means different pieces of the code can run at once. This allows you to still interact with the page (and send other requests) while waiting for a request/response.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? axios requests are asynchronous. In past units, we could handle success and error cases in a separate if-else statement. When using axios, though, we need to chain these success and error cases using .then and .catch.
What kind of errors might the API give you? How did you choose to handle them? If a request is given the wrong parameters, it returns a 404 error. I display a message to the user if an error happens.
Suppose you needed to routinely find a specific Trip in the list by it's ID field. Would it be advantageous to keep the list in order by the id field? Explain why or why not. jQuery allows us to select an item that's been clicked on via event.target. This selector gives us access to information associated with that element. So, the order in which the trips are list in doesn't matter.

@dHelmgren
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene AMAZING
Comprehension questions yes
Functionality
Click a button to load and view a list of trips yes
Clicking the "load" button twice does not cause each trip to display twice yes
Click a trip to load and view trip details yes
Clicking a different trip loads different details yes
Open network tab, then fill out a form to reserve a spot yes
Submitting the form only sends one POST request yes
Errors are reported to the user This could be better, you don't give specifics.
Site is clearly laid out and easy to navigate yes
Under the Hood
Callback functions are not nested more than 2 levels deep yes
Callback functions are given descriptive names yes
Code is generally well-organized and easy to read yes
All API calls have both success and error callbacks defined yes
Optional but recommended: closures are used to keep track of which trip is selected no
HTML is semantic yes
CSS is DRY, uses CSS Grid, Flexbox, and/or Bootstrap yes
Overall Excellent job overall! This code is for the most part well-organized and easy to read, and it's clear the learning goals of this assignment were met. I especially appreciate the care you put into error handling. I've left a couple inline comments for you to review below, but in general I am quite happy with this submission. Keep up the hard work!

detailsList.append(`<li><strong>Continent</strong>: ${details.continent}</li>`);
detailsList.append(`<li><strong>Category</strong>: ${details.category}</li>`);
detailsList.append(`<li><strong>Weeks</strong>: ${details.weeks}</li>`);
detailsList.append(`<li><strong>Cost</strong>: ${details.cost}</li>`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd put all this dom manipulation in a helper!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants