0

In 90% of the example projects I see for ActionScript / Flex I notice the following two coding conventions:

1) private member variables with getters/setters start with an underscore as in "_credentials"

and

2) interfaces start with the letter "I" as in "ISessionInfo"

Coming from the Java world, I find both of these conventions unnecessary and annoying. I am about to start a new Flex project and was planning on NOT following these conventions unless they are truly are widespread, standard conventions in the Actionscript/Flex world.

Dave
  • 21,524
  • 28
  • 141
  • 221
  • those conventions are used in the C# world too. The benefit of the first one I find, is with autocomplete. I can just type '_' and get all my class members variables. Also helps with separating local from class variables without have to type "this". The second is pretty self explanatory, helps make it clearer which are the interfaces. – Allan Aug 30 '10 at 23:01

1 Answers1

3

Those conventions are used wherever I've been involved with ActionScript, but you are certainly free to do what works for you, your team, or your company.

Robusto
  • 31,447
  • 8
  • 56
  • 77
  • I agree completely, though I'd add if you plan on working on team projects with other Flex programmers it may be a good idea to adopt those conventions. – Zev Aug 30 '10 at 18:40
  • Thats exactly the point/idea. I don't need or want them, but I plan on brining on additional Flex developers in the future. Sounds like I should keep these conventions. – Dave Aug 30 '10 at 19:01