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

Carets —Amy Lee #40

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

Carets —Amy Lee #40

wants to merge 21 commits into from

Conversation

ayjlee
Copy link

@ayjlee ayjlee commented Dec 18, 2017

Ada Trader

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How do Backbone Views help structure your code? Views create more structure and organization to the code. Each view is given a domain on the DOM that it is responsible for rendering and a model or collection that it can listen to for changes that might warrant a re-rendering of the elements in that section of the page. Views also allow us to listen and trigger events for activity on specific parts of the page, instead of having event listeners in app.js that are listening to all parts of the page at all times.
Did you use jQuery directly in your Views? How, and why? I use a jQuery like selector via ‘this.$’. My understanding is that we don’t use jQuery directly in the view, but instead, we can assign it an ‘$el’ attribute to specify which part of the DOM this View is responsible for, and then use ‘this.$’ to specify a specific part of that element we want to target.
What was an example of an event you triggered? Why did you need to trigger it? I triggered a ‘newTrade’ event after we buy or sell a quote, and after an open order is successfully placed. I had to trigger it in the event bus because I decided to create a separate model, view, and collection for Trades. Because buying quotes and fulfilling an Open Order happened in different views, models, and collections, I needed to trigger the event in the bus to notify the Trade model and views that there is a newTrade object to add to our Trade collection, and to render the new trade in the view for Trade History
In what was is unit testing in JavaScript similar to unit testing in Ruby? In what ways is it different? we can still use blocks, describe, and if statements to test specific, modular features of our code.

…uccessfully rendering quotes on the ada trader homepage, basic functionality for buy and sell (price change) implemented
…used for practice with event bus), wave 2 basic requirement passing
…view by clearing the current contents of the Trade History section. Will need to refactor and clear notes later
…ught' or 'sold' to elements instead of id because multiple elements will share that status
…v ugly now, just a placeholder until further styling
…en order using a findWhere- had to pass the initialized QuoteList (Quotes) as a parameter for the new OrderListView in app.js so that I could create the connection between an order and the quote it should be listening to. Might need to refactor this later
… messages showing. Still need to implement validity of target Price against current market rates of quotes, and validity of symbol
…en you click the cancel button on the order view
…ng, some refactoring to get rid of unnecessary console logs and params included
@tildeee
Copy link

tildeee commented Jan 2, 2018

Ada Trader

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene ❇️ good professional commit messages
Comprehension questions x
Organization
Models and collections are defined in separate files x
Code that relies on the DOM is located in or called by $(document).ready x
Functionality
Quote prices change when clicking Buy and Sell x
The Trade History updates when buying and selling a quote x
A user can create an open order using the Order Entry Form x
An open order removes itself from the open orders and updates the Trade History when fulfilled x
General
Has separate views for different parts of the app x
Uses events (listening/handling and triggering) to manage different behavior in views x
Practices good standards for views (ES6 syntax, doesn't directly use jQuery, returns this in render) x
Error handling for the Order Entry Form x
Testing
Has unit tests for models When I run the tests, the validation tests fail?
Overall

@tildeee
Copy link

tildeee commented Jan 2, 2018

Overall, good work! Event-driven programming is always interesting, especially in contrast with the message-driven programming we've done otherwise. Keep in mind that event-driven is not the only solution available. Otherwise, great job!

ps: I like the touch of the border colors; it made it easier for me to grade ;)

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