Conversation
| event.preventDefault(); | ||
| const formData = this.getFormData(); | ||
| formData['buy'] = event.target.classList[0] === ('btn-buy') ? true : false; | ||
| const newOrder = new Order(formData); |
There was a problem hiding this comment.
At this point you need to connect the new Order with its corresponding Quote. Probably the cleanest way to do this would be to add a function to QuoteList to get a Quote by symbol, and then pass the QuoteList into the OrderListView at instantiation.
This will allow you to validate the Order based on the current price, and to listen for price changes on the Quote so the Order can execute automatically when the price is right.
Ada TraderWhat We're Looking For
This is a good start, but this submission is missing functionality that comes from connecting an Event-driven programming is an important tool for the modern software engineer, especially in an asynchronous context like front-end JavaScript. It's also very different than the message-driven paradigm we've studied so far. Designing such programs is a unique challenge, as is knowing when and when not to use event-driven techniques. By this point you're probably mostly focused on your capstone project, but it would be worthwhile to spend some time focusing on this. Let me know if you want to sit down and work through making those connections together. |
Ada Trader
Congratulations! You're submitting your assignment!
Comprehension Questions