Skip to content

Haby's Rolodex #19

Open
habypsow wants to merge 14 commits intoAda-C7:masterfrom
habypsow:master
Open

Haby's Rolodex #19
habypsow wants to merge 14 commits intoAda-C7:masterfrom
habypsow:master

Conversation

@habypsow
Copy link
Copy Markdown

@habypsow habypsow commented Jun 4, 2017

ROLODEX

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What role does the Model play in Backbone? The model helps us keep track of a collection of data, helps to save and load information from the app to the back end, and vice versa, and has the ability to trigger events when information in the data changes.
How do Backbone Views compare to Rails controllers? They have a similar role, as they work between the DOM and the data. When a DOM event happens, the view handles it and behaves according to what the data needs to update accordingly, and modifies the DOM to match.
How do Backbone Events work in comparison to DOM events? Backbone events provide the ability for the backbone view to listen for changes in the model. The view listens for changes in the model, and calls render when they occur. In short, other components have the ability to respond when data in the model changes because of the 'listenTo" method.
What do you think of Backbone in comparison to raw JavaScript & jQuery? It seems like Backbone has the ability to provide structure and order to applications. I know that we have just scratched the surface with Backbone, and I want to make sure that I am able to fully grasp these newly covered concepts as we move on to more Backbone!
Do you have any recommendations on how we could improve this project for the next cohort? I am not sure.. It seems like we covered a ton of material this week! Backbone has many different moving parts, and I am not sure I am 100% solid on all those parts right now.

Copy link
Copy Markdown

@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.

Just a few comments.

const ContactView = Backbone.View.extend({
initialize: function(params) {
this.template = params.template;
this.contact = params.contact;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What role is this serving?

initialize: function(params) {

this.template = params.template;
this.modal = $('#contact-details');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would suggest passing this in as a parameter instead of hardcoding it.

Alternatively, you should at least use this.$ instead of raw jQuery to select elements.


displayModal: function(contactView) {
$('#contact-details').show();
$('#contact-details').empty();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should use this.$ instead of raw jQuery.

@CheezItMan
Copy link
Copy Markdown

ROLODEX

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good commit
Comprehension questions Check, don't worry we'll be doing more and more Backbone over the next two week.
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 Nice work, you hit all the requirements, just remember to avoid using raw jQuery when selecting elements in a view and avoid hardcoding things as much as possible. Nice work overall!

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