5.25.2008

Coding Conventions

Adobe has published a document outlining coding conventions and best practices for Flex coding. The document is still a work in progress with several sections marked TBD.

Adobe Coding Conventions

A few comments:
  • Most of the suggestions line up with common Java/C++ practices
  • Some class naming conventions are suggested which seem like good ideas. Interface names start with "I", event handler names end with "Handler", validator names end with "Validator", etc.
  • Adobe has chosen to diverge from the one true bracket style (see Stroustrup) and recommend aligning brackets on the left hand side. I'll have to take exception to this rule.
  • There seems to be some uncertainty about whether private class members should be prefixed with "_" (evil) or left without a special prefix. Both examples are present in the doc.

No comments: