IOS - Reducing XXXViewController to XXXVC is Bad or Good?

Since each view controller ends with a "ViewController", would it be evil to simply abbreviate it as a "VC"? I know that Apple Docs claims to not shorten things and make names meaningful, but isn't that just what it is obvious? I find it long and verbose to type a ViewController after each of them. In addition, xcode 4 automatically names the nib file as the same as the header and class file. Are you deleting the controller part?

What are your naming conventions and why did you decide to do it this way?

thanks

+4
source share
2 answers

If you use Xcode, you do not need to enter the full name every time. Autofill pens that are right for you.

In general, avoiding abbreviations, your code becomes more readable and easier to maintain. Of course, you know what VC means, but someone else after 3 years may not understand what you are doing.

In this particular case, this may not interpret the meaning, but naming conventions are conventions. We follow them in most cases to make our life (and others) easier in the future.

Always imagine that the person who will ultimately support your code is a big average guy with a temperature that causes hair irritation, who knows where you live.

+4
source

Despite the fact that people seem to say that Apple has excellent documentation. They even went so far as to provide the Coding Guide .

This not only gives you some good examples, but also helps you understand how names, conventions, and abbreviations are used in the Framework.

0
source

All Articles