• 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
What's the best practice to write some common tasks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What's the best practice to write some common tasks?


  • Subject: What's the best practice to write some common tasks?
  • From: ico <email@hidden>
  • Date: Wed, 16 Nov 2011 11:17:04 +0800

Hi all,

Suppose I have some common tasks, such as get user preferences and return
some value, or do some calculation then return the result.
I want to implement a function that do these kind of tasks so that I don't
need to write those codes again and again. However, this function seems
that it should not belong to any class, it is just a common task that many
classes will use them.

So what is the best practice to place these function? Simply write them as
a C function or implement them in a common class and make them static?

Thanks.

--
==========================
Life isn't about finding yourself.
Life is about creating yourself.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: What's the best practice to write some common tasks?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Thread safety of NSTreeNode?
  • Next by Date: Re: What's the best practice to write some common tasks?
  • Previous by thread: Thread safety of NSTreeNode?
  • Next by thread: Re: What's the best practice to write some common tasks?
  • Index(es):
    • Date
    • Thread