Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Ext JS Data-driven Application Design
Ext JS Data-driven Application Design

Ext JS Data-driven Application Design: Learn how to build a user-friendly database in Ext JS using data from an existing database with this step-by-step tutorial. Takes you from first principles right through to implementation.

eBook
€8.99 €22.99
Paperback
€28.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Ext JS Data-driven Application Design

Chapter 2. Planning Application Design

In this chapter, we will set up the development environment of the project while introducing Sencha Cmd.

In this chapter, you will learn to:

  • Design a simple application

  • Optimize Ajax requests to use Ext Direct and Ext.util.History to control the screen with URL

Setting up Sencha Cmd and a local development environment


By setting up the local development environment with Sencha Cmd, when finally deploying the application, Sencha Cmd will only pick up the components being used. This will therefore optimize the final application.

With Sencha Cmd, you can run a native package for Sencha Touch, including scaffolding and building themes. Let's begin generating your project using Sencha Cmd.

  1. Install the latest JAVA Runtime Environment that is available on http://www.oracle.com/technetwork/java/javase/downloads/index.html or JRE.

  2. Install Compass available at http://compass-style.org/.

  3. Install Sencha Cmd available at http://www.sencha.com/products/sencha-cmd/download.

  4. Download Ext JS SDK available at http://www.sencha.com/products/extjs/download/.

  5. Extract Ext JS SDK and locate it in a local directory of your choice. For example, you can create a top-level directory called ext.

A directory structure will be created as shown in the following screenshot. This time...

Creating controllers


Now, we will create controllers for our data.

Main

Usually, each view component has a corresponding controller class with the same prefix.

But the first controller we have to deal with is the controller called Main. This controller has already been produced automatically in Sencha Cmd. If we need more processing or logic for the whole application, we should implement this class. Usually, the view class and controller class names match, but this is a special case where they do not because Sencha Cmd generates the Main class. So, it is best to leave it as is and not change the name.

For the app/controller/Main.js code, please see the source file: 09_create_controller\app\controller.

Although we've talked a lot about Main, we are not going to use it for the time being.

Navigation

Now, let's add hrefTarget to the data in the navigation store (source file: 09_create_controller/app/store/Navigation.js).

