Graphics Reference
In-Depth Information
Conventions and Best Practices
Ithinkit
s pretty obvious that the more everyone on a team is on
thesamepagethinkingasmuchlikeoneanotherastheypossibly
can when it comes to writing their code, the more time they can
save when they have to work together on individual projects. I also
feel that standardizing that team
'
'
s code design, naming conven-
tions, folder structures, and so on is a huge step in the right direc-
tion of getting everyone on that same page. At some point, you
will be sick or on vacation and a coworker will need to open your
files to make some changes. Or maybe, the coworkers are out and
you
re the one who has to make the changes to their files.
Wouldn
'
t it be nice to open their code and, within a matter of
seconds, know exactly what theywerethinkingastheywrote
each line?
At the time of writing this, there
'
'
sapageontheAdobeOpen
Source site titled
The very first thing on that page is a note letting you know that the
page is a work in progress but that there is plenty of information
there to get you started (which there most certainly is). Even if
you
Flex SDK coding conventions and best practices.
re working in Flash and not with the Flex SDK, these conven-
tions and best practices are still very much worth following since
it
'
s all in the Flash Platform. Think about
writing an ActionScript class. Now think about that class being
usedinbothaFlashprojectandaFlexproject.Wouldn
'
s all ActionScript and it
'
titbe
great for all the conventions to carry over between the two? (The
correct answer here is,
'
)
With the topic of conventions and best practices being
somewhat large in its details, I
Why yes, Jason. That would be great!
m going to highly suggest that you
go to the Adobe Open Source site and take an in-depth look at
them there. However, there are a few I would like to cover here
before we move on.
'
Naming Objects
When naming your objects, you want to be descriptive, so you will
know exactly which item your ActionScript is communicating with
and what kind of object it actually is. Obviously, you can name
them however you and your team like, but Table 3.2 shows a few
example names following the convention of using the object
'
s type
as the last part of the name.
Along with standardizing the names of your objects, you should
also try to come up with a standard structure of folders for your
library. My personal favorite library setup uses folders named by
type, where the
MovieClips
folder contains MovieClips, the
bitmaps
folder contains imported images, the
graphics
folder
contains graphic symbols, the
sounds
folder contains audio files,
Search WWH ::




Custom Search