Re: Design for Extension
- From: Thomas Weidenfeller <nobody@xxxxxxxxxxxxxxxx>
- Date: Tue, 17 Jan 2006 11:50:14 +0100
Martin Ankerl wrote:
Hi! I have recently read about Design for Extension [1], which says that all your methods should be either
* abstract, * final, or * have an empty implementation
This forces you to design the classes for extension, i.e. provide hooks for each extension you need. I used to be an opponent of final methods, because you never know in advance when you have to extend something. But from the viewpoint described in [1] this makes a lot of sense. What are the opinions on this topic?
It is religion. If you are in need of another faith, then consider XP. One of the fundamentals of XP is
*You ain't gonna need it*
Which e.g. means, you do not explicitly design your stuff to be expendable, unless the extension is needed right at the moment. The XP arguments for doing so also make sense.
/Thomas -- The comp.lang.java.gui FAQ: ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/ .
- Follow-Ups:
- Re: Design for Extension
- From: Martin Ankerl
- Re: Design for Extension
- From: Martin Ankerl
- Re: Design for Extension
- From: iamfractal
- Re: Design for Extension
- References:
- Design for Extension
- From: Martin Ankerl
- Design for Extension
- Prev by Date: Re: Unable to know if a socket is closed
- Next by Date: java.net.SocketException: Connection reset
- Previous by thread: Design for Extension
- Next by thread: Re: Design for Extension
- Index(es):
Relevant Pages
|