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

TODO: Decide on javascript version and coding style #16

Open
Yuleblinker opened this issue May 5, 2017 · 6 comments
Open

TODO: Decide on javascript version and coding style #16

Yuleblinker opened this issue May 5, 2017 · 6 comments

Comments

@Yuleblinker
Copy link
Member

Yuleblinker commented May 5, 2017

Those wishing to contribute will have different levels of experience in Javascript coding and Javascript versions e.g. ES5, ES6 . At some point in the is project it is likely a decision will need to be made by the group as to which version of Javascript to adopt as the project standard.

Do we now, or in the future want to standardise on ES6? Inisiting at this stage in the project that all code conforms 'strctly' to ES6 syntax, styling and features may, however, discourage those who are not yet familiar with ES6 to contribute. Also, if we adopt a suitably modular approach to the application model then individuals or teams can work on their own part using whatever Javascript style they are comfortable with. All that's necessary is that the 'modules', 'objects' or 'code chunks (or whatever you want to call them) have clearly defined, and agree upon, inputs and outputs. This highlights the necessity of a clearly defined model for the application (please consider, discuss and contribute to to this issue #15 and this file https://www.draw.io/#HWintergatan%2FMidi-to-laser-cutter%2Fmaster%2FUML%2FApplication%20model.xml)

Please comment below if you have any thoughts on which Javascript version and coding style to adopt.

@ChemiCalChems
Copy link
Member

What are we coding in right now? ES5, ES6? As I have already said a couple of times, I don't have experience with JS that much, I just get stuff done.

Is there a resource where one can check differences between ES5 and ES6?

@Yuleblinker
Copy link
Member Author

The code that's been done so far is ES5. A good place to see some ES5 side-by-side with ES6 equivalents is: http://es6-features.org/#BlockScopedVariables

@Lars-Kristian
Copy link
Contributor

The javascript code that we are publishing, should always be ES5. But often the source code is run through a transpiler like babel js or similar (ES6 to ES5). This is what I have done with the other prototype (TS to ES5).

@drallieiv
Copy link

ES6 is not natively supported by browsers, or at least not completely. So public client site Javascript is always transpiled to ES5 (using babel), but you can directly run ES6 on a node.js backend.

@Pierstoval
Copy link

I think it's good to keep the work going in ES5 for now, and when the project will be much more mature, rewrite it.

As it's more like a POC now, I think it's better for now to focus on the features, and rewrite when features list are 100% complete and the project can be divided into "scenarios", "features list", decoupled into app logic and business layers.
Maintainability is not 100% mandatory for a POC 😄

I'm just seeing this from an external point as a web-developer 🙂

@DrSkunk
Copy link
Member

DrSkunk commented Jul 31, 2017

ES5 is chosen for compatibility. Should be added to CONTRIBUTING

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

No branches or pull requests

6 participants