Flex best practices – Part 1: Setting up your Flex project

Working with filenames

Below are several practices you can use to standardize the naming conventions used within your Flex projects.

checkmarkUse UpperCamelCasing for MXML file names.

checkmarkUse UpperCamelCasing for ActionScript class file names.

checkmarkUse UpperCamelCasing for ActionScript interface file names, and begin the file name with a capitalized letter I.

This indicates that the file is an interface and not a class. Note: this is one practice that has some stigma attached to it. Go with what you find makes sense and then document, communicate, and follow that standard.

checkmarkDo not use spaces when naming files!

This can lead to problems all around, and especially on the Mac.

checkmarkDo not use special characters when naming files.

Such characters as an exclamation mark "!", right square bracket "[" or left parenthesis "(" can be illegal in many contexts and cause severe issues for your application.

checkmarkDo not use acronyms or abbreviations.

An exception to this practice is if the acronym is more commonly used; for example, HTTP, WWW, SQL, and other such acronyms.

checkmarkDo not use periods.

Using packages for code organization

Follow the best practices below on using packages for code organization:

checkmarkUse packages to organize and structure your projects codebase.

Packages are the standard for OOP-based applications. Packages represent logical groupings of related ActionScript and MXML files in the form of classes. The use of packages and classes is fundamental to object-oriented programming.

To continue with community standards, use the following practices for naming your packages:

checkmarkUse lowerCamelCase.

For example: com.seantheflexguy.stringUtils

checkmarkBegin the package name with the top-level domain (TLD) of the application's owner:

for example, com, net, us;

then use the application owner's name:

for example: seantheflexguy, adobe;

then the project name:

for example: burrow;

then the logical grouping of related code files:

for example: utils, components, or whatever is appropriate.

Here's an example of a package name using this convention:

com.seantheflexguy.burrow.view

AttachmentSize
adobe_fx_download_button_100x30.jpg1.49 KB
0
Average: 2 (1 vote)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

bet replied on Mon, 2009/06/29 - 2:31pm

Lets start from beginning. I have started earn $$ with sports betting about 3 years ago. Firstly I was very very bed thinking about this kind of job. Lots of people said me that sports btting is just gambling and nothing more. That I have started read a lot of betting and bookmakers firms, bonuses ect. First what I found what very interested me was betfair and Betfair trading system it is nothing but exchange bets with other members of this system. It is amazing option earn lots of money. One more think what I love in betfair is great bonus with Sports betting. Firstly when You wanna start betting You have to choose of the betting system and next find good site with livescore. When You have more information about sport betting You could think about change Your bookmaker to something new like bwin or bet365. Last think what I wanna tell You is Good LUCK, read and learn as much as You can and finaly You got You succes with bookies.Best regards !!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.