Design for Extension



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/

.



Relevant Pages

  • Re: FGW Refurb
    ... The table sockets are of an extremely poor design. ... but I am a Macbook Pro user and haven't had a problem. ... Are you using it with the plug directly attached to the power brick or with the extension attached? ...
    (uk.railway)
  • Re: Extending Dining Room Table Help Needed
    ... Extension tables can be a little intimidating - The toughest part of your ... table design, and work backwards off of your overall dimensions. ... extra leaves between the table top and pedestals. ... so all I need now is as plan. ...
    (rec.woodworking)
  • Re: Design for Extension
    ... Actually I think "Design for Extension" can work very well with XP. ... extend a class, you cannot just make a subclass and override a method; ... you need to refactor the base class and add an extension hook somewhere ...
    (comp.lang.java.programmer)
  • Re: Design for Extension
    ... Actually I think "Design for Extension" can work very well with XP. ... extend a class, you cannot just make a subclass and override a method; ... you need to refactor the base class and add an extension hook somewhere ...
    (comp.lang.java.programmer)
  • Re: Can one tell Explorer to accept filesnames containing only an extension?
    ... that it does not accept filenames that only have an extension. ... I would say it is a poor crossplatform design if You have to rename ... Can't one tell Explorer to just shut up and accept such filenames, ...
    (microsoft.public.windowsxp.customize)