• Follow us on Twitter
  • Join our Facebook Group
  • Join me on Google Plus
  • Add me on Linkedin
  • RSS
New prints available for sale! close

  • Home
  • Articles
    • Artistic Process
    • Software Engineering
      • Android
      • HTML5 & JavaScript
    • Reviews
    • Personal
    • Books
      • Technical
  • Portfolio
  • Store
    • Giclee Prints
    • Your Account
    • Transaction Results
    • Checkout
  • Bucket-List
  • Contact

Archive for month: May, 2008

Extending the State Class

0 Comments/ in Articles, Flash Platform, Software Engineering / by admin
May 3, 2008

Flex offerers a wide range of utilities to make working with complicated components and applications simpler. One such feature is the use of States. States are often thought of as only visual or GUI related, but in they are perfect for dividing up logic. In my current project I am building a series of learning activities, and some have activities within activities… needless to say it can get complicated quickly. While breaking up the logic into separate components was one option, I didn’t want to have any risk of ‘flashes’ of GUI while pieces are refreshed, moved, or risk messing up data by passing all these pieces around.

I started to build out my activity component using states. One state for when you enter the activity, one for each of the three phases, a cleanup state and finally an exiting state. As I developed the components and created their enterState and exitState functions, as well as many functions only used while in a specific state, I realized that my component was getting to be well over a thousand lines of code and a bit unmanageable. To find the logic pertaining to the current section I was working on, I had to sift through hundreds of lines of code. I decided there had to be a better way… and there was!

Read more →

Recent Posts

  • AngularJS: Building My Rotten App
  • JavaScript WebSpinners
  • JavaScript Scope & Closures
  • Introduction to JavaScript’s Prototype Inheritance
  • ADB Not Recognizing Devices on OSX – EasyTether problem

Recent Comments

  • Allison on Minneapolis Events and Adventures Sales Practices
  • Judy on JavaScript WebSpinners
  • MickeyD on Minneapolis Events and Adventures Sales Practices
  • MickeyD on Minneapolis Events and Adventures Sales Practices
  • Andy on Kindle PaperWhite & Whispersync for Voice – The perfect reader companion!

Archives

  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • October 2012
  • June 2012
  • May 2012
  • January 2012
  • October 2011
  • July 2011
  • April 2011
  • March 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • March 2010
  • February 2010
  • November 2009
  • August 2009
  • June 2009
  • February 2009
  • May 2008
  • April 2008
  • March 2008
  • December 2007
  • August 2007
  • July 2007
  • June 2007
  • April 2007
  • March 2007
  • February 2007

Categories

  • Android
  • Articles
  • Artistic Process
  • Design Patterns
  • e-Learning
  • Featured
  • Flash Platform
  • HTML5
  • JavaScript
  • Just For Fun
  • Personal
  • Reviews
  • Software Engineering
  • Speaking
  • User Experience Design

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
All images and content is copyrighted Daniel C. Holth unless otherwise noted. Please don't steal.
© Copyright - d.c.Holth - Wordpress Theme by Kriesi.at