Saturday, July 19, 2008

my indefinitive rules of thumb for starting an application

MXML:
1. mxml file should not be named similar to the codebehind file, even if the reside on different directories, as the compiler finds it confusing.
Remember, defining a mxml is actually a real class.
2. In the root node, define a xmlns:myNamespace="code.behind.package.path.*" (put the path to the code behind, but not the class name, and add a * suffix.
3. the root node should be <myNamespace:myCodeBehindClassName...
Code behind:
1. root path starts at the src folder, if you create a .as class file, it should not bare any package name, i.e it should start with package {. otherwise it should show the folder path:
package code.behind.package.path {.
2. filename should be exactly like the class name it bares.