Interface segregation principle

from Wikipedia, the free encyclopedia

The interface segregation principle or interface allocation principle is a term used in computer science . It is a principle of object-oriented design . Thus are too large interfaces are split into multiple interfaces when implementing classes must have unnecessary methods. After successfully applying this design principle, a module that uses an interface would only have to implement those methods that it really needs.

purpose

This principle makes it possible to implement the lean interfaces required by Bertrand Meyer , which results in improved maintainability, since classes only implement the methods that they need. This makes the code compact and easier to recycle. There is also improved verifiability.

Individual evidence

  1. Wolfgang Kowarschick: Programming principles: Interface segregation principle, Interface segregation principle. GlossaryWiki of the Augsburg University of Applied Sciences (HSA), February 23, 2012, archived from the original on February 23, 2012 ; Retrieved June 26, 2012 .