Hey,
If my application is called “Media Player”, is it a best practice to name classes: MPSong, MPSinger, MPAlbumsViewController … ?
Hey, If my application is called Media Player, is it a best practice to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Apple’s Coding Guidelines for Cocoa has lots of advice along these lines.
In short, using a prefix for class and protocol names is encouraged, especially if you’re developing a framework. However, Apple already uses the MP prefix for its MediaPlayer framework on the iPhone, so you probably want to pick another.