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

Re: [XP] Re: XP and hierarchical layering

Expand Messages
  • Joe Tatem
    As I read this thread, I find myself asking Why not? Where is the problem with looking across the set of stories and noticing that a particular architectural
    Message 1 of 4 , Oct 5, 2000
    • 0 Attachment
      As I read this thread, I find myself asking "Why not?" Where is the
      problem with looking across the set of stories and noticing that a
      particular architectural pattern suggests itself and applying it? In
      fact, you could incorporate it into the System Metaphor. Must I always
      discover the pattern as I go or can I think ahead and save myself some
      refactoring? I know that I am overreacting a bit but I get the definite
      impression that YAGNI is forcing me to discover architectural patterns
      as I go and preventing me from anticipating them up front.

      To use the 2 examples that have been mentioned: If I am working on a
      distributed system with a lot of complexity, I would be inclined to
      *start* with a layered system because that is an architectural pattern
      that has been shown to work well for these kinds of systems. Similarly,
      I am working on a GUI, I am inclined to start with the Command pattern
      for the same reason. Perhaps this is accomplished during the CRC
      session?

      Joe

      Ian Rae wrote:
      >
      > --- In extremeprogramming@egroups.com, "Ken Bertapelle" <kenb@c...>
      > wrote:
      > > Hello All,
      > > [..]
      > >
      > > In general, does the XP point of view have a position on the
      > > benefits/drawbacks of hierarchical layering as a design technique?
      >
      > There's definitely an YouArentGonnaNeedIt suspicion in XP to many
      > 'big' solutions such as heirarchical layering.
      >
      > However layering is often a consequence of XP. In order to unit test
      > code you need to abstract away stuff that makes testing hard. Hence
      > mock objects and the layer(s) they produce.
      >
      > The OnceAndOnlyOnce principle often drives things towards layers
      > as well. For example, the centralization of Undo logic for a GUI
      > might lead to a CommandExecution layer.
      >
      > --Ian
      >
      > To Post a message, send it to: extremeprogramming@...
      >
      > To Unsubscribe, send a blank message to: extremeprogramming-unsubscribe@...
      >
      > Ad-free courtesy of objectmentor.com
    • Eric Hodges
      ... You can do this, but the risk is that there is a simpler way and you won t find it. My experience so far is that DTSTTCPW coupled with
      Message 2 of 4 , Oct 5, 2000
      • 0 Attachment
        > -----Original Message-----
        > From: Joe Tatem [mailto:jtatem@...]
        > Sent: Thursday, October 05, 2000 4:05 PM
        > To: extremeprogramming@egroups.com
        > Subject: Re: [XP] Re: XP and hierarchical layering
        >
        >
        > As I read this thread, I find myself asking "Why not?" Where is the
        > problem with looking across the set of stories and noticing that a
        > particular architectural pattern suggests itself and applying it? In
        > fact, you could incorporate it into the System Metaphor. Must I always
        > discover the pattern as I go or can I think ahead and save myself some
        > refactoring? I know that I am overreacting a bit but I get the definite
        > impression that YAGNI is forcing me to discover architectural patterns
        > as I go and preventing me from anticipating them up front.
        >
        > To use the 2 examples that have been mentioned: If I am working on a
        > distributed system with a lot of complexity, I would be inclined to
        > *start* with a layered system because that is an architectural pattern
        > that has been shown to work well for these kinds of systems. Similarly,
        > I am working on a GUI, I am inclined to start with the Command pattern
        > for the same reason. Perhaps this is accomplished during the CRC
        > session?

        You can do this, but the risk is that there is a simpler way and you won't
        find it. My experience so far is that DTSTTCPW coupled with
        MercilessRefactoring will produce all the architectural patterns I need,
        with the added benefit of not producing the ones I don't need.

        I'm sure there are exceptions, I just haven't found them yet. I'm also sure
        I'm probably guiding the process a bit because of my knowledge of patterns,
        but with well refactored code it isn't difficult to produce them late in the
        game. It's like lazy construction.
      • Joe Tatem
        ... What I m seeing is that it can work both ways. If, at the beginning, an inappropriate pattern suggests itself, it will be factored out. Conversely, if I
        Message 3 of 4 , Oct 6, 2000
        • 0 Attachment
          Eric Hodges wrote:
          >

          > You can do this, but the risk is that there is a simpler way and you won't
          > find it. My experience so far is that DTSTTCPW coupled with
          > MercilessRefactoring will produce all the architectural patterns I need,
          > with the added benefit of not producing the ones I don't need.

          What I'm seeing is that it can work both ways. If, at the beginning, an
          inappropriate pattern suggests itself, it will be factored out.
          Conversely, if I didn't see the pattern at the beginning, refactoring
          can produce it. What got my dander up (and moved me from lurking to
          posting) was the implication that trying to be smart and think ahead was
          somehow (gasp) BDUF and, therefore, not XP.

          >
          > I'm sure there are exceptions, I just haven't found them yet. I'm also sure
          > I'm probably guiding the process a bit because of my knowledge of patterns,
          > but with well refactored code it isn't difficult to produce them late in the
          > game. It's like lazy construction.

          I am starting to believe that an important ingredient of a successful XP
          team is a couple of members with knowledge and experience with design
          patterns. This is not surprising considering the community from which XP
          came.

          Joe
        • Eric Hodges
          ... From: Joe Tatem To: Sent: Friday, October 06, 2000 1:05 PM Subject: Re: [XP] Re: XP and hierarchical
          Message 4 of 4 , Oct 6, 2000
          • 0 Attachment
            ----- Original Message -----
            From: "Joe Tatem" <jtatem@...>
            To: <extremeprogramming@egroups.com>
            Sent: Friday, October 06, 2000 1:05 PM
            Subject: Re: [XP] Re: XP and hierarchical layering


            > Eric Hodges wrote:
            > >
            >
            > > You can do this, but the risk is that there is a simpler way and you
            won't
            > > find it. My experience so far is that DTSTTCPW coupled with
            > > MercilessRefactoring will produce all the architectural patterns I need,
            > > with the added benefit of not producing the ones I don't need.
            >
            > What I'm seeing is that it can work both ways. If, at the beginning, an
            > inappropriate pattern suggests itself, it will be factored out.
            > Conversely, if I didn't see the pattern at the beginning, refactoring
            > can produce it. What got my dander up (and moved me from lurking to
            > posting) was the implication that trying to be smart and think ahead was
            > somehow (gasp) BDUF and, therefore, not XP.

            There's a story at the end of Kent Beck's XP book about a "expectation". I
            think XP frowns upon too much thinking ahead. The gist of the story is that
            expectations increase the time it takes to react to the unexpected.

            It's like in baseball. If you try to outsmart the pitcher, you've given him
            an edge. If he gets you looking low and away, he can throw a fastball right
            down the middle. By the time you realize what's going on all you can do is
            foul it away or watch it hit the catcher's mitt. Most of the power hitters
            (not the batting average hitters) practice "See the ball, hit the ball."
            Zen mind is no mind.

            There is an assumption behind BDUF processes that the same kind of events
            will always occur, and we can get an advantage by predicting them. XP seems
            to tailored to domains that are far from equlibrium, where the events appear
            to be chaotic, or the forces behind them are so complex that it takes longer
            to predict them than it does to react to them.

            >
            > >
            > > I'm sure there are exceptions, I just haven't found them yet. I'm also
            sure
            > > I'm probably guiding the process a bit because of my knowledge of
            patterns,
            > > but with well refactored code it isn't difficult to produce them late in
            the
            > > game. It's like lazy construction.
            >
            > I am starting to believe that an important ingredient of a successful XP
            > team is a couple of members with knowledge and experience with design
            > patterns. This is not surprising considering the community from which XP
            > came.

            Smart people do smart things. But I'm starting to wonder if smart
            programmers without design pattern knowledge might generate the same
            patterns just by refactoring. Or even better patterns than those most of us
            know.

            Brian Eno said similar things about musicianship. He refused to learn to
            play the guitar, even though he played it on several albums. He felt like
            most guitar players learned a set of riffs and this limited their
            creativity. They could play the riffs fast, but their solos were filled
            with the same sorts of riffs over and over. By remaining naive, he felt he
            could really listen to the rest of the music and play just the right notes
            at the right times (as long as they weren't too fast.)
          Your message has been successfully submitted and would be delivered to recipients shortly.