-
Notifications
You must be signed in to change notification settings - Fork 43
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
Pipes - Nkiru - Adatrader #42
base: master
Are you sure you want to change the base?
Conversation
Ada TraderWhat We're Looking For
This is a good start! While there's still some functionality missing around limit orders, it seems like you've addressed the core learning goals of the project, using events to manage a large app with multiple related components. Code is generally easy to read and understand, and with a couple of exceptions the design is well organized. 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. Keep studying and thinking about them, always trying to come up with cleaner, more robust designs, and keep up the hard work! |
const orderEntryView = new OrderEntryView({ | ||
el: '.order-entry-form', | ||
bus: bus, | ||
quotesList: quotes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I very much like that you pass the quote list directly to the OrderEntryView
. Building this connection (as opposed to using the event bus or something else) will make your program's design much simpler.
buy(event) { | ||
event.preventDefault(); | ||
console.log('test1'); | ||
let orderData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you take out the console.log
s, this function and sell()
are almost identical. Could you consolidate the two somehow?
} | ||
|
||
this.bus.trigger('newOrder', order); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems odd to me that the OrderEntryView
and the OrderListView
communicate through the bus. It might be cleaner to have them both know about the OrderList
, or even for them to be combined into a single view.
Ada Trader
Congratulations! You're submitting your assignment!
Comprehension Questions