Ask HN: How to write OO JavaScript that is both readable and IDE-compatible?
The code now is more structured, clean, and obviously better.
My coworker is a super-great programmer, I personally respect him very much both humanly and professionaly, but this whole refactoring has made me thinking about one thing, and that is: IDE Compliance.
We are using an IDE (netbeans in this case) to develop our app, but I found that if we write JS this way the IDE won't give autocomplete suggestions decently. So, while we get all the beauty of OOP, we don't get to know what are the available methods of an object unless we "remember" them.
Personally I think this can and should be improved because if another person comes onto the team he/her wouldn't know how to interact with our "framework" unless he starts digging into the code.
What was your experience on this? Is there a way we can write clean OO JS code that is also indexable from an IDE?
6 comments
[ 13.1 ms ] story [ 716 ms ] threadWhy don't you try TypeScript? Can be easily integrated with the existing JS codebase.
WebStorm seems pretty good at JavaScript prototyping/inheritance and auto-complete.
I know they are good (using webstorm for Haptime, my product, and was a long fan of IntelliJ idea in java).
We're using Java so the price is a bit higher to get Intellij, but I'm still thinking about this as a solution to improve the situation