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.

Arrow left icon
Profile Icon Kazuhiro Kotsutsumi
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (6 Ratings)
Paperback Dec 2013 162 pages 1st Edition
eBook
$9.99 $22.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Kazuhiro Kotsutsumi
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (6 Ratings)
Paperback Dec 2013 162 pages 1st Edition
eBook
$9.99 $22.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $22.99
Paperback
$38.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781782165446
Vendor :
Sencha
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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
$19.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
$199.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
$279.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 $ 131.97
Ext JS 4 Plugin and Extension Development
$37.99
Ext JS Data-driven Application Design
$38.99
Enterprise Application Development with Ext JS and Spring
$54.99
Total $ 131.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 included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.