I am developing some basic utility objects in javascript. These are things like:
spinner {
// generates a spinner
}
dialog {
// generates a dialog
}
wysiwyg {
// generates a wysiwyg editable
}
etc.
Once I have amassed a collection of basic utility objects, I would like to create more specific, complex objects for working on different sets of data. For example, an object to edit a list of records.
I am wondering: What is the best way to incorporate the functionality of my utility objects, into my more complex, specialized objects?
Multiple inheritance? For example, an object editList which is created from the parents dialog and spinner, and then augmented? Or is it better design practice to generate new instances of my utility objects inside of my more complex objects?
Thanks in advance for your help.