O'Reilly logo

Sencha Touch 2 Up and Running by Adrian Kosmaczewski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required