Chapter 15. Extensions and plug-ins

 

This chapter covers

  • Understanding the basics of prototypal inheritance
  • Developing your first extension
  • Getting to know how plug-ins work
  • Developing a real-world plug-in

Every Ext JS developer faces the challenge where reusability becomes an issue. Oftentimes, a component of an application is required to appear more than once within the application’s usage lifetime. In much larger applications, reusability of components is paramount to performance as well as maintainability of the code itself. This is why we’ll focus on the concept of reusability with the use of framework extensions and plug-ins.

In the first section of this chapter, you’ll learn the basics of extending (subclassing) with Ext JS. You’ll begin by learning how to create subclasses with JavaScript, where you’ll get to see what it takes to get the job done with the native language tools. This will give you the necessary foundation to refactor your newly created subclass to leverage Ext.extend, implementing two different popular design patterns.

Once you’ve gotten familiar with creating basic subclasses, we’ll focus our attention on extending Ext JS Components. This is where you’ll get to have fun learning about the basics of framework extensions and solve a real-world problem by extending the GridPanel widget and seeing it in action.

15.1. Inheritance with Ext JS

15.2. Extending Ext JS Components

15.3. Plug-ins to the rescue

15.4. Summary