On Sun, Sep 04, 2005 at 07:04:13PM -0700, M Daggett wrote:
> One question though:
>
> I see several examples (ARP included unless I am mistaken) of people
> dividing their code into "org", "com", "net" structures. Are there any
> rules of thumb for this?
1) The directory structure (e.g com/example/Foo.as) matches the
namsepace structure (e.g. class com.example.Foo { ... })
2) The prefix on the namespace structure matches the reversed domain
name of the entity with which the code is associated (the domain name
belonging to the author of the code / their employer, or the domain
name of the client, for bespoke development)
Following these rules makes it fairly unlikely that a class that you
write called 'Foo' will collide with another class called Foo which
gets added to the latest version of as2lib that you're tring to upgrade
to.
People usually come up with rules for the namespace structure that comes
'underneath' the domain name too (e.g.
com.example.myproject.mycomponents.Foo).
dave
--
http://david.holroyd.me.uk/
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org