Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Learning Ext JS_Fourth Edition
Learning Ext JS_Fourth Edition

Learning Ext JS_Fourth Edition: Create powerful web applications with the new and improved Ext JS 5 library

Arrow left icon
Profile Icon Carlos A Mendez Segura Profile Icon Villa Profile Icon Gonzalez
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (4 Ratings)
Paperback Jul 2015 452 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Carlos A Mendez Segura Profile Icon Villa Profile Icon Gonzalez
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3 (4 Ratings)
Paperback Jul 2015 452 pages 1st Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.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

Learning Ext JS_Fourth Edition

Chapter 1. An Introduction to Ext JS 5

When learning a new technology such as Ext JS, some developers face a hard time to begin with, so this book will give you the best possible way to start to understand this technology more than any other source. We have to go from the library documentation to blogs and forums looking for answers, trying to figure out how the library and all the components work together. Even though there are tutorials in the official learning center, it would be great to have a guide to learn the library from the basics to a more advanced level; this is the main goal of this book.

Ext JS is a state of the art framework to create Rich Internet Applications (RIAs). The framework allows us to create cross-browser applications with a powerful set of components and widgets. The idea behind the framework is to create user-friendly applications in rapid development cycles, facilitate teamwork (MVC or MVVM), and also have a long-term maintainability.

Ext JS is not just a library of widgets anymore; the brand new version is a framework full of new exciting features for us to play with. Some of these features are the new class system, the loader, the new application package, which defines a standard way to code our applications, and much more awesome stuff.

The company behind the Ext JS library is Sencha Inc. They work on great products that are based on web standards. Some of the most famous products that Sencha also have are Sencha Touch and Sencha Architect.

In this chapter, we will cover the basic concepts of the framework of version 5. You'll learn how to set up the library or SDK and create our first program, get to know the available tools to write our code, and take a look at some of the new features in Ext JS 5.

  • Considering Ext JS for your next project
  • Getting started with Ext JS—our first program
  • Tools and editors
  • What's new in Ext JS 5?

Considering Ext JS for your next project

Ext JS is a great library to create RIAs that require a lot of interactivity with the user. If you need complex components to manage your information, then Ext is your best option because it contains a lot of widgets such as the grid, forms, trees, panels, and a great data package and class system.

Ext JS is best suited for enterprise or intranet applications; it's a great tool to develop an entire CRM or ERP software solution. One of the more appealing examples is the Desktop sample (http://dev.sencha.com/ext/5.1.0/examples/desktop/index.html). It really looks and feels like a native application running in the browser. In some cases, this is an advantage because the users already know how to interact with the components and we can improve the user experience.

Ext JS 5 came out with a great tool to create themes and templates in a very simple way. The framework for creating themes is built on top of Compass and Sass, so we can modify some variables and properties and in a few minutes we can have a custom template for our Ext JS applications. If we want something more complex or unique, we can modify the original template to suit our needs. This might be more time-consuming depending on our experience with Compass and Sass.

Compass and Sass are extensions for CSS. We can use expressions, conditions, variables, mixins, and many more awesome things to generate well-formatted CSS. You can learn more about Compass on their website at http://compass-style.org/.

The new class system allows us to define classes incredibly easily. We can develop our application using the object-oriented programming paradigm and take advantage of the single and multiple inheritances. This is a great advantage because we can implement any of the available patterns such as MVC, MVVM, Observable, or any other. This will allow us to have a good code structure, which leads us to have easy access for maintenance.

Another thing to keep in mind is the growing community around the library; there are lots of people around the world that are working with Ext JS right now. You can even join the meeting groups that have local reunions frequently to share knowledge and experiences; I recommend you to look for a group in your city or create one.

The new loader system is a great way to load our modules or classes on demand. We can load only the modules and applications that the user needs just in time. This functionality allows us to bootstrap our application faster by loading only the minimal code for our application to work.

One more thing to keep in mind is the ability to prepare our code for deployment. We can compress and obfuscate our code for a production environment using the Sencha Cmd, a tool that we can run on our terminal to automatically analyze all the dependencies of our code and create packages.

Documentation is very important and Ext JS has great documentation, which is very descriptive with a lot of examples, videos, and sample code so that we can see it in action right on the documentation pages, and we can also read the comments from the community.

Getting started with Ext JS

