Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
- Subject: Re: Cocoa coding style (was Re: Did I reinvent the wheel?)
- From: Western Botanicals <email@hidden>
- Date: Sat, 10 May 2008 20:29:36 -0600
Since the use of the singleton method has been a big issue, I'll post
my reasonings for using it. Not that they are right, but I would like
some comments on why I shouldn't use it for these reasons.
1. I used this page to implement the singleton method: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_10.html
. This is the reason why some of the methods may look like the have
been overwritten. I just followed the instructions.
2. I see why it would be important to leave the decision up to the
developer to decide whether or not to have more than one instance of a
class. The reason for using the singleton method was to ensure that I
never have more than one cache or database access object. Having more
than one cache or database access object could lead to having the same
data pulled from the database into more than one object. Having more
than one object of the same data could cause the data to become dirty.
Justin Giboney
_______________________________________________
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