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

Kimberley Zell - Pipes - BackTrek #36

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

Conversation

kimpossible1
Copy link

BackTREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What role does the Model play in Backbone? It sets up rules/framework that instances of that model will follow.
How did the presence of Models and Collections change the way you thought about your app? I used a model for reservations.
How do Backbone Events compare to DOM events? DOM events listen for events from user, such as a click or pressing a key, whereas Backbone events happen as specified when the database is changed or other events occur on the site.
How did you approach filtering? What was your data flow for this feature? I set up the dropdown selection box to have ids of filter-types and then used those to apply to entries put into the search bar by keys pressed.
What do you think of Backbone in comparison to raw JavaScript & jQuery? I feel that I was not ready for both Backbone and Underscore and I am not yet comfortable with using Backbone. I am much more comfortable with JS and JQuery. I do not feel that I fully understand how Backbone works.
Do you have any recommendations on how we could improve this project for the next cohort? Preferably this needs to be broken up more. As well, having such an extensive and difficult assignment directly before interview week significantly added to stress, left no time for interview prep, and was a bit of a blow to my confidence when it would be best to have the confidence going into interview week. We learned so much in such a little time that it feels mixed up and I do not feel comfortable with my understanding or knowledge of Backbone.

@CheezItMan
Copy link

BackTREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene More granular commits would be better, good commit messages
Comprehension questions Check, Model provide organization of the data and handle communication with the API, as well as validations.
Organization
Models and collections are defined in separate files Check
Code that relies on the DOM is located in or called by $(document).ready Check
Code follows the Backbone data flow (DOM event -> update model or collection -> Backbone event -> update DOM) Check
Functionality
Display list of trips Check
Display trip details Check
Register for a trip MISING the form is there, but doesn't actually DO anything. I assume you ran out of time, but I left a note in your code explaining what' not working.
Add a trip Check
Sort trips Check, but see my in-code note on styling
General
Snappy visual feedback for user actions The UI is basic, but it works
API error handling Yes for saving a trip
Client-side validation Yes, but only for Trip.
Overall You hit the learning goals, but need more practice on saving a Model and working with validations. Just spend some time with those this week. Nice work!


DISPLAY_TRIP_FIELDS.forEach((field) => {
const headerElement = $(`th.sort.${ field }`);
headerElement.on('click', (event) => {

Choose a reason for hiding this comment

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

You also need to add something to style the selected column. Right now it sorts, but doesn't indicate which column was sorted. Adding a class which changes the styling of the th element would work well.

console.log(reservation.url);

// reservation.save({}, {
if (reservation.save) {

Choose a reason for hiding this comment

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

This doesn't actually call the reservation's save function. Instead it checks to see if it exists.

Remember this isn't Rails!

Instead you need:

reservation.save({} {
  success: someEventHandler,
  error: someOtherEventHandler
});

// console.log(`In initialize: for the book ${ this.get('title') }`);
},

validate(attributes) {

Choose a reason for hiding this comment

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

This is good, but you also need to test for:

  1. Continents that are valid (Asia, Africa etc).
  2. Valid numeric values for weeks and cost

const Reservation = Backbone.Model.extend({
url: function () {
return `https://ada-backtrek-api.herokuapp.com/trips/${this.get("trip_id")}/reservations`;
}

Choose a reason for hiding this comment

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

missing validations

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