I am working on a project in which we do a lot of custom javascript and especially jquery in the mvc style project.
The only problem is that I keep adding more and more global functions / variables and they accumulate. I have several files, but I'm not sure how to split part of the material into separate files.
I thought about putting some of these functions and global variables into objects, but the syntax of the object in javascript seems a bit inconvenient to me (due to the lack of classic classes). Although, if I had a good example, perhaps I could come.
How do you feel about a project where global javascript functions and variables start to accumulate like this?
javascript jquery object global-variables refactoring
Mark rogers
source share