My project seems to be getting bigger and bigger and some of my classes are thousands of lines long, it's too hard to search through them every time I want to make changes.
I find javascript is not as easy to lay out cleanly as some other programming languages. So when the classes get to be a few thousand lines, I have troubles reading it.
I've tried splitting it into multiple files, but then you're breaking classes apart which doesn't seem right. For example, if every method in a class uses a global variable you would only be able to find the global variable in one of the files for that class.
Also, if I want to use the javascript code from 100 different .js files, I end up with something like this...
<script type="text/javascript" src="Scripts/classes/Node.js"></script>
<script type="text/javascript" src="Scripts/classes/Queue.js"></script>
<script type="text/javascript" src="Scripts/classes/DblyLinkedList.js"></script>
.... 97 more lines like this
Although I figured there may be something where I can do...
<script type="text/javascript" src="Scripts/.../*.js"></script>
or something similar... is that right?
Anyone have any tips on managing code as it reaches it's extremes?
Tips on cleaning up javascript code would also be helpful.