Design for Extension
- From: "Martin Ankerl" <martin.ankerl@xxxxxxxxx>
- Date: 17 Jan 2006 01:11:42 -0800
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? I could not find anything with Google.
I am curious if anyone here has use this approach for a project and can
share his experience?
[1]
http://checkstyle.sourceforge.net/config_design.html#DesignForExtension
--
Martin Ankerl | http://martinus.geekisp.com/
.
- Follow-Ups:
- Re: Design for Extension
- From: Michael Redlich
- Re: Design for Extension
- From: Chris Uppal
- Re: Design for Extension
- From: Thomas Weidenfeller
- Re: Design for Extension
- Prev by Date: Re: Unable to know if a socket is closed
- Next by Date: JUnit - HTML report
- Previous by thread: help with nested for
- Next by thread: Re: Design for Extension
- Index(es):
Relevant Pages
|