What Is An ExtJS Plugin?

Here are some facts that will help you understand Ext JS plugins.

  • An ExtJS plugin is a class that defines and encapsulates behavior to be added to one or more ExtJS components.
  • Plugins are attached to their target component(s) via the plugins configuration option
  • Instead of exposing services that the target component can use, a plugin gains access to the component via a required function, init(), that takes a reference to the component
  • A plugin’s init() function is called at a specific point of its target component’s lifecycle: after the component is initialized and before it is rendered
  • A plugin can be lazy-instantiated if its target is lazy-instantiated

Can you spot the differences and similarities with other ways of modifying component behavior in ExtJS, for example, subclassing and configuration options?

About Jorge

Jorge is the author of Building a Sencha Touch Application and the Ext JS 3.0 Cookbook, and technical reviewer of Learning Ext JS and Pro jQuery Mobile. He runs a software development and developer education shop that focuses on mobile, web and desktop technologies.
If you'd like to work with Jorge, contact him at ramonj[AT]miamicoder.com.

Speak Your Mind

*