Windows Support Australia

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 16 October 2007

My Naming Conventions

Posted on 10:46 by Unknown
Here are the naming conventions I currently use in my projects. I keep questioning myself about them from time to time. Usually I end up changing some point but I'm forcing myself not to do it anymore. Conventions should be a way of reducing developement cost. If you keep changing them you are actually turning them into a money pit. I learned that the most important thing with a naming convention is to stick with it, whatever its definition is.

C#
  • Microsoft guidelines for everything public.
  • Private variables: prefix them with my ie myVariableName. I use this style for both normal variables and winForms controls.

ActionScript

  • Packages, and class members are camelCase.
  • Class names are PascalCase.
  • Private variables: prefix them with _ ie _variableName but I plan to switch this to the same convention I use for C#. That's because prefixing vars with an underscore results in a too low-levelish code for my tastes, and because underscore-prefixed vars as Flex control ids look weird in mxml (I don't want to use different naming conventions for controls and variables).

I thought a little bit about using the underscore style in C#, mainly because you have private vars clearly distinguished from the rest of class members in Intellisense. But again, the resulting code looked too low level.

I also considered using a single letter as a prefix for private vars, ie mMyVariable, but i like using my instead because it often makes the whole variable name sound like a piece of a correct english sentence.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

Categories

  • 3D
  • CAVE2
  • Edanarion
  • ENDURANCE
  • Flash
  • Game Heuristics
  • Games
  • HCI
  • Hydroviz
  • MotoGP08
  • MPI
  • News
  • Nintendo DS
  • OmegaDesk
  • omegali
  • omegalib
  • Papervision
  • QbViz
  • Tech Meeting
  • Visualization
  • VR

Blog Archive

  • ►  2013 (31)
    • ►  November (2)
    • ►  October (2)
    • ►  September (2)
    • ►  August (1)
    • ►  June (4)
    • ►  May (3)
    • ►  April (4)
    • ►  March (6)
    • ►  February (4)
    • ►  January (3)
  • ►  2012 (8)
    • ►  December (3)
    • ►  November (2)
    • ►  August (3)
  • ►  2011 (2)
    • ►  November (1)
    • ►  January (1)
  • ►  2010 (4)
    • ►  November (1)
    • ►  February (1)
    • ►  January (2)
  • ►  2009 (5)
    • ►  September (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (1)
    • ►  January (1)
  • ►  2008 (22)
    • ►  December (1)
    • ►  October (4)
    • ►  September (6)
    • ►  June (2)
    • ►  May (3)
    • ►  April (1)
    • ►  March (2)
    • ►  January (3)
  • ▼  2007 (16)
    • ►  December (2)
    • ►  November (3)
    • ▼  October (4)
      • Two nice links...
      • QbViz - First Screenies
      • My Naming Conventions
      • Installing WebORB on Vista
    • ►  September (7)
Powered by Blogger.

About Me

Unknown
View my complete profile