• 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
Re: accessor generation???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accessor generation???


  • Subject: Re: accessor generation???
  • From: Andy Lee <email@hidden>
  • Date: Sat, 6 Jul 2002 10:28:10 -0400

At 8:40 AM -0400 7/6/02, Erik J. Barzeski wrote:
> On Friday, July 5, 2002, at 07:52 AM, Ondra Cada wrote:

I feel it somewhat strange: does that mean my programming style differs
so
>> much from the one of majority of others?

It may not be a matter of style so much as the classes of problems you've worked on. It sounds like those problems were not candidates for accessor-heavy classes, and you knew better than to add accessors willy-nilly without a specific design motivation.


Frankly, I think anyone who picks a side is wrong.

On this, I agree with Erik. Is that picking a side? ;)

Say I've got Person.h/m. Guess what? Pretty accessor-heavy. Persons are
objects - they're models of real-world people (at least in this example).
But the controller? Pretty functionality-heavy. Because it controls the flow
and functionality of the program.

In other words, accessor-heavy classes are fine. In fact, I'd argue that
that's what most of the model classes should be (and when I say model I mean
MVC model, not "ideal" model).

I've done database projects where many classes were merely wrappers for Model data, and accessor methods could reasonably be auto-generated from, say, database schemas. I've also done more algorithmic projects where there was hardly any call for get/set methods.

--Andy
_______________________________________________
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: accessor generation???
      • From: Ondra Cada <email@hidden>
References: 
 >Re: accessor generation??? (From: "Erik J. Barzeski" <email@hidden>)

  • Prev by Date: Re: Preview in Internet Explorer
  • Next by Date: Re: NSText textDidChange: doesn't report undo in text view
  • Previous by thread: Re: accessor generation???
  • Next by thread: Re: accessor generation???
  • Index(es):
    • Date
    • Thread