Talk:Index of object-oriented programming articles
![]() | This article is rated List-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
Notes
editI've moved this article from Glossary of object-oriented programming to List of object-oriented programming terms. If it ever starts to become a true glossary (i.e., with definitions), it can be moved back. - dcljr 09:05, 25 Oct 2004 (UTC)
We need a definition page for the verb 'to program to'. It is used extensively in the book 'Headfirst Design Patterns' but I do not know what it means, and I can not find it anywhere on the Internet. I know what the verb 'to program' means, but this book suggest that we 'program to' interfaces rather than implementations. I know what it means 'to program to meet' a set of requirements and this can be shortened to program to a set of requirements but for me the object oriented term 'to program to' does not compute. -jonrgrover 198.140.195.249 (talk) 13:54, 25 January 2008 (UTC) I forgot my password so I can not make this page myself.
Programming to interfaces is a concept of software design which improves reuse of code, since the code does not require knowledge of concrete implementation. For example, in java, you can code to a "List" interface. There are many ways to implement a list (concrete implementation). In java, implementing classes of the List interface are AbstractList, ArrayList, LinkedList and Vector (Reference: http://docs.oracle.com/javase/1.4.2/docs/api/java/util/List.html). If you program to a "List" interface, then you are able to use the code for any type of List, instead of the just the one you specified. — Preceding unsigned comment added by 208.73.159.49 (talk) 20:02, 24 January 2012 (UTC)