One important aspect to remember about Javascript is that it is a prototype language. Functions can be objects, and everything can be placed in an object, often touching related objects in the process. Because of this, there is no official way to "expand" an object. This is a concept by which it is still difficult for me to understand.
Javascript "acts" like any other OOP language, for the most part, with some exceptions, namely with the extension of objects (http://jsweeneydev.net84.net/blog/Javascript_Prototype.html).
After extensive research, I found a very, very easy way to simulate expanding objects (I use it in my GameAPI). The first field is the parent object, the second is the object that is expanding.
extend : function(SuperFunction, SubFunction) {
This link may fix some problems and misconceptions: http://www.coolpage.com/developer/javascript/Correct%20OOP%20for%20Javascript.html
Personally, I tend to be an anti-framework, and I have not yet seen a framework that does not force the programmer to significantly change his programming style in this regard. More energy for you if you find it, but most likely you will not need it.
My best advice is to try and adapt to the Javascript prototype style, rather than impose old methodologies on it. I know this is difficult. I'm still trying to myself.
The most successful thing to dig in the fire.
Jeffrey sweeney
source share