So, let's begin with Ext JS! The first thing we should do is download the framework from the official website, http://www.sencha.com/products/extjs/. The version available at the time of writing this book is 5.1.1.

There are three types of license:

  • The open source license: If you are creating or want to develop an open source application compatible under the GNU GPL license v3 (http://www.gnu.org/copyleft/gpl.html).
  • The commercial license: You need to buy this if you are planning/wanting to develop a closed source project and want to keep the source code as your own property. Usually used by corporations, banks, or enterprises.
  • The commercial OEM: If you want to use Ext JS to create your own commercial SDK or web application builder, or use it as frontend for some embedded device, then this comes into the picture. As this type of license can vary, it's customized for each customer.

You can see more detailed information about this subject at http://www.sencha.com/products/extjs/licensing.

Downloading Ext JS

If you download Ext JS directly from http://www.sencha.com/products/download/, this will be a 30-day trial version of Ext JS and you will also be required to enter some personal information in order to get the trial. To obtain the GPL version, you can get it from http://www.sencha.com/legal/GPL/. We can also use the available Content Delivery Network (CDN), as shown in the following table, so that we don't need to store the library on our own computer or server:

Setting up and installing Ext JS 5

After you download the Ext JS Library (ZIP file), extract the contents to a working folder. For the first time, you will probably get overwhelmed by the size of the ZIP file and by the number of files and folders, but don't worry, the purpose of each file and the content of each folder will be explained shortly.

Sencha Cmd

Besides the Ext JS library, we need to download the Sencha Cmd (command tool). This tool is intended to be a cornerstone for building applications, creating workspaces, and new themes, and the ability to minify and deploy our applications to a production environment.

Download this tool at http://www.sencha.com/products/sencha-cmd/ and also check that the following requirements are met in order for Sencha Cmd to work properly:

  • JRE Sencha Cmd requires Java Runtime Environment version 1.7 to support all functionality, however, most features will work with 1.6 (the minimum supported version).
  • Ruby differs by OS:
    • Windows: Download Ruby from http://rubyinstaller.org. Get the .exe file version of the software and install it.
    • Mac OS: Ruby is preinstalled. You can test whether Ruby is installed with the Ruby -v command.
    • Linux-based OS: Use sudo apt-get install ruby 2.0.0 to download Ruby.

Run the Sencha Cmd setup, follow the instructions, and after installing Sencha Cmd, we need to verify the installation. Proceed to open the command line and type the following command:

sencha

Tip

On Windows environments, it's recommended that you restart the system after installation in order to get the proper environment variables applied.

After typing the command Sencha, we should see the following output:

Sencha Cmd

Why so many files and folders?

This is a natural question when you look at the downloaded files and folders for the first time, but every file and folder is there for a purpose and now you're going to learn it:

  • The build folder contains compiled files of the SDK and is ready to be used. This folder is very useful to start with in Ext JS without the need to use Sencha Cmd. From version 5, this folder also contains examples and ready-to-use Ext JS themes located in packages (folder).
  • The examples folder contains the source code of the examples. These examples are built to show what we can do with the library. However one significant change in version 5 is that this folder needs to be compiled using Sencha Cmd in order to be deployed/compiled into the build folder.
  • The overrides folder contains JavaScript files used to add extra functionality and behavior to components and widgets and they are also used when an application or code is compiled.
  • The packages folder is where the styles and images are located; we can also find the Sass files to create our custom theme in here. Sass is an extension of CSS3 to improve the language; we can use variables, mixins, conditionals, expressions, and more with Sass. From version 5 onward, this folder also contains more folders, which are Locales, Ext JS Core, Charts, Aria, and many more.
  • The src folder contains the source code files that are part of the framework. Each file represents a class/object so we can read it easily, and every folder corresponds to the namespace assigned to the class. For example, the Ext.grid.Panel class is in a file called Panel.js, which in a folder called grid (src/grid/Panel.js).
  • The welcome folder contains the styles and images that are shown when we open the index.html file in the root folder.

    If you look at the root folder, you can also see other JavaScript files. Basically, they are the compressed, debug, and development versions of the library.

  • The bootsprap-*.js files contain information about the framework; these files are used by ext*.js files in order to load the required files (the src folder or packages folder).
  • The ext-all.js file loads the complete library with all the components, utilities, and classes.
  • The ext-all-debug.js file is the same as the ext-all.js file. The difference is that this file will show console logs and we can use this file to debug our application.
  • The ext.js file is the core and foundation layer for Ext JS. If we use this file, we're not loading the whole library; this file contains only the class system, the loader, and a few other classes. We can use the Ext.Loader class to load just the required classes and not the entire framework.

Folders that changed in version 5 from previous versions

Developers that use previous versions of Ext JS may find the new folder structure confusing, and may notice that some of folders disappeared in version 5. The significant changes to folders are listed below. The builds folder no longer exists; instead, we should use the build folder.

  • The locale folder has been moved to the packages/ext-locale folder. In version 5, Locales have a more complex folder structure and we also now have the ext-locale-language.js file and ext-locale-language-debug.js file. By default, the components are displayed in English, but you can translate them to any other language.
  • The jsbuilder folder was removed, now in version 5 we will use Sencha Cmd to build and compress our source code.
  • The ext*-dev.js file was removed in version 5, as according to Sencha, there was much confusion about the use of these files. On Sencha Touch these files were merged and following the same pattern as Sencha Touch on Ext JS. *-dev.js files and ext*-debug.js files were merged into one.
  • The resources folder was removed, so now we need to use the packages folder.
  • The docs folder was removed, so as of version 5, developers should check the documentation and guides at http://docs.sencha.com/. Also, there is an alternative to download the offline documentation selection (offline docs) from the link in the documentation menu:

    Folders that changed in version 5 from previous versions

Now that you have a basic understanding of the downloaded files and folders, we can advance to the next step of "getting started."

Looking at the whole picture

Before we start writing code, you need to learn and understand a few concepts first. Ext JS is divided into three layers, as shown in the following screenshot. The purpose of these layers is to share code with Sencha Touch, a framework to create mobile web applications.

Looking at the whole picture

In the Ext Foundation layer, the Ext object is created, as well as some useful utilities and the class system that allows us to extend classes, override methods and properties, add mixins and configurations to classes, and many more things.

Note

To understand more about mixins, see http://docs.sencha.com/extjs/5.1/5.1.1-apidocs/#!/api/Ext.Mixin.

The Ext Core layer contains the classes that manage the Document Object Model (DOM), the setting and firing of events, support for Ajax requests, and classes to search the DOM using CSS selectors. Also now, part of Ext.Core is the data package (classes related to data such as fields, store, and so on). As of version 5.1, Ext JS Core will have common shared code with Sencha Touch (the next major release).

Finally, the Ext JS 5 layer contains all the components, widgets, and many more features that you're going to be learning about in this book.

Our first program

We need to set up our workspace to write all the examples of this book. Let's create a folder named learning-ext-5. For now, we don't need a web server to host our examples, but in the following chapters we are going to use Ajax; therefore, it's a good idea to use your favorite web server to host our code from these first examples.

In our new folder, we are going to create folders that contain the examples for each chapter in this book. At this point, we have a folder called chapter_01 that corresponds to this chapter and other called extjs-5.1.1 that contains the Ext JS framework. Both folders are located on the same level.

Inside the chapter_01 folder, we're going to create a file called myfirstapp.html, where we need to import the Ext library and create a JavaScript file called app.js that will contain our JavaScript code:

Our first program

Open the myfirstapp.html file in your favorite editor and type the following code:

<!doctype html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta charset="utf-8">
  <title>My first application</title>
    <!-- Importing the stylesheet (theme neptune) --> 
    <link rel="stylesheet" type="text/css" href="../ext-5.1.1/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
    <!-- Importing the Extjs library --> 
    <script src="../ext-5.1.1/build/ext-all.js"></script>
    <!-- Importing overrides Js code special for theme neptune -->
    <script src="../ext-5.1.1/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>

    <!-- Importing our application -->
    <script type ="text/javascript" src="app.js"></script>
</head>
<body> </body>
</html>

Tip

Downloading the example code

You can download the example code files for all Packt Publishing books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Writing the Ext JS code

The previous code shows how to import the library for a development environment. First, we import the stylesheet that is located at ext-5.1.1/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css. The second step is to import the whole library from ext-5.1.1/build/ext-all.js. The third step is to import a JavaScript file that contains overrides so the theme can work properly (specific adjustments on this theme).

Now we're ready to write our code in the app.js file.

Before we can start creating widgets, we need to wait until the DOM is ready to be used and Ext JS is loaded and parsed. Ext JS provides a function called Ext.onReady, which executes a callback automatically when all the nodes in the tree can be accessed. Let's write the following code in our app.js file:

Ext.onReady(function(){
  alert("This is my first Extjs app !");
});

An alternative to this code can also be:

Ext.application({
    name : 'MyFirstApplication',
    launch : function() {
        Ext.Msg.alert("Hello"," my first Ext JS app");
    }
});

One of the advantages of using Ext JS is that the library only uses one single object in the global scope called Ext to allocate all the classes and objects within the framework.

If you open the HTML file in your favorite browser, you will see something like the following screenshot:

Writing the Ext JS code

Tip

Feel free to use your favorite browser to work through the examples in this book. I recommend you use Google Chrome because it has more advanced developer tools and it's a fast browser. If you are a Firefox fan, you can download the Firebug plugin; it's a powerful tool that we can use for debugging in Firefox.

If for some reason we can't see the alert message in our browser, it's because we haven't defined the correct path to the ext-all.js file. If you look at the JavaScript console, we'll probably see the following error:

Uncaught ReferenceError: Ext is not defined

This means that the ext-all.js file is not imported correctly. We need to make sure everything is correct with the path and refresh the browser again.

Adding interaction to the program

Now that we know how to execute code when the DOM is ready, let's send an alert message from the Ext library. Using the Ext.MessageBox alias Ext.Msg object, we can create different types of messages such as an alert, confirmation, prompt, progress bar, or even a custom message:

Ext.onReady(function(){
  //alert("This is my first Extjs app !");
  Ext.Msg.alert("Alert","This is my first Ext js app !");
});

The output for the preceding lines of code is shown in the following screenshot:

Adding interaction to the program

Tip

If you're not getting any errors in the JavaScript console but still you can't see the message on the screen, as seen in the preceding screenshot, make sure you have inserted the stylesheet correctly.

In this case, we're using the alert method of the Ext.Msg object. The first parameter is the title of the message and the second parameter is the content of the message. That was easy, right? Now let's create a confirmation dialog box:

Ext.onReady(function(){
  Ext.Msg.alert("Alert","This is my first Ext JS app !");
  Ext.Msg.confirm("Confirm","Do you like Ext JS 5?");
});

We use the confirm method to request two possible answers from the user. The first parameter is the title of the dialog box and the second parameter is the question or message we want to show to the user:

Adding interaction to the program

Before the confirmation dialog box appeared, there was an alert that didn't show up. One important thing to keep in mind is that the messages and alerts from the Ext library don't block the JavaScript loop, unlike the native browser dialog box. This means that if we add another alert or custom message after the confirm method is called, we will not see the confirmation dialog box anymore.

So far, we have shown a confirmation dialog box requesting two possible answers from the user, but how can we know the user's response in order to do something according to the answer? There's a third parameter in the confirmation dialog box, which is a callback function that will be executed when the user clicks on one of the two answers:

Ext.onReady(function(){
  Ext.Msg.alert("Alert","This is my first Ext JS app !");
  Ext.Msg.confirm("Confirm","Do you like Ext JS 5?",
    function(btn){
      if (btn === "yes") {
        Ext.Msg.alert("Great!","This is great!");
      } else {
         Ext.Msg.alert("Really?","That's too bad.");
      }
  });
});

The callback function is executed after the user clicks on the Yes or No button or closes the confirmation dialog box. The function receives the value of the clicked button as a parameter, which is Yes or No; we can do whatever we want inside the callback function. In this case, we're sending a message depending on the given answer. Let's refresh our browser and test our small program to watch our changes. Confirmations are usually asked when a user wants to delete something, or maybe when they want to trigger a long process, basically anything that has only two options.

Tools and editors

Before we go any further, it's important we use some tools in order to be more productive when building our code and our applications. There are many editors in the market we can use to write code. Let's review some of them that will be useful in this book.

XAMPP or WAMP

XAMPP is an open source distribution of Apache that contains MySQL, PHP, and Perl, and is easy to install and easy to use. XAMPP can provide us with a local web development environment that is easy to handle without the need to test on a public server or hosting.

XAMPP is available for Windows (32-bit), Linux, and OS X versions and you can download XAMPP at https://www.apachefriends.org/index.html.

WAMP is another free package containing Apache, MySQL, and PHP, especially designed for the Windows OS. You can get it at http://www.wampserver.com/en/. WAMP comes in 32-bit and 64-bit versions according to your Windows OS.

In order to test the code or review some Ext JS examples, we will need a web server (Apache) or IIS to get the proper functionality and AJAX responses that the examples and code require.

Aptana

The Aptana editor is an IDE from Appcelerator. It's based on Eclipse but optimized for web applications. It's an open source project and free of charge.

Among other IDEs, Aptana contains an autocomplete functionality for JavaScript and Ext JS, a JavaScript validator, a CSS and HTML validator, a JavaScript debugger, Bundles, and more:

Aptana

Aptana is a great tool when working with Python, Ruby, or PHP as the backend of our projects. It contains tools to work with those out-of-the-box languages and also contains tools to deploy your application in the cloud using Heroku or Engine Yard.

Sencha Architect

The Sencha Architect desktop application is a tool that will help you design and develop an application faster than coding it by hand. The idea is to drag and drop the components into a canvas, and then add the functionality. The Sencha Architect desktop application is a product from Sencha Inc. that aims to help developers define components with a few clicks. We can create an Ext JS or Sencha Touch project. We can get a free trial from the official website of Sencha. We can also buy the license there.

Note

The current Sencha Architect version is 3.1.0. This works for Ext JS versions 4.x and 5.x. Previous versions of Sencha architect, such as 2.x will not work for Ext JS 5.

One of the advantages that Architect has is that you can drag-and-drop components into the work zone and this tool will create (generate) the basic code of the components and/or the part(s) you are working with.

Sencha Architect

Also, you can switch to the code view and see the results so far (some parts of the Ext JS classes/components can be edited but not all of them). You can see the code view in the following screenshot:

Sencha Architect

The intention of this book is not to teach you about Sencha Architect, it's for you to understand and learn Ext JS and create applications without the need to use Sencha Architect. Later, if you feel you need to use Sencha Architect or want to give a try, it may be easier once you know the basics and essentials that are covered in this book.

What's new in Ext JS 5?

Ext JS 5 introduces a great number of new features, and most of them will be covered in the upcoming chapters when we have a closer look, but for the moment we will briefly mention some of the significant additions in version 5:

  • Tablet support and new themes: This has introduced the ability to create apps compatible with touch-screen devices (touch-screen laptops, PCs, and tablets). The Crisp theme is introduced and is based on the Neptune theme. Also, there are new themes for tablet support, which are Neptune touch and Crisp touch.
  • New application architecture – MVVM: Adding a new alternative to MVC Sencha called MVVM (which stands for Model-View-ViewModel), this new architecture has data binding and two-way data binding, allowing us to decrease much of the extra code that some of us were doing in past versions. This new architecture introduces:
    • Data binding
    • View controllers
    • View models
  • Routing: Routing provides deep linking of application functionality and allows us to perform certain actions or methods in our application by translating the URL. This gives us the ability to control the application state, which means that we can go to a specific part or a direct link to our application. Also, it can handle multiple actions in the URL.
  • Responsive configurations: Now we have the ability to set the responsiveConfig property (new property) to some components, which will be a configuration object that represents conditions and criteria on which the configurations set will be applied, if the rule meets these configurations. As an example:
    responsiveConfig: {
        'width > 800': { region: 'west' },
        'width <= 800':{ region: 'north' }
    }
  • Data package improvements: Some good changes came in version 5 relating to data handling and data manipulation. These changes allowed developers an easier journey in their projects, and some of the new things are:
    • Common Data (the Ext JS Data class, Ext.Data, is now part of the core package)
    • Many-to-many associations
    • Chained stores
    • Custom field types
  • Event system: The event logic was changed, and is now a single listener attached at the very top of the DOM hierarchy. So this means when a DOM element fires an event, it bubbles to the top of the hierarchy before it's handled. So Ext JS intercepts this and checks the relevant listeners you added to the component or store. This reduces the number of interactions on the DOM and also gives us the ability to enable gestures.
  • Sencha Charts: Charts can work on both Ext JS and Sencha Touch, and have enhanced performance on tablet devices. Legacy Ext JS 4 charts were converted into a separate package to minimize the conversion/upgrade. In version 5, charts have new features such as:
    • Candlestick and OHLC series
    • Pan, zoom, and crosshair interactions
    • Floating axes
    • Multiple axes
    • SVG and HTML Canvas support
    • Better performance
    • Greater customization
    • Chart themes
  • Tab Panels: Tab panels have more options to control configurations such as icon alignment and text rotation. Thanks to new flexible Sass mixins, we can easily control presentation options.
  • Grids: This component, which has been present since version 2.x, is one of the most popular components, and we may call it one of the cornerstones of this framework. In version 5, it got some awesome new features:
    • Components in Cells
    • Buffered updates
    • Cell updaters
    • Grid filters (The popular "UX" (user extension) has been rewritten and integrated into the framework. Also filters can be saved in the component state.)
    • Rendering optimizations
  • Widgets: This is a lightweight component, which is a middle ground between Ext.Component and the Cell renderer.
  • Breadcrumb bars: This new component displays the data of a store (a specific data store for the tree component) in a toolbar form. This new control can be a space saver on small screens or tablets.
  • Form package improvements: Ext JS 5 introduces some new controls and significant changes on others:
    • Tagfield: This is a new control to select multiple values.
    • Segmented buttons: These are buttons with presentation such as multiple selections on mobile interfaces.
    • Goodbye to TriggerField: In version 5, TriggerField is deprecated and now the way to create triggers is by using the Text field and implementing the triggers on the TextField configuration. (TriggerField in version 4 is a text field with a configured button(s) on the right side.)
      What's new in Ext JS 5?
    • Field and Form layouts: Layouts were refactored using HTML and CSS, so there is improvement as the performance is now better.
  • New SASS Mixins (http://sass-lang.com/): Several components that were not able to be custom-themed now have the ability to be styled in multiple ways in a single theme or application. These components are:
    • Ext.menu.Menu
    • Ext.form.Labelable
    • Ext.form.FieldSet
    • Ext.form.CheckboxGroup
    • Ext.form.field.Text
    • Ext.form.field.Spinner
    • Ext.form.field.Display
    • Ext.form.field.Checkbox
  • The Sencha Core package: The core package contains code shared between Ext JS and Sencha Touch and in the future, this core will be part of the next major release of Sencha Touch. The Core includes:
    • Class system
    • Data
    • Events
    • Element
    • Utilities
    • Feature/environment detection

Summary

In this chapter, you learned how to set up and install Ext JS 5 and Sencha Cmd too. You also learned about the content of the folders included in the Ext JS 5 SDK, and the differences between folders in version 4 and version 5. We mentioned some useful tools that will be essential for this book; however, many developers may not like them or may not feel comfortable with these tools, so feel free to use your favorite tools and editors.

Through the course of this book, you are going to learn about the use of Ext JS 5, and we will cover the most important parts, features, and components, and many more classes and tools. At the end of this book, we will complete a small real-world application so you can get an idea of how to implement Ex JS for your next and future projects.

In the next chapter, we will focus on the Ext JS 5 core concepts and DOM manipulation.

Left arrow icon Right arrow icon

Description

If you are a JavaScript developer who now wants to use the Ext JS framework, this is the book for you. This guide is useful to you whether you're new to Ext JS 5 or are a seasoned expert. Experience in HTML, CSS, and JavaScript is required in order to understand and get the most out of this book.

What you will learn

  • Create applications with powerful web components designed for an easy end user experience
  • Discover how Ext JS works and how to make good use of this tool
  • Understand the basics of web applications using Ext JS
  • Use the new features of version 5 in your applications
  • Build agile and responsive web applications using Ext JS
  • Understand the MVVM application model to connect the model layer to the view
  • Easily customize sizing, spacing, colors, fonts, and so on in the new touchfriendly themes

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 31, 2015
Length: 452 pages
Edition : 1st
Language : English
ISBN-13 : 9781784394387
Vendor :
jQuery
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 : Jul 31, 2015
Length: 452 pages
Edition : 1st
Language : English
ISBN-13 : 9781784394387
Vendor :
jQuery
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 83.98
Mastering ExtJS - Second Edition
€41.99
Learning Ext JS_Fourth Edition
€41.99
Total 83.98 Stars icon
Banner background image

Table of Contents

16 Chapters
1. An Introduction to Ext JS 5 Chevron down icon Chevron up icon
2. The Core Concepts Chevron down icon Chevron up icon
3. Components and Layouts Chevron down icon Chevron up icon
4. It's All about the Data Chevron down icon Chevron up icon
5. Buttons and Toolbars Chevron down icon Chevron up icon
6. Doing It with Forms Chevron down icon Chevron up icon
7. Give Me the Grid Chevron down icon Chevron up icon
8. DataViews and Templates Chevron down icon Chevron up icon
9. The Tree Panel Chevron down icon Chevron up icon
10. Architecture Chevron down icon Chevron up icon
11. The Look and Feel Chevron down icon Chevron up icon
12. Responsive Configurations and Tablet Support Chevron down icon Chevron up icon
13. From Drawing to Charting Chevron down icon Chevron up icon
14. Finishing the Application Chevron down icon Chevron up icon
15. What's Next? Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.3
(4 Ratings)
5 star 75%
4 star 0%
3 star 0%
2 star 25%
1 star 0%
Davor Lozic Aug 22, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm one of the technical reviewers of this book. I can say that I've enjoyed reading every chapter of this book. It is full of examples, suited for both beginners who never developed anything in ExtJS or experts who just want to learn new concepts of ExtJS version 5. Book includes chapters with creating the whole pallet of GUI elements, concepts like MVVM, MVC, and creating reusable code.The chapter I was enjoying the most was "Chapter 4: It's All about the Data", where authors gave a lot of great examples with working with data, AJAX calls, mappers, validators, relationships, etc. For me it is the most valuable part of the book because most of my applications are data-driven.This book has everything one developer needs for creating the enterprise-level software with ExtJS.
Amazon Verified review Amazon
Philip Arad Aug 28, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Over the past few years, Ext JS has become a popular and powerful JavaScript framework for desktop application development.The new Sencha Ext JS 5 library offers hundreds of components and APIs to build robust applications and fulfills the critical needsof customers all around the world.The new version 5 is packed with new themes and the MVVM architecture that allows you to connect the model layer to the view andautomatically update the model when the view is modified and vice versa.Since the learning curve for Ext JS is not very easy/fast, you will need a good book to help you through.'Learning Ext JS - Fourth Edition' from Packt Publishing is the right book for you.This book covers many new features and components of Ext JS 5. At the beginning, you will learn the core concepts of Sencha Ext JS,components, data models, and mapping.Then it will teaches you about event-driven development, forms and grids, charts and themes, and third-party plugins.Later on in the book, you'll learn the implementations of the Tree panel, the MVC pattern, and a completely new feature called MVVM.By working sequentially through each chapter and following the step-by-step guides, you will be able to create a basic application.The book was written with the easiest and most comprehensible points so that you can understand the basics,This book is intended for developers who have the desire to learn and begin using this framework for their applications,and also for developers who have not started using the current version.It is written as an easy-to-follow guide that will help you understand the basics and fundamentals of the framework.If you have experience with previous versions of the framework, this book may clear many of your doubts about upgrading and how thingshappen in version 5.x.This book covers all of the basic information you need to know to start development with this nice and powerful framework.
Amazon Verified review Amazon
Shinobu Kawano Sep 22, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Ext JS framework has enormous amount of functionality therefore most beginners would be overwhelmed with that. Although Sencha offers various learning material, learning Ext JS is still a difficult task."Learning Ext JS" is a light in the dark for many beginners who want to get an overview of this huge framework.This book introduces many aspects of the Ext JS, sometimes concisely, and sometimes in detail. Especially, the description of fundamentals (class system, component lifecycle, data packages, etc) is well-organized. I can assure you that you will begin with Ext JS smoothly.Plus, many supplement tips is embedded in a lot of places. It would be useful for not only beginners but also seasoned Ext JS developers.
Amazon Verified review Amazon
Sam D Oct 13, 2015
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
The book gives a descent overview of the framework, but leaves gapping holes at very important intersections.1.) For instance, not enough detail on MVVM implementation in extjs, it's such a big paradigm shift in ExtJS 5+, but the author only dedicates 2 pages in the book to it. This leaves you needing much more.2.) When considering details on the store...it shows you how to add, remove, filter, getById, but doesn't take a look at how to build additional basic queries. Again, leaving you wanting more.I'm not happy with the book, but it's a shame, that there is so much lacking in terms of learning extjs.
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.