You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our codebase is littered with directories called model which we have inherited from Tango. This is one of the world's silliest coding conventions, and as far as I can tell it is unique to Tango. It was started by one of the early Tango developers who misunderstood the model-view-controller pattern.
Now we've absorbed tango into ocean we ought to remove one of Tango's most bizarre mistakes.
Why it's wrong:
It's completely upside-down. A class hierarchy is like a tree. Derived classes grow from base classes. But because of the model directories, we have derived classes at the base, and the base classes are the leaves!
Navigation is difficult. The most important classes are hidden several levels deep.
This is turn encourages a bad OOP style. If you are doing real OOP programming you should be using abstract classes for anything except the constructor. But because it's easier to find the derived classes, you're tempted to use them directly. You read the docs for the derived class when you should be reading the docs for the base class. You're tempted to view the classes in 'model' as an implementation detail, the parts of the code which are shared between different concrete classes.
It's a muddle. 'model' in fact contains more than just abstract base classes. It also contains intermediate classes, which in some cases add no new interfaces, and only provide implementation of some methods. These classes really are implementation details.
The text was updated successfully, but these errors were encountered:
@don-clugston-sociomantic :
Our codebase is littered with directories called
model
which we have inherited from Tango. This is one of the world's silliest coding conventions, and as far as I can tell it is unique to Tango. It was started by one of the early Tango developers who misunderstood the model-view-controller pattern.Now we've absorbed tango into ocean we ought to remove one of Tango's most bizarre mistakes.
Why it's wrong:
model
directories, we have derived classes at the base, and the base classes are the leaves!The text was updated successfully, but these errors were encountered: