3 ms·
Future of code editors for JavaScript: keeping it more DRY and easy Refactor
- pedalpete 13y agoI've been struggling with this same issue a bit while I'm building an editor in javascript. My problem isn't only in the ability to keep DRY, but in Angular, when I want to include modules, and bind controllers to directives, etc. I don't want to have to keep diving into the code to update the injection. However, I disagree that this is the job of the editor/IDE. What I've done instead is built a config file which manages my injection for me, and I'm looking at extending the config manager to use either Require.js or Browserify (I'm leaning toward Browserify). Any thoughts on that? would you prefer the IDE to manage this? Or is doing this through a config/build process possibly a good solution?
- ttty 13y agoFrom my point of view the refactoring should be completely managed by the IDE. About the other stuff that can be DRY-ed I think could be managed by the IDE too. But don't forget the right tool for the right job. If you need class hierarchy don't use the 'instance' option in the IDE, use proper class hierarchy. The 'instance' for code should be for stuff that cannot be or is not worth to encapsulate within a single method. Thanks for the comment, pedalpete.