Re: Design for Extension



Actually I think "Design for Extension" can work very well with XP. The
difference from the normal approach is, that whenever you need to
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
first.

I think this might be a very good way of developing software. These are
the advantages/dissadvantages I see with this approach:

+ No beeing able to forgett to call super() in a subclass
+ Whenever behaviour of the base class is modified, it is done at a
place where it is designed to be extended.

- You have to be able to access and modify all the code you have to be
able to add hooks which can be very problematic with libraries.

--
Martin Ankerl | http://martinus.geekisp.com/

.



Relevant Pages

  • 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: Why return None?
    ... > That extend doesn't work for strings and tupples is irrelevant. ... If lists were being designed from scratch today, ... A "greenfield design", an entirely new language designed from scratch, ...
    (comp.lang.python)
  • 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: The OO approach
    ... creating code and the functions working on the data together, ... you notice that sometimes you extend a data ... original data structure to> and from> ... ... design choices that can be made in the system (do you hand the object ...
    (comp.lang.forth)
  • 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)