Skip to content

PR from Griego - #5

Open
Trishthedish wants to merge 2 commits into
Ada-C6:masterfrom
Trishthedish:master
Open

PR from Griego #5
Trishthedish wants to merge 2 commits into
Ada-C6:masterfrom
Trishthedish:master

Conversation

@Trishthedish

@Trishthedish Trishthedish commented Nov 29, 2016

Copy link
Copy Markdown

Wave 1 - First View ✅
Have a QuoteView class extended from Backbone.View (in src/app/views/quote_view.js).
The QuoteView should:
Have an initialize function that should:
Receive and store a JavaScript object with quote data (symbol and price). See Example Stocks for inspiration.✅
Compile an Underscore template using the script named tmpl-quote-view (which is already defined in index.html).✅
Have a render function that should:
Use the compiled template to render HTML for a single quote, using the quote data stored by initialize.✅
Wave 2 - Second View
In this wave we will create a second Backbone view, ApplicationView, which is responsible for displaying our entire web application. It will manage a list of QuoteView instances and render each of them. In order to achieve this your application should:

Primary Requirements:
Have an ApplicationView class extended from Backbone.View (in src/app/views/application_view.js).✅
The ApplicationView should:
Have an initialize function that should:✅
Receive and store a list of quote data objects.✅
Compile the same Underscore template from Wave 1. This compiled template will replace the one used in QuoteView during Wave 1.✅
Create and store a list of at least two QuoteView instances. Each instance should be given:
The data for a single quote.✅
The compiled Underscore template from the above step.✅
Store the HTML unordered list element from index.html that will contain the list of rendered quotes.✅
Have a render function that should:
Render each QuoteView instance in the list created within initialize.✅
Use the stored HTML unordered list element.✅
Append to that element the jQuery object for each QuoteView instance we rendered.
Wave 3 - Events✅

In this wave we will extend our QuoteView class to support clicking on the Buy and Sell buttons for each quote. In order to achieve this your application should be updated so that:
Primary Requirements
The QuoteView class should:
Have an events property that defines two handlers for the click event, one for each button in the quote template.✅
Have a function that runs when the click event happens on the buy button. This function should:
Increase the stock's price by a fixed amount (say, $1.00).✅
Re-render the view so that the new price is displayed to the user. ✅
Have a function that runs when the click event happens on the sell button. This function should:
Decrease the stocks' price by a fixed amount (say, $1.00).✅
Re-render the view so that the new price is displayed to the user. ✅


@PilgrimMemoirs: I relied heavily on comparing what we did in our live backbone code. I also asked lots of questions of my classmates. As I had to leave early for doctors appointment. Things are working but I'm not sure I would be able to repeat process without looking back at past projects. Also, I failed to have as many commit messages, as I typically use.

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.

1 participant