Book Image

Ext JS Data-driven Application Design

By : Kazuhiro Kotsutsumi
Book Image

Ext JS Data-driven Application Design

By: Kazuhiro Kotsutsumi

Overview of this book

Sencha Ext JS is an industry leader for business-standard web application development. Ext JS is a leading JavaScript framework that comes with a myriad of components, APIs, and extensive documentation that you can harness to build powerful and interactive applications. Using Ext JS, you can quickly develop rich desktop web applications that are compatible with all major browsers. This book will enable you to build databases using information from an existing database with Ext JS. It covers the MVC application architecture that enables development teams to work independently on one project. Additionally, the book teaches advanced charting capability, enabling developers to create state-of-the-art charts just once. These charts are compatible with major browsers without the need to rely on plugins. This hands-on, practical guide will take you through the mechanics of building an application. In this instance, we will use this application to manage existing data structures in the form of a database. You will begin by making SQL and tables in MySQL and will then move on to developing the project environment and introducing Sencha Cmd. You will learn to create a form to input data and monitor the state of the input, while seeing how Ext Direct will validate the form on the server side. Finally, you will have a working application that is ready for you to customize to suit your needs. You can also use it as a template for any future projects when you need a similar database.
Table of Contents (14 chapters)
Ext JS Data-driven Application Design
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a bar chart


In the same way as with the pie chart, first prepare the CT. Again in the same way as creating the pie chart, let's change the JavaScript file and create the bar chart HTML (source file: 07_making_a_bar_chart/ct/dashboard/bar_app.html).

Apart from the created class name (MyApp.view.dashboard.Bar), the JavaScript file here is the same as the pie chart (source file: 07_making_a_bar_chart/ct/dashboard/bar_app.js).

Implementing the Direct function

Now, it's the Direct function. As the definition is already made in config.php, I will not repeat it here.

Let's go ahead and implement the Direct method (getBarData) to get the data for the bar chart. Please refer to the source code in the source file if you want to see the content (source file: 08_implement_direct_function/php/classes/ MyAppDashBoard.php). It will acquire the count for the levels of quotations or bills created for each client.

Preparing the store for the chart

Next comes the model store in the same way as we did for...