Every view is a component in Ext JS as well as Touch. The kinds of views (visual presentation) that are available in Ext JS and the kind of behaviors they offer, differ considerably from Touch for the simple reason that each one of them addresses a different segment of devices and those devices have their own uniqueness. The component implementation is very different in the two frameworks. However, at a higher level, both frameworks have got three phases for every view component, shown as follows:
In the Initialization phase, do the following tasks:
Register events.
Apply styles.
Call the hook method of the component/view class, which does the view-specific initialization. For example,
initialize
in Touch andinitComponent
in Ext JS.Register the component to the component manager.
Initialize state.
Initialize the plugins, if any.
Enter the Render phase.
In the Render phase, do the following tasks:
Generate elements and add them to the DOM.
Apply custom styles.
Initialize events.
Initialize state...