Skip to main content

Abstract

Programming in terms of interfaces is a fundamental concept in OO systems in general and the Gang-of-Four design patterns in particular. Nonetheless, many Java programmers make little use of interfaces (and overuse the extends relationship). This chapter explains the problems with extends and how you can solve some of those problems with interfaces. I also introduce a few of the Creational patterns that simplify interface-based programming.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Allen Holub

About this chapter

Cite this chapter

Holub, A. (2004). Programming with Interfaces, and a Few Creational Patterns. In: Holub on Patterns: Learning Design Patterns by Looking at Code. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-0725-2_2

Download citation

  • DOI: https://doi.org/10.1007/978-1-4302-0725-2_2

  • Publisher Name: Apress, Berkeley, CA

  • Print ISBN: 978-1-4302-5361-7

  • Online ISBN: 978-1-4302-0725-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics