Sciweavers

JOT
2007

The Infer Type Refactoring and its Use for Interface-Based Programming

13 years 11 months ago
The Infer Type Refactoring and its Use for Interface-Based Programming
Interface-based programming, i.e. the systematic use of interface types in variable declarations, serves the decoupling of classes and increases a program’s changeability. To maximize this effect, interfaces should contain as few elements as possible. For the design of minimal (i.e., maximally general) interfaces, an in-depth analysis of the protocol needed from objects in a given context is required. However, currently available refactorings for the creation of such interfaces (such as Extract Interface) leave programmers alone with the decision what to include or, more importantly, what to omit: they let them choose manually from the protocol of a class, and only then offer the use of the new interface where (if) possible. To end this trial and error process, we have developed a new refactoring named Infer Type that, using type inference, completely automates the construction of new, context-specific interfaces and their use in variable declarations, thus supporting greater decoup...
Friedrich Steimann
Added 16 Dec 2010
Updated 16 Dec 2010
Type Journal
Year 2007
Where JOT
Authors Friedrich Steimann
Comments (0)