Chapter 2. The Class System
This chapter will provide an overview of the most important central characteristic of Sencha Touch; the class system. This framework provides a higher-level object-oriented abstraction on top of JavaScript, allowing developers to define classes and to create instances using a syntax similar to that of other programming languages.
Although many JavaScript fans might find this approach heretical, the truth is that the class system provides a useful abstraction, helping developers achieve a higher productivity, creating more maintainable code.
This chapter ends with a discussion of the various extensions provided by Sencha Touch around the JavaScript core language and APIs, making developers write better cross-browser compatible code.
Architectural Considerations
Since its inception in the ’70s, as part of the Smalltalk programming language, the MVC architecture has known many different interpretations. Every object-oriented framework or toolkit has brought its own flavor of MVC, sometimes inconsistent with other systems. It’s enough to remember that Cocoa, Ruby on Rails, or Django, not to mention ASP.NET MVC, all propose slight variations of the MVC theme. These variations show the infinite flexibility of software, and the adaptability of design patterns to different situations and environments.
Sencha Touch is no different, as it provides yet another form of MVC, this time adapted to applications running on mobile web browsers. Figure 2-1 shows the typical ...
Get Sencha Touch 2 Up and Running now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.