View Full Version : Order and functionality of the automatic function calls on class load/creation.

31 May 2013, 9:05 AM
What I want to know is the order in which functions like init, initComponent, constructor, launch, onReady, etc are called after a class is loaded/created.

This seems like a very important concept to understand for the most efficient use of the Ext JS framework and yet after searching the API, the learning center, forums, and doing some Googling, I cant really find a concrete diagram or explanation of each function, the order in which they are called, how exactly each one should be implemented, and why. Obviously some of these are slightly self explanatory, but that's not good enough. I need to know very specifically the rules of the space in which I am creating so that I can leverage my tools to the max efficiency and effect.

Any links to existing explanations to these types of functions that are called on load time ( and the ones I am unaware of) would be greatly appreciated.

Thanks again!

3 Jun 2013, 12:14 PM
Hmm.. there's not really a guide like that on the Sencha website today. I know I've seen a video on it a couple of years ago (I thought from a SenchaCon session, but I could be wrong). I'm having trouble finding it now.

That said, I think that a guide like that is a great idea and I've put in a request internally for a guide to be authored that details the component lifecycle.

In the meantime you might see if these resources offer any information at all for you:
http://www.sencha.com/learn/sencha-class-system (http://docs.sencha.com/extjs/4.2.1/#!/guide/components)

4 Jun 2013, 7:40 AM
Thanks Slemmon!

That document on the class system helped me greatly in understanding the available 'template methods' ( now I know what they are called also ), the order in which they are called, and a brief description of their purpose as they are associated with the Components and its' extensions.

I will still be looking forward to that higher level hierarchical document for which you put in an order. That will give me a visual and conceptual understanding of the proper usage of the Ext JS 4 architecture and without a doubt reduce maintenance for me in the future as I learn the proper and most efficient ways to utilize the framework.

Thanks again!

C. Segota