concept view state in category flex

This is an excerpt from Manning's book Hello! Flex 4.
In this chapter, you’ll start learning Spark, which is the new set of components, containers, and graphics primitives in Flex 4. This will be a “how-to” chapter: we’ll save diving into the Spark component model until the next chapter (which discusses view states, containers, CSS styling, and skinning). This chapter provides enough examples of using Spark that when it comes time to tackle the theory you’ll have plenty of examples in your head.
View states, which are vastly improved in Flex 4, are an easy way of making your app dynamic. They also show the importance of properly componentized design—although in this app we define the HPanel content all in one file, in real applications you want to build encapsulated components so that the application state logic and the component logic is separate. Also, note that view states aren’t just limited to the application—components can have their own view states that you can switch between.
In the next workshop session we’ll explore the basics of effects. Besides what we’ll see in the next session, effects can be used to transition between view states in a more exciting way.







