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

Theresa's Rolodex #23

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

Conversation

TheresaManney
Copy link

ROLODEX

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What role does the Model play in Backbone? Backbone Models talk to the database to load and save data to use for the application.
How do Backbone Views compare to Rails controllers? Similar to rails controllers, Backbone Views communicate between the data and the DOM. When DOM events occur, the Views in Backbone are responsible for updating what the user will see next, it is also responsible to change the view accordingly if data in the model is changed, it can also save new data to the database.
How do Backbone Events work in comparison to DOM events? DOM events include information that is gathered when a user clicks or interacts with an application. The Backbone events are the logical things that will be happen when the DOM event is triggered.
What do you think of Backbone in comparison to raw JavaScript & jQuery? Backbone seems to create more organization by using MV* as a base. Although this organization is still a challenge for me to understand completely, it definitely helps to have several files to organize what pieces will to specific tasks rather than having one file that handles everything in a long script.
Do you have any recommendations on how we could improve this project for the next cohort? I felt that lots of the organization was challenging to understand. The live code example that we all worked through in class was great, but it is not something that I cannot implement on my own which worries me. If anything were to be taught differently, I would maybe mention to the class if we should have syntax and order in how to create something memorized or not.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Not bad, just remember not to use raw jQuery in a view. Use this.$ instead to only select items within the view.


var application = new Application();
$('#contact-details').hide();

Choose a reason for hiding this comment

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

This should probably be in the document.ready handler.

},
contactDetails: function(contact) {
$('#contact-details').empty();
$('#contact-details').show();

Choose a reason for hiding this comment

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

I would suggest to show the modal after the contents are filled in to prevent a flash effect when the modal is shown, if the browser is busy.

Also don't use raw JavaScript to select items in the view. Use this.$ instead.

@CheezItMan
Copy link

ROLODEX

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene More granular commits would be better.
Comprehension questions Backbone event are used to communicate changes among your application components.
Functionality
Created a Contact Model Check
Created a Rolodex Collection Check
Created a ContactView which renders an individual contact Check
ContactView responds to a click event when the user clicks on the contact Check
RolodexView created which renders the list of contacts Check
DOM Events handled for creating new Contacts Check
The RolodexView responds to custom Backbone event generated by ContactView to show the modal Check
Styling, Foundation grid layout Check
All dynamic content is rendered using an Underscore template Check
Overall Good work, I understand a lot of this is following the pattern we learned in the livecode, but knowing and being able to replicate the pattern is key to understanding how Backbone applications work. You'll get more chance next week to build from the ground up. Do remember to avoid using raw jQuery inside your views and instead use the provided jQuery selectors like this.$.

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