• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[NEWBIE]: Categories, etc vs subclassing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NEWBIE]: Categories, etc vs subclassing


  • Subject: [NEWBIE]: Categories, etc vs subclassing
  • From: J Tichenor <email@hidden>
  • Date: Wed, 20 Oct 2004 09:05:58 +0100

Just a quick question: a lot of time, on the list, the suggestion to fix a particular problem includes subclassing some NS class. I understand that subclassing is the most powerful way to extend a class, but also understand from many design articles and books, that subclassing should always come as the last step. Composition first, then if possible use of delegation, categories and protocol extensions. Then, if none of those will work, subclassing. But rarely on cocoa-dev are those other methods suggested. Almost always subclassing is the first way to go.

Just wondered if my readings were wrong, and the other methods of extension are far more limited than implied, or if subclassing is just so much a habit?

Hope this fits the cocoa list as it's more of a programming philosophy question.

~j~



James Tichenor
VFX Supervisor
AIM: email@hidden
(07779) 256 103
http://www.lehopictures.com/the_joint/


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: [NEWBIE]: Categories, etc vs subclassing
      • From: Amar Sagoo <email@hidden>
    • Re: [NEWBIE]: Categories, etc vs subclassing
      • From: Scott Stevenson <email@hidden>
    • Re: [NEWBIE]: Categories, etc vs subclassing
      • From: Evan Schoenberg <email@hidden>
  • Prev by Date: Re: Custom view and framework bug
  • Next by Date: Re: Unable to programmatically add NSTabViewItem(s) to NSTabView
  • Previous by thread: Re: file type check method
  • Next by thread: Re: [NEWBIE]: Categories, etc vs subclassing
  • Index(es):
    • Date
    • Thread