Loading ...
Sorry, an error occurred while loading the content.

Re: [XP] Re: XP or design patterns?

Expand Messages
  • Nat Pryce
    From: gorowitch ... [snip] ... If you follow XP guidelines, such as No Big Design Up Front , Once and Only Once , Refactor
    Message 1 of 2 , Feb 1, 2002
    • 0 Attachment
      From: "gorowitch" <gorowitch@...>
      > --- In extremeprogramming@y..., "hepabolu" <hepabolu@h...> wrote:
      > > Hi all,
      > >
      > > I'm studying design patterns and Java and XP in order to write
      > better
      > > software for my research project. I hope some of you can help me
      > > decide on the best way to handle this.
      > >
      > > The situation is this:
      > [lot of text snipped away]
      [snip]
      > The short anwer is to "program to an interface and not to an
      > implementation". You'll probably end up having a Searcher, a Query, a
      > Connection, a Result (all interfaces). Then write your classes to that
      > interface. But read Design Patterns first, things will clear up.

      If you follow XP guidelines, such as "No Big Design Up Front", "Once and
      Only Once", "Refactor Mercilessly" and "You Aren't Gonna Need It", the use
      of design patterns, and the definition of interfaces, will appear through
      refactoring. Start by building a working system that does part of what you
      need, but actually works end-to-end. Then extend the system so that it
      always has end-to-end functionality. As you add to the system, refactor out
      commonality into abstractions. Maybe the abstractions will best be
      expressed as interfaces and implementations or the use of design patterns,
      or maybe they won't.

      E.g. when your system only uses one database, there is no need to abstract
      out queries, connections, results etc. As you add new databases, merciless
      refactoring will factor out the commonalities between database APIs into
      generic base classes and/or interfaces.

      Cheers,
      Nat.

      ________________________________
      Dr. Nathaniel Pryce
      B13media Ltd.
      40-41 Whiskin St, London, EC1R 0BP, UK
      http://www.b13media.com
    • gorowitch
      ... Query, a ... that ... and ... the use ... through ... what you ... it ... refactor out ... patterns, ... Agreed. But first things first. First understand
      Message 2 of 2 , Feb 5, 2002
      • 0 Attachment
        --- In extremeprogramming@y..., "Nat Pryce" <nat.pryce@b...> wrote:
        > From: "gorowitch" <gorowitch@y...>
        > > --- In extremeprogramming@y..., "hepabolu" <hepabolu@h...> wrote:
        > > > Hi all,
        > > >
        > > > I'm studying design patterns and Java and XP in order to write
        > > better
        > > > software for my research project. I hope some of you can help me
        > > > decide on the best way to handle this.
        > > >
        > > > The situation is this:
        > > [lot of text snipped away]
        > [snip]
        > > The short anwer is to "program to an interface and not to an
        > > implementation". You'll probably end up having a Searcher, a
        Query, a
        > > Connection, a Result (all interfaces). Then write your classes to
        that
        > > interface. But read Design Patterns first, things will clear up.
        >
        > If you follow XP guidelines, such as "No Big Design Up Front", "Once
        and
        > Only Once", "Refactor Mercilessly" and "You Aren't Gonna Need It",
        the use
        > of design patterns, and the definition of interfaces, will appear
        through
        > refactoring. Start by building a working system that does part of
        what you
        > need, but actually works end-to-end. Then extend the system so that
        it
        > always has end-to-end functionality. As you add to the system,
        refactor out
        > commonality into abstractions. Maybe the abstractions will best be
        > expressed as interfaces and implementations or the use of design
        patterns,
        > or maybe they won't.

        Agreed.

        But first things first. First understand XP, First understand Design
        Patterns. Then make a choice. Remember the OP is still _studying_ .

        Kind Regards,
        Sven.
      Your message has been successfully submitted and would be delivered to recipients shortly.