Chapter 3. Sencha Touch foundations

 

This chapter covers

  • Getting to know the Component model
  • Exploring the component life cycle
  • Learning utility methods to create components

Sencha Touch components are the building blocks of the Sencha Touch universe. They make up the foundation upon which the rest of the framework relies. Working with components is a bit like working with Legos—no matter what you’re building, you always stack blocks on top of each other in various ways. The wondrous things you create are limited only by your own imagination and the rules of the framework.

To grasp exactly how Sencha Touch enforces these rules and how components fit together you have to understand the underlying Component model and its relationship to components. In this chapter you’ll take a close look at the component life cycle and learn why you should care about it. In addition you’ll see the various ways of creating components and look at the pros and cons of each approach. But first you need to build a good foundation to expand from, so let’s take a look at the Component model.

3.1. One Component model to rule them all

3.2. Introducing the component life cycle

3.3. XTypes and the ComponentManager

3.4. Summary