Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

With the danger of fragmentation due to the fork in Node, how can I make sure a "Node" project will run across both Node and its fork?

The hope is that they will join together again once Joyent and the creators of io.js resolve their differences but one cannot hope that this will definitely be the case. So as a node contributor it would make sense to bet on both options and having your codebase require less maintenance if the fork does become a long term one.

share|improve this question

closed as too broad by gnat, GlenH7, Jörg W Mittag, Snowman, MichaelT Jan 16 at 3:46

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. If this question can be reworded to fit the rules in the help center, please edit the question.

    
Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask –  gnat Jan 14 at 14:53
    
@gnat I havn't used io yet and don't intend to unless I'm required to support it. I don't have research yet on what appears to be a moving target unless you use it. I want to hear from those that have to support both. –  Nikos Jan 14 at 15:27
3  
I don't think anyone other than the maintainers of those projects can provide an answer to this question, and even that is doubtful. –  Snowman Jan 14 at 16:39
    
@Snowman can you create a tag for io.js? –  Nikos Jan 15 at 15:33

2 Answers 2

The same way you always do when trying to make a program "platform independent":

  • you try to use only features available on both platforms

  • you provide different implementations for functions where this not possible, and switch between the implementation by detecting which platform you are using

  • and the most important step: you test it on both platforms

share|improve this answer

The likely problem is if you adopt IOjs your code (if you are using newer features) will only work there. It will not work on node (v10x)...unless you stick to es5.

share|improve this answer
    
I am not following how this answers the question from the OP: how do I make sure the code will run in both projects? –  Adam Zuckerman Jan 15 at 0:36
1  
Are you saying to use EcmaScript 5? If so, I think you might have missed the point of the question. –  Adam Zuckerman Jan 15 at 1:51
2  
@Hey: "nobody else here has mentioned any frameworks" - nobody but the OP in the headline of the question? I give you a hint - readwrite.com/2015/01/13/io-js-fork-node-js-version-1-0 –  Doc Brown Jan 15 at 7:38
1  
@Hey: the term (as many other terms in software development) is not used strictly used. I think it is pretty clear what AdamZuckerman meant in his comment. So can you confer that the only difference between IO.js and Node.js is the version of the programming language (es6 instead of es5)? From looking at the changelog of IO.js, I was under the impression there were some other differences level of the provided libraries or modules. –  Doc Brown Jan 15 at 8:55
1  
@AdamZuckerman that analogy doesn't fit, though. It's more like they used to make 15" wheels, after the split, the newer company makes 15" and also 16" wheels. Chovy's answer is like saying stick with 15" wheels and you can still get them from both companies. –  Hey Jan 15 at 18:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.