Ext.define('MyApp.store.Navigation', {
    …
    root: {
        children: [{...

Using Ext.util.History for directly accessing a screen


Ext.util.History manages the history. When a page changes, the application catches this change and then the Ext.util.History fires an event. Using this feature, we can control actions in our application.. For example, by using Ext.util.History, every time the application is accessed the dashboard URL is displayed.

Sometimes, when the user inputs an incorrect hash in the URL, the application will have trouble finding the page. However, with Ext.util.History, it goes to screens specified by the developer. For example, when we implement Ext.util.History, the user can access the quotation page directly without abnormal screen behavior. With Ext.util.History, it also allows us to attach the URL to an e-mail to access documents directly.

To begin with, you need to make the MyApp.util.History class. You might think it is an abstract class when you set eyes on it, actually, it is different. MyApp.util.History is a class used to incorporate URL...

Setting up Ext Direct


This is the last in the long list of preparations. Most Sencha Ext JS applications communicate with a server and acquire data and transmit a message. In that case, it is very simple and easy to communicate with the Ext.Ajax class.

However, let's use Ext Direct this time. Ext Direct performs by wrapping Ajax communications, polling, and performing a Remote Procedure Call (RPC).

RPC is the main feature of Ext Direct. However, I will not discuss it in detail here because of lack of space. If you wish to know the specifics, please visit the Sencha homepage at http://www.sencha.com/products/extjs/extdirect.

Ext Direct simplifies the communication with the server. As a result, JavaScript code decreases. Also, in addition to the reading and burden on browsers being reduced, communication is optimized automatically by a combined request function.

When we simultaneously perform Ajax communication with an initial value via Ext Direct in an interval of 10 milliseconds, we can combine...

Summary


Good work! We are now ready to develop the application. It was very long, but remember, it only takes a long time to complete the initial preparations.

From now on, you can use what you did here in the future. If you go over what we have just done and understand it for yourself, you can use this as a template for future projects and it will make the preparation stage go a lot faster and smoother.

When you're ready, continue to the next chapter in which we'll begin to input data into our database.

Left arrow icon Right arrow icon

Key benefits

  • Discover how to layout the application structure with MVC and Sencha Cmd
  • Learn to use Ext Direct during the application build process
  • Understand how to set up the history support in the browser

Description

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.

Who is this book for?

If you are an intermediate in Sencha Ext JS, "Ext JS Data-driven Application Design" is the tutorial for you. You need to be familiar with JavaScript and have basic operational knowledge of MySQL. If you want to be able to systematically construct an application from the first step to implementation, this book will be useful for you.

What you will learn

  • Understand an existing virtual company s data structure, and make SQL and tables in MySQL
  • Develop the environment of the project while introducing Sencha Cmd and using Ext.util.History at the same time
  • Create a form to input data and transmit the data to a server via Ext Direct
  • Discover how to display data and create data searches
  • Implement a report that displays four different types of graph on the dashboard
  • Implement the data import/export process to restore or backup the data

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 24, 2013
Length: 162 pages
Edition : 1st
Language : English
ISBN-13 : 9781782165453
Vendor :
Sencha
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Dec 24, 2013
Length: 162 pages
Edition : 1st
Language : English
ISBN-13 : 9781782165453
Vendor :
Sencha
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 98.97
Ext JS 4 Plugin and Extension Development
€27.99
Ext JS Data-driven Application Design
€28.99
Enterprise Application Development with Ext JS and Spring
€41.99
Total 98.97 Stars icon
Banner background image

Table of Contents

6 Chapters
Data Structure Chevron down icon Chevron up icon
Planning Application Design Chevron down icon Chevron up icon
Data Input Chevron down icon Chevron up icon
List and Search Chevron down icon Chevron up icon
Reporting Chevron down icon Chevron up icon
Data Management Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2
(6 Ratings)
5 star 16.7%
4 star 33.3%
3 star 16.7%
2 star 16.7%
1 star 16.7%
Filter icon Filter
Top Reviews

Filter reviews by




Sagi Jan 25, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
In this rather short book (definitely worth the price) you will walk through the steps needed to create a data driven solution using ExtJS.To learn this, the author teaches you to build a sales management database and system.You will learn how to choose entities accordingly (though I believe most of the people coming to this sort of book will already be able to make this happen).You will learn how to build ExtJS controllers to respond to users' requests, needed views and understand the workflow, a "soft" back button to work with the framework and more.One of the major gems you will find in this book is one of the things many people who are new to working with extjs combined with a server is the user of Ext.Direct with php.(Though I'm not a big fan of php! I'd would rather it be written for nodejs..but that's just me)In conclusion this book is definitely a tool for those who want to escalate their knowledge of extjs to the next level and develop products for this growing market.
Amazon Verified review Amazon
Shinobu Kawano Feb 09, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
If you are totally beginner of Ext JS, and want to learn how to implement a real-life application with it, I recommend “Mastering Ext JS“. Because the contents of “Ext JS Data-driven Application Design” is quite unique and I don’t know it’s a best practice or not. That’s why I think it’s not fit for a beginner.The other hand, you have experience of Ext JS app development, and want to learn how to create more quality architecture, this book might be for you. You will learn a new concept and it would be a hint to consider how to create a higher-level applications. I learned many ideas from this book and was inspired.
Amazon Verified review Amazon
Luigi Feb 08, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I read very quickly this book, that is short and condensed. It is a step-by-step guide that drives you through the building of an ExtJS application that interacts with data. It explains how to leverage on ExtJS MVC model for building a robust and easy to mantain application. I appreciated especially the Reporting chapter, where it's explained how to use data for builing charts (that are part of the ExtJS framework).
Amazon Verified review Amazon
Alok Ranjan Feb 03, 2014
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
This book seems to be the first book which attempts to explain step-by-step process to create the whole application using ExtJS. Most of the book often talks about the concept, which at times leaves some of the key aspects of application development and support. After following the book very closely, eventually you get an application and that should give confidence to first timers who want to build their own application.While I had a bit high expectation from the book, I must say that the overall presentation is pretty average. I found that words used in the book were often the synonyms which I am not very used to. So, it took some time to have appropriate mapping of words with the concept. At times I felt as if the author has put some incorrect word. However, after reading couple of chapter it was clear that instead of creating a class the author is making a class. Also, I wanted to build the application incrementally and it took time to understand the incremental changes and put them into main project.Some of the statements were so casual that I was wondering what was the need for putting that statement. For example in one of the place the author says “It has been a while since we saw an image, so we’ve displayed a column for now; however, let’s start to create the necessary objects for this list.”.Of course I am passionate about Sencha ExtJS and after going through this book at times I felt that the reader will get an impression that the ExtJS is something difficult to grasp and master. The presentation of content could have been much better. I would have liked to see the basic concepts of an application being explained and then make use of that concept to give the readers the step-by-step process for creating an application. I felt that there was too much to-and-fro and reference to Component Testing again and again was a killer.You can read my complete review comment on below URL:http://blogs.walkingtree.in/2014/01/31/extjs-data-driven-book-review/
Amazon Verified review Amazon
G. Hayward May 29, 2014
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I am very disappointed with Packet Publishing for put out a book that can only be described as a half finished effort. The example files do not work as described by the book. The sentence structure is very hard to follow.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.