The Flex framework team uses the following ordering within our classes: class initialization code static constants static variables static properties static methods static event handlers constructor variables overridden properties properties overridden methods methods overridden event handlers event handlers "Properties" are public/protected getters/setters (plus their private storage vars) and public/protected vars. "Variables" are private/mx_internal vars. For a property implemented as a getter/setter with a storage var, we write the storage var first, then the getter, then the setter. - Gordon
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Monday, September 10, 2007 5:18 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: private / getters and setters ASDoc doesn't care about private vars, so it shouldn't/doesn't matter at all. Here's more or less what I use: // static constants // private vars // public vars // CONSTRUCTOR // override protected methods // protected methods // private methods // override public methods // public methods // implicit getter/setters regards, Muzak ----- Original Message ----- From: "nathanpdaniel" <[EMAIL PROTECTED] <mailto:ndaniel%40bsi-scs.com> > To: <flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Sent: Monday, September 10, 2007 4:19 AM Subject: [flexcoders] Re: private / getters and setters If you're ever interested in using ASDoc to document your classes, it states you should name the variable, followed by the setter, then the getter. i.e.: private var _a:Object; public function set a(value:Object):void { _a = value; } public function get a():Object { return _a; } This would be solely for documentation and future developers though - doesn't really effect your code either way! :D --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , Sheriff <[EMAIL PROTECTED]> wrote: > > what is the best practice for this, show i always have the private variables on top and then getters/setters later or just group both of them right after the other > > private var _test:Number > > //Constructor here > //events etcc > //getters and setters or > > //construct > //vents > //private var_test:Number > getters/setters >