Ext.js – Useful Resources ”; Previous Next The following resources contain additional information on ExtJS. Please use them to get more in-depth knowledge on this. Useful Video Courses Full Stack Development With Vue JS 2 And Spring Boot 54 Lectures 3.5 hours Senol Atac More Detail Node js for Course for beginners + Game project 27 Lectures 2.5 hours Laurence Svekis More Detail Advanced Theoretical JavaScript: Learn Advanced JS Concepts 25 Lectures 2 hours Mehul Mohan More Detail ReactJS Course : Learn React JS From Scratch Best Seller 61 Lectures 4.5 hours Skillbakery More Detail JavaScript Deep Dive: Explore JS (For Beginners-to-Advanced) 129 Lectures 5.5 hours TELCOMA Global More Detail React JS and .NET Core Web API Full Stack Master Course 21 Lectures 3.5 hours Vinay Kumar More Detail Print Page Previous Next Advertisements ”;
Category: extjs
Ext.js – Drawing
Ext.js – Drawing ”; Previous Next Drawing package in ExtJS enables you to draw general purpose graphics. This can be used for graphics that work on all browsers and mobile devices. Sr.No Drawing 1 Circle This graphics is used to create a circulare shape. 2 Rectangle This graphics is used to create a rectanglar shape. 3 Arc This graphics is used to create an arc shape. 4 Ellipse This graphics is used to create an ellipse shape. 5 EllipticalArc This graphics is used to create an elliptical arc shape. 6 Image This graphics is used to add an image to your application. 7 Path This graphics is used to create a free path. 8 Text This graphics is used to add any text to your application. 9 Translate after render This property is used to move the starting point in your container, after the graphic is rendered. It can be used with any graphics. 10 Rotation This property is used to add a rotation to the drawing added. It can be used with any graphics. 11 Square This graphic is used to create a square. Print Page Previous Next Advertisements ”;
Ext.js – Components
Ext.js – Components ”; Previous Next ExtJS UI is made up of one or many widgets called Components. Ext Js has various UI components defined that can be customized as per your requirements. Sr.No Methods & Description 1 Grid Grid component can be used to show the data in a tabular format. 2 Form Form widget is to get the data from the user. 3 Message Box Message box is basically used to show data in the form of alert box. 4 Chart Charts are used to represent data in pictorial format. 5 Tool tip Tool tip is used to show some basic information when any event occurs. 6 Window This UI widget is to create a window, which should pop up when any event occurs. 7 HTML editor HTML Editor is one of the very useful UI component, which is used for styling the data that the user enters in terms of fonts, color, size, etc. 8 Progress bar Shows the progress of the backend work. Print Page Previous Next Advertisements ”;
Ext.js – Localization
Ext.js – Localization ”; Previous Next It is always best to communicate with the users in the language they understand and prefer. Extjs localization package supports over 40 languages such as German, French, Korean, Chinese, etc. It is very simple to implement the locale in ExtJs. You’ll find all of the bundled locale files in the override folder of the ext-locale package. Locale files just overrides that tells Ext JS to replace the default English values of certain components. The following program is to show the month in different locale to see the effect. Try the following program. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-fr.js”></script> <script type = “text/javascript”> Ext.onReady(function() { var monthArray = Ext.Array.map(Ext.Date.monthNames, function (e) { return [e]; }); var ds = Ext.create(”Ext.data.Store”, { fields: [”month”], remoteSort: true, pageSize: 6, proxy: { type: ”memory”, enablePaging: true, data: monthArray, reader: {type: ”array”} } }); Ext.create(”Ext.grid.Panel”, { renderTo: ”grid”, id : ”gridId”, width: 600, height: 200, title:”Month Browser”, columns:[{ text: ”Month of the year”, dataIndex: ”month”, width: 300 }], store: ds, bbar: Ext.create(”Ext.toolbar.Paging”, { pageSize: 6, store: ds, displayInfo: true }) }); Ext.getCmp(”gridId”).getStore().load(); }); </script> </head> <body> <div id = “grid” /> </body> </html> The above program will produce the following result For using different locale other than English, we would need to add the locale specific file in our program. Here we are using https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/localefr.js for French. You can use different locale for different languages such as https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-ko.js for korean, etc. The following program is to show the date picker in Korean locale to see the effect. Try the following program. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-ko.js”></script> <script type = “text/javascript”> Ext.onReady(function() { Ext.create(”Ext.picker.Date”, { renderTo: ”datePicker” }); }); </script> </head> <body> <div id = “datePicker” /> </body> </html> The above program will produce the following result − Following table lists the few locales available in ExtJS and the main file locale URL to be changed. Locale Language Locale URL ko Korean https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-ko.js fr French https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-fa.js es Spanish https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-es.js ja Japanese https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-ja.js it Italian https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-it.js ru Russian https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/locale-ru.js zh_CN Simplifies Chinese https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/locale/localezh_CN.js Print Page Previous Next Advertisements ”;
Ext.js – Questions and Answers ”; Previous Next What is Ext JS? Ext JS stands for extended JavaScript. It is a JavaScript framework to develop rich UI web based desktop applications. Ext JS is extended on which library? It is a Sencha product which is extended from YUI (Yahoo user interface). What are the main library files to add in HTML page? These are the main files to include in HTML page to run Ext JS code − Ext-all.js Ext-all.css Explain features of Ext JS. Customizable UI widgets with collection of rich UI such as Grids, pivot grids, forms, charts, trees. Code compatibility of new versions with the older one. A flexible layout manager helps to organize the display of data and content across multiple browsers, devices, and screen sizes. Advance data package decouples the UI widgets from the data layer. The data package allows client-side collection of data using highly functional models that enable features such as sorting and filtering. It is protocol agnostic, and can access data from any back-end source. Customizable Themes Ext JS widgets are available in multiple out-of-the-box themes that are consistent across platforms. Explain advantage of using Ext JS. Streamlines cross-platform development across desktops, tablets, and smartphones — for both modern and legacy browsers. Increases the productivity of development teams by integrating into enterprise development environments via IDE plugins. Reduces the cost of web application development. Empowers teams to create apps with a compelling user experience. It has set of widgets for making UI powerful and easy. It follows MVC architecture so highly readable code. Explain limitations of using Ext JS. The size of library is large around 500 KB which makes initial loading time more and makes application slow. HTML is full of <DIV> tags makes it complex and difficult to debug. According to general public license policy it is free for open source applications but paid for commercial applications. Some times for loading even simple things requires few lines of coding which is simpler in plain html or Jquery. Need quite experienced developer for developing Ext JS applications. What are the browser Ext JS supports? Ext JS supports cross browser compatibility, it supports all major browsers as − IE 6 and above Firefox 3.6 and above Chrome10 and above Safari 4 and above Opera 11 and above Ext JS supports which architecture? Ext JS 4+ supports MVC (Model view controller) architecture. From Ext JS 5 it started supporting MVVM (Model View Viewmodel) also. What is the latest version of Ext JS and its benefits? Ext JS 6 is the latest version of Ext JS which has major benefit that it can be used for both desktop and as well as mobile applications. Basically it is a merge of Ext JS (desktop applications) and Sencha touch (mobile application). Advice for the developer who are going to use it for the first time. Ext JS is a JavaScript framework so to start using it you should use have prior knowledge of HTML and JS (not expert level but should have basic understanding). Then it takes to understand the basic so give it time and learn gradually. Difference between Ext JS and jQuery. Both the frameworks are quite different we can compare Ext JS and jQuery UI as Ext JS is full-fledged UI rich framework. But still Ext JS has much more components then jQuery UI. Difference between Ext JS and Angular JS. Parameter Ext JS Angular JS Rich UI Ext JS provides rich UI options such as forms , grid, charts Angular JS does not provide rich UI inbuilt Rich theme UI components Ext JS provides multiple themes inbuilt Angular JS does not provide Rich UI it has to be integrated with AngularUI, AngularBootstarp etc. Cross browser compatibility Ext JS provide cross browser compatibility it works for almost all the browsers IE6+, FF, Chrome, Safari, Opera etc. Angular JS has to use third party library such as jQuery, jqLite for solving this purpose. Automatic testing support Possible only with external tools Provides inbuilt. Two way data binding In Ext JS 5 two way binding is included. It supports two way binding start from first version. Performance Ext JS is comparatively heavier and slower. Angular JS is light weight framework than Ext JS Build tools Ext JS uses Sencha cmd tool for builds Angular JS uses third party tools such as grunt. What do you know about different versions of Ext JS? Ext JS 1.1 The first version of Ext JS was developed by Jack Slocum in 2006. It was a set of utility classes which is an extension of YUI. He named the library as YUI-ext. Ext JS 2.0 Ext JS version 2.0 was released in 2007. This version had new API documentation for desktop Application with limited features. This version doesn”t had backward compatibility with previous version of Ext JS. Ext JS 3.0 Ext JS version 3.0 was released in 2009. This version added new features as chart and list view but at the cost of speed. It had backwards compatible with version 2.0. Ext JS 4.0 After the release of Ext JS 3 the developers of Ext JS had the major challenge of ramping up the speed. Ext JS version 4.0 was released in 2011. It had the complete revised structure which followed by MVC architecture and a speedy application. Ext JS 5.0 Ext JS version 5.0 was released in 2014. The major change in this release was to change the MVC architecture to MVVM architecture. It includes the ability to build desktop apps on touch-enabled devices, two-way data binding, responsive layouts and many more features. Ext JS 6.0 Ext JS 6 merges the Ext JS (for desktop application) and sencha touch (for mobile application) framework. What are the different Ext JS components? Ext JS has various UI components some of the majorly used components are − Grid Form Message Box Progress Bar Tool Tip Window HTML Editor Charts What is xType in Ext JS? xType defines the
Ext.js – Themes
Ext.js – Themes ”; Previous Next Ext.js provides a number of themes to be used in your applications. You can add a different theme in place of a classic theme and see the difference in the output. This is done simply by replacing the theme CSS file as explained ahead. Neptune Theme Consider your very first Hello World application. Remove the following CSS from the application. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css Add the following CSS to use the Neptune theme. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/resources/theme-neptune-all.css To see the effect, try the following program. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/resources/theme-neptune-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript”> Ext.onReady(function() { Ext.create(”Ext.Panel”, { renderTo: ”helloWorldPanel”, height: 200, width: 600, title: ”Hello world”, html: ”First Ext JS Hello World Program” }); }); </script> </head> <body> <div id = “helloWorldPanel” /> </body> </html> The above program will produce the following result − Crisp Theme Consider your very first Hello World application. Remove the following CSS from the application. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css Add the following CSS to use the Neptune theme. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css To see the effect, try the following program. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript”> Ext.onReady(function() { Ext.create(”Ext.Panel”, { renderTo: ”helloWorldPanel”, height: 200, width: 600, title: ”Hello world”, html: ”First Ext JS Hello World Program” }); }); </script> </head> <body> <div id = “helloWorldPanel” /> </body> </html> The above program will produce the following result − Triton Theme Consider your very first Hello World application. Remove the following CSS from the application. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css Add the following CSS to use the Triton theme. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-triton/resources/theme-triton-all.css To see the effect, try the following program. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-triton/resources/theme-triton-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript”> Ext.onReady(function() { Ext.create(”Ext.Panel”, { renderTo: ”helloWorldPanel”, height: 200, width: 600, title: ”Hello world”, html: ”First Ext JS Hello World Program” }); }); </script> </head> <body> <div id = “helloWorldPanel” /> </body> </html> The above program will produce the following result − Gray Theme Consider your very first Hello World application. Remove the following CSS from the application. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css Add the following CSS to use the Gray theme. https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-gray/resources/theme-gray-all.css To see the effect, try the following program. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-gray/resources/theme-gray-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript”> Ext.onReady(function() { Ext.create(”Ext.Panel”, { renderTo: ”helloWorldPanel”, height: 200, width: 600, title: ”Hello world”, html: ”First Ext JS Hello World Program” }); }); </script> </head> <body> <div id = “helloWorldPanel” /> </body> </html> The above program will produce the following result − Print Page Previous Next Advertisements ”;
Ext.js – Accessibility
Ext.js – Accessibility ”; Previous Next In general accessibility means availability, the content is accessible means the content is available. In software terms, the application is accessible means the application is available for all. Here, all means the persons with disabilities, the visually impaired or those who use screen readers to use a computer or those who prefer to navigate using the keyboard instead of using a mouse. navigation with keyboard instead of using a mouse. Applications which are accessible are called ARIA (Accessible Rich Internet Applications). Accessibility in Ext JS Ext JS is designed to keep this in mind that it should work with all keyboard navigations. It has built-in tab indexing and focus-ability, and it is always on by default so we do not need to add any property to enable this functionality. This functionality allows all keyboard-enabled components to interact with the user when tabbed into. For example, we can use tab for moving on to the next component instead of a mouse. Same way, we can use shift+tab for moving backward and use enter on the keyboard to click, etc. Focus Styling and Tabs Focus is inbuilt in Extjs when using keystroke for tabbing. Following example shows how to the style changes, when the focus changes with the tabs. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript”> Ext.onReady(function(){ Ext.create(”Ext.Button”, { renderTo: Ext.getElementById(”button1”), text: ”Button1”, listeners: { click: function() { Ext.MessageBox.alert(”Alert box”, ”Button 1 is clicked”); } } }); Ext.create(”Ext.Button”, { renderTo: Ext.getElementById(”button2”), text: ”Button2”, listeners: { click: function() { Ext.MessageBox.alert(”Alert box”, ”Button 2 is clicked”); } } }); Ext.create(”Ext.Button”, { renderTo: Ext.getElementById(”button3”), text: ”Button3”, listeners: { click: function() { Ext.MessageBox.alert(”Alert box”, ”Button 3 is clicked”); } } }); }); </script> </head> <body> <p>Please click the button to see event listener:</p> <span id = “button3″/> <span id = “button2″/> <span id = “button1″/> </body> </html> To see the effect, use tab for moving from the next button and shft+tab for focusing backward. Use enter and see how the focused button”s related alert would pop up. ARIA Theme ExtJS provides the theme aria for the visually impaired. Following example shows the aria theme which is easily accessible for the visually impaired. Live Demo <!DOCTYPE html> <html> <head> <link href = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-aria/resources/theme-aria-all.css” rel = “stylesheet” /> <script type = “text/javascript” src = “https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js”></script> <script type = “text/javascript”> Ext.require([ ”Ext.grid.*”, ”Ext.data.*” ]); // Creation of data model Ext.define(”StudentDataModel”, { extend: ”Ext.data.Model”, fields: [ {name: ”name”, mapping : ”name”}, {name: ”age”, mapping : ”age”}, {name: ”marks”, mapping : ”marks”} ] }); Ext.onReady(function() { // Store data var myData = [ { name : “Asha”, age : “16”, marks : “90” }, { name : “Vinit”, age : “18”, marks : “95” }, { name : “Anand”, age : “20”, marks : “68” }, { name : “Niharika”, age : “21”, marks : “86” }, { name : “Manali”, age : “22”, marks : “57” } ]; // Creation of first grid store var firstGridStore = Ext.create(”Ext.data.Store”, { model: ”StudentDataModel”, data: myData }); // Creation of first grid var firstGrid = Ext.create(”Ext.grid.Panel”, { store : firstGridStore, columns : [{ header: “Student Name”, dataIndex: ”name”, id : ”name”, flex: 1, sortable: true },{ header: “Age”, dataIndex: ”age”, flex: .5, sortable: true },{ header: “Marks”, dataIndex: ”marks”, flex: .5, sortable: true }], stripeRows : true, title : ”First Grid”, margins : ”0 2 0 0” }); // Creation of a panel to show both the grids. var displayPanel = Ext.create(”Ext.Panel”, { width : 600, height : 200, layout : { type: ”hbox”, align: ”stretch”, padding: 5 }, renderTo : ”panel”, defaults : { flex : 1 }, items : [ firstGrid ] }); }); </script> </head> <body> <div id = “panel” > </div> </body> </html> The above program will produce the following result. You can use tab and mouse up and down keys for moving the focus across the grid and the theme is basically for the visually impaired people. Print Page Previous Next Advertisements ”;
Ext.js – Quick Guide
Ext.js – Quick Guide ”; Previous Next Ext.js – Overview Ext JS is a popular JavaScript framework which provides rich UI for building web applications with cross-browser functionality. Ext JS is basically used for creating desktop applications. It supports all the modern browsers such as IE6+, FF, Chrome, Safari 6+, Opera 12+, etc. Whereas another product of Sencha, Sencha Touch is used for mobile applications. Ext JS is based on MVC/MVVM architecture. The latest version of Ext JS 6 is a single platform, which can be used for both desktop and mobile application without having different code for different platform. History Ext JS 1.1 The first version of Ext JS was developed by Jack Slocum in 2006. It was a set of utility classes, which is an extension of YUI. He named the library as YUI-ext. Ext JS 2.0 Ext JS version 2.0 was released in 2007. This version had a new API documentation for desktop application with limited features. This version doesn’t have backward compatibility with previous version of Ext JS. Ext JS 3.0 Ext JS version 3.0 was released in 2009. This version added new features as chart and list view but at the cost of speed. It had backward compatibility with version 2.0. Ext JS 4.0 After the release of Ext JS 3, the developers of Ext JS had the major challenge of ramping up the speed. Ext JS version 4.0 was released in 2011. It had the complete revised structure, which was followed by MVC architecture and a speedy application. Ext JS 5.0 Ext JS version 5.0 was released in 2014. The major change in this release was to change the MVC architecture to MVVM architecture. It includes the ability to build desktop apps on touch-enabled devices, two-way data binding, responsive layouts, and many more features. Ext JS 6.0 Ext JS 6 merges the Ext JS (for desktop application) and Sencha Touch (for mobile application) framework. Features Following are the highlighted features of Ext JS. Customizable UI widgets with collection of rich UI such as grids, pivot grids, forms, charts, trees. Code compatibility of new versions with the older one. A flexible layout manager helps to organize the display of data and content across multiple browsers, devices, and screen sizes. Advance data package decouples the UI widgets from the data layer. The data package allows client-side collection of data using highly functional models that enable features such as sorting and filtering. It is protocol agnostic, and can access data from any back-end source. Customizable Themes Ext JS widgets are available in multiple out-of-the-box themes that are consistent across platforms. Benefits Sencha Ext JS is the leading standard for business-grade web application development. Ext JS provides the tools necessary to build robust applications for desktop and tablets. Streamlines cross-platform development across desktops, tablets, and smartphones – for both modern and legacy browsers. Increases the productivity of development teams by integrating into enterprise development environments via IDE plugins. Reduces the cost of web application development. Empowers the teams to create apps with a compelling user experience. Offers a set of widgets to easily make a powerful UI. Follows MVC architecture, hence the code is highly readable. Limitations The size of the library is large, around 500 KB, which makes initial loading time more and makes application slow. HTML is full of tags that makes it complex and difficult to debug. According to general public license policy, it is free for open source applications but paid for commercial applications. Sometimes for loading even simple things require few lines of coding, which is simpler in plain html or JQuery. Need quite experienced developer for developing Ext JS applications. Tools Following are the tools provided by Sencha used for Ext JS application development mainly at the production level. Sencha CMD Sencha CMD is a tool which provides the features of Ext JS code minification, scaffolding, and production build generation. Sencha IDE Plugins Sencha IDE plugins integrates Sencha frameworks into IntelliJ, WebStorm IDEs, which helps in improving the developer’s productivity by providing features such as code completion, code inspection, code navigation, code generation, code refactoring, template creation, spell-checking, etc. Sencha Inspector Sencha Inspector is a debugging tool which helps the debugger to debug any issue while development. Ext.js – Environment Setup Local Environment Setup This section guides you on how to download and set up Ext JS on your machine. Please follow the steps to set up the environment. Downloading Library Files Download the trial version of Ext JS library files from Sencha https://www.sencha.com. You will get the trial version from the site on your registered mail id, which will be a zipped folder named ext-6.0.1-trial. Unzip the folder and you will find various JavaScript and CSS files, which you will include in our application. We will mostly include the following files − JavaScript Files − JS file which you can find under the folder ext-6.0.1-trialext6.0.1build are − Sr.No File & Description 1 ext.js This is the core file which contains all the functionalities to run the application. 2 ext-all.js This file contains all the code minified with no comments in the file. 3 ext-all-debug.js This is the unminified version of ext-all.js for debugging purpose. 4 ext-all-dev.js This file is also unminified and is used for development purpose as it contains all the comments and console logs to check any errors/issue. 5 ext-all.js This file is used for production purpose mostly as it is much smaller than any other. You can add these files to your projects JS folder or you can provide a direct path where the file resides in your system. CSS Files − There are number of theme-based files, which you can find under folder ext6.0.1-trialext-6.0.1buildclassictheme-classicresourcestheme-classic-all.css If you are going to use desktop application, then you can use classic themes under folder ext-6.0.1-trialext-6.0.1buildclassic If we are going to use mobile application, then you can use modern themes which can be found under folder ext-6.0.1-trialext-6.0.1buildmodern The following library files will be added in an Ext JS
Ext.js – Containers
Ext.js – Containers ”; Previous Next Container in Ext JS is the component where we can add other container or child components. These containers can have multiple layout to arrange the components in the containers. We can add or remove the components from the container and from its child elements. Ext.container.Container is the base class for all the containers in Ext JS. Sr.No Description 1 Components inside Container This example shows how to define the components inside a container 2 Container inside container This example shows how to define a container inside a container with other components There are various type of containers Ext.panel.Panel, Ext.form.Panel, Ext.tab.Panel and Ext.container.Viewport are frequently used containers in Ext JS. Below are the example which shows how to use these containers. Sr.No. Type of Containers & Description 1 Ext.panel.Panel This example shows a Ext.panel.Panel container 2 Ext.form.Panel This example shows a Ext.form.Panel container 3 Ext.tab.Panel This example shows a Ext.tab.Panel container 4 Ext.container.Viewport This example shows a Ext.container.Viewport container Print Page Previous Next Advertisements ”;
Ext.js – Architecture
Ext.js – Architecture ”; Previous Next Ext JS follows MVC/ MVVM architecture. MVC − Model View Controller architecture (version 4) MVVM − Model View Viewmodel (version 5) This architecture is not mandatory for the program, however, it is a best practice to follow this structure to make your code highly maintainable and organized. Project Structure with Ext JS App ———-src ———-resources ——————-CSS files ——————-Images ———-JavaScript ——————–App Folder ——————————-Controller ————————————Contoller.js ——————————-Model ————————————Model.js ——————————-Store ————————————Store.js ——————————-View ————————————View.js ——————————-Utils ————————————Utils.js ——————————–app.js ———–HTML files Ext JS app folder will reside in JavaScript folder of your project. The App will contain controller, view, model, store, and utility files with app.js. app.js − The main file from where the flow of program will start, which should be included in the main HTML file using <script> tag. App calls the controller of application for the rest of the functionality. Controller.js − It is the controller file of Ext JS MVC architecture. This contains all the control of the application, the events listeners, and most of the functionality of the code. It has the path defined for all the other files used in that application such as store, view, model, require, mixins. View.js − It contains the interface part of the application, which shows up to the user. Ext JS uses various UI rich views, which can be extended and customized here according to the requirement. Store.js − It contains the data locally cached which is to be rendered on the view with the help of model objects. Store fetches the data using proxies which has the path defined for services to fetch the backend data. Model.js − It contains the objects which binds the store data to view. It has the mapping of backend data objects to the view dataIndex. The data is fetched with the help of store. Utils.js − It is not included in MVC architecture but a best practice to use to make the code clean, less complex, and more readable. We can write methods in this file and call them in the controller or the view renderer wherever required. It is helpful for code reusability purpose as well. In MVVM architecture, the controller is replaced by ViewModel. ViewModel − It basically mediates the changes between view and model. It binds the data from the model to the view. At the same time, it does not have any direct interaction with the view. It has only knowledge of the model. How It Works For example, if we are using one model object at two-three places in UI. If we change the value at one place of UI, we can see without even saving that change. The value of model changes and so gets reflected in all the places in the UI, wherever the model is used. It makes the developer”s effort much lesser and easier as no extra coding is required for binding data. Print Page Previous Next Advertisements ”;