TIY-LR-FEE-2015-June / assignments

0 stars 3 forks source link

6.2 - Backbone - Corbin Otwell #167

Open cbotwell opened 9 years ago

cbotwell commented 9 years ago

Takeaways:

In a finished Backbone app, you don't have to write the glue code that looks into the DOM to find an element with a specific id, and update the HTML manually — when the model changes, the views simply update themselves.

This makes the goal of our Turn Based Game much clearer and makes it silly how simple the resulting code should be.

Models should be generally unaware of views. Instead, views listen to the model "change" events, and react or re-render themselves appropriately.

This makes so much sense and now that we have a framework that supports it it makes more sense why you wanted our games to be structured the same way.

Not sure what this REST/RESTful API stuff means? The example data looks similar to the APIs we've used in class.

Routing sounds very interesting.

Collections are derived from Arrays, while Models are derived from Objects

That seems important.

Under the hood, using view.$('...') is synonymous with calling view.$el.find('...'). These localized queries greatly cut down on superfluous DOM operations.

That does too.

rtablada commented 9 years ago

@cbotwell Thanks for the questions and thoughts, we will cover these in class today.