• 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
Application architecture question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Application architecture question


  • Subject: Application architecture question
  • From: Mark de Jong <email@hidden>
  • Date: Wed, 10 Jul 2002 00:21:07 -0700

I have a question about designing Cocoa application architectures.

Let say I have a non-document based app that has a "main" window. This window contains two NSOutlineView objects and a three-item NSTabView object where each of the tabs contain NSScrollView objects with NSText objects in them.

Got that? :-)

If I have a class called "AppController", I could manage all these views in that one class by making it the delegate and necessary data sources for all the above-mentioned views.

However, when I do this, I have all kinds of conditional statements within the delegate methods to determine which view should be handled, based on which "sender" object is passed into the method.

Is this a typical scenario for dealing with these views? Or, could I create separate classes for each view and thereby have distinct delegates for each view? Or am I missing some basic Cocoa development principle here?

If this has been discussed somewhere, please point me to that discussion. Otherwise, I'm curious to learn how others handle these issues.

Thanks in advance,

-- Mark
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Application architecture question
      • From: Itrat Khan <email@hidden>
    • Re: Application architecture question
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: Linking Mach-O and AIX binaries
  • Next by Date: Re: Linking Mach-O and AIX binaries
  • Previous by thread: Re: autorelease problem
  • Next by thread: Re: Application architecture question
  • Index(es):
    • Date
    • Thread