Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Insider News
  4. The Framework Superclass Anti-Pattern

The Framework Superclass Anti-Pattern

Scheduled Pinned Locked Moved The Insider News
htmlcomregexoop
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Terrence Dorsey
    wrote on last edited by
    #1

    Michael Feathers[^]:

    Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.

    As a framework designer, you have many other choices: eventing, listeners, and object composition.

    L P _ 3 Replies Last reply
    0
    • T Terrence Dorsey

      Michael Feathers[^]:

      Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.

      As a framework designer, you have many other choices: eventing, listeners, and object composition.

      L Offline
      L Offline
      LloydA111
      wrote on last edited by
      #2

      Terrence Dorsey wrote:

      If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework

      And they wonder why some people find programming difficult.

      =====
      \ | /
      \|/
      |
      |-----|
      | |
      |_ |
      _) | /
      _) __/_
      _) ____
      | /|
      | / |
      | |
      |-----|
      |

      ===

      1 Reply Last reply
      0
      • T Terrence Dorsey

        Michael Feathers[^]:

        Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.

        As a framework designer, you have many other choices: eventing, listeners, and object composition.

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        Oh, you mean like System.Windows.Forms.Form? Yeah, that's bad. But what's worse is not being able to derive properly due to broken polymorphism. :mad:

        1 Reply Last reply
        0
        • T Terrence Dorsey

          Michael Feathers[^]:

          Unfortunately, this anti-pattern is too common. It doesn't hurt until it hurts and when it does hurt, it hurts a lot. If you are developing frameworks do not provide superclasses that framework users must inherit to use your framework. Inheritance is the one of the tightest forms of coupling you can use in OO.

          As a framework designer, you have many other choices: eventing, listeners, and object composition.

          _ Offline
          _ Offline
          _beauw_
          wrote on last edited by
          #4

          Better yet, just don't make a framework. If you really want to "help" me write code, give me helpers... not mandates.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups