Chapter 10. Class system foundations
This chapter covers
- Understanding prototypal inheritance
- Developing your first extension
- Knowing how plug-ins work
- Developing a real-world plug-in
- Looking into the Sencha Touch class loader
Every Sencha Touch developer faces challenges where reusability is an issue. Often, a component of an application is required to appear more than once within the application’s usage lifetime. Without mastering these techniques you could end up with what’s known as “function soup,” or unmaintainable code. This is why we’ll focus on the concept of reusability by the use of framework extensions and plug-ins.
In the first section of this chapter you’ll learn the basics of extending (subclassing) with Sencha Touch. You’ll begin by learning how to create subclasses with JavaScript, where you’ll see what it takes to get the job done with the native language tools. This section will give you the foundation to refactor your newly created subclass to use the Sencha Touch class system.