I'd advocate STTCPW (Simplest Thing That Could Possibly
Work). If you have a tab navigator with 3 states, then something like the
below is going to be more than appropriate, and anything more complex is
overkill.
If you have 100 states, it'll be cluttered and
unmaintainable.
Somewhere on the journey from 3 to 5, you'll probably
refactor ("Extract Class") and then somewhere from there you'll maybe even build
out some infrastructure (such as a State class of sorts).
But for now; if you have a tab navigator and you want to
manage which state you're in, a handful of constants would work for me, with a
single variable that you bind the tab navigator to.
Closely related to STTCPW is YAGNI (you ain't gonna need
it). Don't build more than you need, until the point in time you need
it.
Just my $.02
Steven
__._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS
|
- RE: [flexcoders] State vars: good, bad, ugly? Steven Webster
- [flexcoders] Re: State vars: good, bad, ugly? ben.clinkinbeard
- Re: [flexcoders] State vars: good, bad, ugly? Johannes Nel