views:

140

answers:

6

Hi (Objective-C and others) guys,

I've a question, and I don't know if this is the best place to ask for it. Few days ago, dannywartnaby helped me with a problem I had and gave me an interesting advice, which can be considered as a coding convention, which is to prefix yout class files with your initials.

I wonder if you know other best practices in Objective-C --especially for Apple products--, and how to apply them in a company. So, I look for your input !

Thanks for your help.

I hope I'm clear (especially with my poor english :) )

+2  A: 

Apple has some some official Cocoa Coding Guidelines.

Wernight
+1  A: 

I found on stackoverflow check this it will help link text

Chandan Shetty SP
If you find a duplicate question, use comments on the question to point them out.
Georg Fritzsche
+2  A: 

No matter if I work on personal projects or in a team I always try to follow the Apple coding guideline that would have a code that has the same "look" anyone who writes. For more information take a look at the official Apple Coding Guideline for Cocoa and Cocoa Style for Objective-c ( part 1 | part 2 )

Luca Bernardi
Thanks for sharing "part{1,2}"
Rob
A: 

A lot of the Apple classes are still using the NS* prefix which dates back to NeXTSTEP.... this I guess now a little meaningless.

The lack of name spaces in Objective C means you have to be a little more careful when choosing names for classes.

Tony Lambert
Yeah, that the same thing for the well known nib/xib files.
Rob
+5  A: 

I think you must also look at this link http://cocoadevcentral.com/articles/000082.php

Ravi shankar
Sounds good ! Thanks Ravi
Rob
A: 

I always use the google Obj-C style guide. Which is basically the same as Apple but with some additions and also the logic behind the conventions: http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml

Alej
Great ressource ; thanks Alej
Rob