Skip to content

Stacks-Rana's Rolodex - #14

Open
RanaSulaiman wants to merge 15 commits into
Ada-C7:masterfrom
RanaSulaiman:master
Open

Stacks-Rana's Rolodex#14
RanaSulaiman wants to merge 15 commits into
Ada-C7:masterfrom
RanaSulaiman:master

Conversation

@RanaSulaiman

@RanaSulaiman RanaSulaiman commented Jun 3, 2017

Copy link
Copy Markdown

ROLODEX

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What role does the Model play in Backbone? Model in backbone are responsible of keep track of data and save them, trigger events when data changes, reading data from and writing it to API and can be setup to hold business logic.
How do Backbone Views compare to Rails controllers? Views in Backbone are similar to Rails controller since their job is to coordinate between the data in the model and the DOM .
How do Backbone Events work in comparison to DOM events? DOM events come from regular JavaScript such as click and keyon, while Backbone events are used to listen and handle all custom events such as update and change. In summary, when DOM events occur, Backbone will look at events hash and try to match that DOM event with the key that has event handler.
What do you think of Backbone in comparison to raw JavaScript & jQuery? Each is a JavaScript library
Do you have any recommendations on how we could improve this project for the next cohort? I feel that Wave3 of hiding the modal has a significant Backbone concept that worth to be added to BB curriculum

@CheezItMan CheezItMan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ok Just some notes on not using raw jQuery within your view.


// Wave3 backbone modal event handler
viewModal: function(contact){
$('#contact-details').show();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's better to avoid using raw jQuery to select items, rather stick to using this.$ to select elements within the view. That prevents you from selecting something outside the view.

},

hideModal: function(){
if($('#contact-details').has(event.target).length === 0 && !$('#contact-details').is(event.target)){

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

More raw jQuery.

@CheezItMan

Copy link
Copy Markdown

ROLODEX

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commit
Comprehension questions Check and noted
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
Avoided using raw jQuery within views You used raw jQuery $ rather than this.$ to select elements in the DOM.
Styling, Foundation grid layout Check, I like the new background.
All dynamic content is rendered using an Underscore template Check
Overall Nice work, small issues with raw jQuery in your views, but otherwise very nice. You hit all the requirements.

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