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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Norway

Standard delivery 10 - 13 business days

€11.95

Premium delivery 3 - 6 business days

€16.95
(Includes tracking information)

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 : 9781782165446
Vendor :
Sencha
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Norway

Standard delivery 10 - 13 business days

€11.95

Premium delivery 3 - 6 business days

€16.95
(Includes tracking information)

Product Details

Publication date : Dec 24, 2013
Length: 162 pages
Edition : 1st
Language : English
ISBN-13 : 9781782165446
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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela