jeudi 16 juin 2016

Pattern name for putting "barriers" between classes

Sometimes putting a "barrier" between classes can be very helpful in the long run (although it seems a problem at the beginning). For example, in Rails models are not able to call the controller or the views. This helps having clean/testable/flexible code. Is there a name for this?

For example, when all the classes have references to other classes and are able to send messages to them, you end with code that is coupled.

Aucun commentaire:

Enregistrer un commentaire