I'm looking for some general tips on how to keep my Javascript organized and modular.
The latest javascript heavy project i've worked on looks like [the following][1] (formatted http://jsfiddle.net/wdkZd/)
As you can i see i try to namespace my javascript and build quite some seperate functions. Still, when i need to implement features afterwards i can still get lost in my own code sometimes. And i'm getting the idea i can do better on organizing my code.
Any general pointers based on what u can see here?
For the past 2 years i have been working on a project with a rather large (10000+ lines) javascript codebase, involving, more than 30 active javascript developers.
As such you can probably imagine we have had our share of misery trying to keep the code up to shape and it all making sense and easily maintainable (it's a highly agile environment, where specifications change weekly if not more often)
Some of the ways we have tried to tackle the structure problems are as follows:
Some practices I follow for keeping my Javascript Organized:
and looking at your JS, it seem to be pretty organized. Since you are developing plugin, it would be a good option to have ability to cherry pick modules while downloading your plugin. Something similar to Jquery UI
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With