Re: Design for Extension



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/
.



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)