Book Image

Ext JS 4 First Look

By : Loiane Groner
Book Image

Ext JS 4 First Look

By: Loiane Groner

Overview of this book

<p>Ext JS 4 is a JavaScript framework that provides resources to build Rich Internet Applications with great performance. Ext JS 4 has been packed with many new features and it is difficult to master, even for seasoned experts in Ext JS 3.<br /><br />Ext JS 4 First Look teaches you the main functional areas of Ext JS 4 that have significant new features, explains the new features and how to use them, while highlighting the differences between Ext JS 4 and the previous versions.<br /><br />This book will give you the knowledge to make the required changes to Ext JS 3 application to build a complete Ext JS 4 application.<br /><br />This book provides examples of how to load Ext JS components by demand, charts, grid, tree, forms and panels, new data model, themes and mvc architecture.<br /><br />Ext JS 4 First Look provides full examples and illustrations to help you easily learn the new features of Ext JS 4.</p>
Table of Contents (14 chapters)

Creating a sample application the old-fashioned way


Before we get our hands on the MVC architecture, we will create a sample application. As this application is a simple sample (and as it is small), we will declare everything in a single JavaScript file. Then, we will learn how to migrate this app to the Ext MVC pattern.

Our sample application looks like the following:

It is a data grid with some book information, and when we click on a grid row, we will see more information about the book in the details panel below the grid.

Let's try to list everything we need to build this sample app:

  • First, we need a model where we will declare all the book fields

  • Then, we need a store to load the book information and populate the grid

  • As we need to populate a data grid, we also need to implement one

  • For the details panel, we need to implement a panel

  • And to display the book details, we need a template

  • We need to implement the listener, so that when the user clicks on a row of the grid, the app will update...