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

Re: [XP] Pattern Encoded Suffix

Expand Messages
  • George Dinwiddie
    Marvin, ... What is a My? In my opinion, having a class BookingBO (or, preferably, BookingBusinessObject) only seems reasonable if it implements the Booking
    Message 1 of 191 , Aug 9, 2012
    • 0 Attachment
      Marvin,

      On 8/9/12 3:07 PM, MarvinToll.com wrote:
      > George,
      >
      > The post quotes Tim Ottinger as follows...:
      >
      > "Remember that the people who read your code will be programmers. So
      > go ahead and use computer science terms, algorithm names, pattern
      > names, math terms and so forth. … The name AccountVisitor means a
      > great deal to a programmer who is familiar with the Visitor pattern."
      > (p. 27 - Clean Code: A Handbook of Agile Software Craftsmanship)
      >
      > ... and makes the case for a two character suffix (MyBO) being *less*
      > intrusive then something like:
      >
      > MyBusinessObject
      >
      > http://wp.me/P1FU3L-Ag

      What is a "My?"

      In my opinion, having a class BookingBO (or, preferably,
      BookingBusinessObject) only seems reasonable if it implements the
      Booking interface and is used only via that interface. But, I don't like
      the "Business Object" pattern, anyway. That's really just a C struct in
      disguise. Having separate data objects and code objects is a huge
      mistake, in my opinion. I encapsulated my C structs within modules in C;
      I see no reason to lose that encapsulation in an OO language.

      I'm more likely to have a BookingBusinessFacade which is just a proxy
      for a remote class that also implements the Booking interface.

      - George

      >
      > _Marvin
      >
      > --- In extremeprogramming@yahoogroups.com, George Dinwiddie <lists@...> wrote:
      >>
      >> That's marvelous! I was going to suggest Tim Ottinger's paper,
      >> Ottinger's Rules for Variable and Class Naming
      >> (http://objectmentor.com/resources/articles/Naming.pdf). I like your
      >> "thoughtful & deliberate" suggestion even better.
      >>
      >> - George

      --
      ----------------------------------------------------------------------
      * George Dinwiddie * http://blog.gdinwiddie.com
      Software Development http://www.idiacomputing.com
      Consultant and Coach http://www.agilemaryland.org
      ----------------------------------------------------------------------
    • MarvinToll.com
      Jeff, Thanks for your feedback. The notion that a a Java author precisely considers whether they are using one of the two exception mechanisms to indicate a
      Message 191 of 191 , Sep 23, 2012
      • 0 Attachment
        Jeff,

        Thanks for your feedback.

        The notion that a a Java author precisely considers whether they are using one of the two exception mechanisms to indicate a true unanticipated exceptional break-down, or as an indication of alternate path processing (e.g. instead of return codes), is the thought-path I'm suggesting for consideration.

        As you mentioned (twice), there are contexts where the author could be wrong... and the code catching can respond as required.

        Said another way, I'm suggesting that authors throwing exceptions clarify the intended usage... even though a client's corner-case might warrant a different course than the author anticipated.

        _Marvin
        PatternEnabled.com

        --- In extremeprogramming@yahoogroups.com, "JeffGrigg" <jeffreytoddgrigg@...> wrote:
        >
        > The code that throws an exception should not (and cannot reasonably) know how the code that catches it will handle it. It's the responsibility of the code that catches the exception to do the right thing.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.