Nethravathitcs / unitt

Automatically exported from code.google.com/p/unitt
0 stars 0 forks source link

Cocoa naming conventions #53

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Class (and constant/enum) names such as WebSocket are too generic for a library 
like this. I'm trying to integrate this code into a project that contains both 
a WebSocket Server (CocoaHTTPServer) and a WebSocket Client (this project) and 
both the client and server WebSocket classes are named "WebSocket". Of course, 
the CocoaHTTPServer project is an equally guilty party in this case, but 
regardless, having the proper prefixes in this project would help tremendously.

Original issue reported on code.google.com by g...@harrisg.com on 11 Dec 2012 at 5:13

GoogleCodeExporter commented 8 years ago
Good point. I am too used to Java's naming schema. I can generate a new build 
with new names to prevent collision. I assume the general practice is to prefix 
it with a "Unitt" or something similar?

Original comment by joshuadmorris@gmail.com on 11 Dec 2012 at 8:38

GoogleCodeExporter commented 8 years ago

Original comment by joshuadmorris@gmail.com on 7 Jan 2013 at 9:59

GoogleCodeExporter commented 8 years ago
here's the proper documentation, worth looking over: 
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CodingGu
idelines/CodingGuidelines.html

Most people pick a 2-3 letter prefix. For example, Apple uses mostly NS 
(NSString, NSArray, etc) which originates from NextStep. There's nothing wrong 
with going with something longer, like "Unitt".

Original comment by g...@harrisg.com on 8 Jan 2013 at 2:08