User Tools

Site Tools


leading-edge_java_a_conversation_with_erich_gamma

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
leading-edge_java_a_conversation_with_erich_gamma [2014/02/07 08:15]
yann
leading-edge_java_a_conversation_with_erich_gamma [2014/02/07 08:17]
yann
Line 22: Line 22:
   * program to an interface, not an implementation;​   * program to an interface, not an implementation;​
   * composition versus inheritance.   * composition versus inheritance.
-The arguments are usual and in a way recall the discussions by [[/​doku.php?​id=evolving_java-based_apis|Des Rivières]] but with an emphasis on dependencies and how "​[it]'​s easy to add a dependency on a class. It's almost too easy" and on abstract classes wrt. interfaces, because abstract classes can have behaviours added without breaking existing clients. Gamma also recalls that "​abstractions plus the methods names define the vocabulary"​ of a software system. He also reminds that "​[c]omposition is using inheritance,​ but typically you just implement a small interface"​ rather than sub-classing deep, large hierarchies. This argument recalls also the principle of [[http://​stackoverflow.com/​questions/​4205130/​what-is-duck-typing|duck typing]].+The arguments are usual and in a way recall the discussions by his former colleague ​[[evolving_java-based_apis|Des Rivières]] but with an emphasis on dependencies and how "​[it]'​s easy to add a dependency on a class. It's almost too easy" and on abstract classes wrt. interfaces, because abstract classes can have behaviours added without breaking existing clients. Gamma also recalls that "​abstractions plus the methods names define the vocabulary"​ of a software system. He also reminds that "​[c]omposition is using inheritance,​ but typically you just implement a small interface"​ rather than sub-classing deep, large hierarchies. This argument recalls also the principle of [[http://​stackoverflow.com/​questions/​4205130/​what-is-duck-typing|duck typing]] ​and that, with composition,​ "you get customisation by configuration"​.
leading-edge_java_a_conversation_with_erich_gamma.txt · Last modified: 2019/10/06 20:37 (external edit)