Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haby's Trek #45

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Haby's Trek #45

wants to merge 11 commits into from

Conversation

habypsow
Copy link

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? Code that is asynchronous has the ability to do many things at once, for example, with a single page application, the page is loaded only once, and the content is from there changed dynamically using Ajax.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? I wanted to have the ability that when a single trip is clicked, the page loads the single trip details without reloading the entire application. I first set up a trips-show-template in my index file, compiled in the js file and invoked the template in my showSuccessCallback, which does not get executed right away which makes it asynchronous, until the trip list is clicked and the show click handler is 'activated' upon the click event.
What kind of errors might the API give you? How did you choose to handle them? There could be internet disconnection, or there might have been an unexpected error loading the api data. I created a failure callback function to handle these errors as they occur.
What is an Underscore template? Describe one template you used for this project. We used Underscore templates to generate HTML in Javascript. I defined a template 'trips-show-template' in my index.html, compiled and invoked it in my trek.js file, which gave us access to the javascript variable trip and its attribute in our index.html file.
Do you have any recommendations on how we could improve this project for the next cohort? n/a

@CheezItMan
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Reasonable # of commits
Comprehension questions I think we were expected for you to explain what an underscore template is rather than what it does. An underscore template is a block of HTML in the document enclosed in script tags with ERB-style tags embedded in it. The template can be compiled, which lets us evaluate the <% %> content and embed the result in the DOM.
Functionality
Click a button to list trips Check
Click a trip to see trip details Check
Fill out a form to reserve a spot Check
Errors are reported to the user Nope!
Styling, Foundation grid layout Minimal styling and no grid layout.
Under the Hood
Trip data is retrieved using jQuery AJAX Check
JavaScript is well-organized and easy to read Your JS functions are a bit large. Breaking the code into pieces would be better.
HTML is semantic You should put your template outside of the main element. Otherwise not bad.
All dynamic content is rendered using Underscore templates Check
Overall You did the essentials, but I think it would be good to get in more styling practice particularly with grid layout.

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