Preface

Model-View-Controller is a popular architecture among the software developers to build scalable and maintainable applications. While most of the time we use the server-side MVC architecture, with the complexity increasing in the Rich Application Development, a similar architecture is needed on the client-side, as well. The client-side MVC architecture allows us to de-couple the presentation from the model and the controller logic. The newly introduced client-side MVC architecture in Sencha's two frameworks —ExtJS and Touch—offers a great way to model applications where we can leverage the benefits of the architecture, and also with the Sencha SDK Tools we can manage the complete project—from creation to build and packaging—effectively. This, on one side, helps us to develop an application by following the MVC architectural principles, project structure, and coding guidelines while, on the other side, it optimizes our build and packaging for the Web.

What this book covers

Chapter 1, Sencha MVC Architecture: This chapter describes the MVC architecture and outlines the need of having an MVC architecture implemented on the clientside, which runs inside a browser. The chapter shows how to model an application without using Sencha MVC architecture and look at the demerits of that modeling. It then reviews the benefits that one can get by following Sencha MVC architecture. Subsequently, it visits the classes in ExtJS as well as Sencha Touch, which map to the model, view, and controller.

Chapter 2, Creating an Application: In this chapter we look at a sample application and learn how to model it as per the MVC architecture and map the different building blocks to the classes provided by ExtJS and Sencha Touch. The application development involves how to identify the views, models, and controllers in an application, how to make use of multiple controllers within an application and pass the data and control between them to achieve the overall application behavior. At the end, we look at some of the rules related to class naming convention, folder structure, and so on, which is required to get the application up and running.

Chapter 3, Building Blocks: This chapter covers the different classes, which are part of the MVC architecture in ExtJS as well as Sencha Touch. It covers the function of each of these classes and the differences in their behavior and usage. In addition to the common classes—Application, Controller, Model, View (Component)—it also covers the Touch-specific way to handle profiles to encapsulate device-specific behaviors and layout in the applications. Also, it shows how to set up the routes in Touch application and have the history tracking in place.

Chapter 4, Class System: This chapter explains how the new class system works and what are the functionalities offered by the class system. It also covers what are the naming conventions put in place and recommended by the framework, how to define classes, set up dependencies, implement inheritance, enhance capability using mixins, create singleton classes, and so on.

Chapter 5, Challenges and Solutions: This chapter reviews some of the main challenges when it comes to developing an MVC-based application – project creation, build, debugging, and packaging. With the challenges at hand, the chapter then covers the Sencha SDK Tools to show how this tool can help us address each of those challenges.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.31.125