Closed adambutler closed 7 years ago
I like the class
approach, even though it requires considerable extra work for QS 2 and 3. I guess I'd better get to it then.
On the whole "Modernize JavaScript" bit though, there is the ongoing discussion of targeting a larger audience with ES5 or staying relevant and on the edge with ESx. Looking through the building blocks in NDP it seems we're already using some ES6, so I guess I could live with having ES6 here as well.
On the whole "Modernize JavaScript" bit though, there is the ongoing discussion of targeting a larger audience with ES5 or staying relevant and on the edge with ESx.
@AlexLakatos as our JS Advocate this is your call.
We do also need to remember that we need to update the Node library (beta) and add additional commands to the CLI (beta) for managing conversations, users, members etc. Does the class
approach provide enough benefit to mean the rework outweighs the benefits of doing these other updates sooner?
That's where QS3 is anyway, using the ES5 function
as class
. It's not rewriting everything, it's just mashing my changes with @adambutler 's.
And I think it's worth taking the extra time to do these here and now, it makes the code look cleaner and loose the "work in progress" approach in favor of a "production" approach.
app.getConversations
in favour of simpler singulargetConversation
given that we know the ID anyway.conversation
to global scope, also removes the need to setup an unassigned variable at the start.