In the previous section, we saw that inheriting properties from a parent class prototype provides a great deal of reusability. In some cases, we may want to re-use similar methods in multiple views, models, or collections. This can be achieved by creating a parent class that they can extend; however, it is not always a good practice as it creates some unnecessary layers and meaningless subtypes.
For example, assume that you want the view element of
UserItemView, which already extends
BaseView, to be draggable. So you include a
DraggableView class that extends the
BaseView class, and your
DraggableView. Now there is a sudden change in the requirement and you are asked to make the view named