From Event to Action: Accelerate Your Decision Making with Real-Time Automation
ExtJS framework
1. License : Creative Commons (Attribution , Share Alike) 3.0 Generic
A powerful javascript framework
by
Vincenzo Ferrari
2. Index
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
1. Loader
2. Class System
3. Design Patterns
4. MVC
5. Charts
3. Index
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
1. Loader
2. Class System
3. Design Patterns
4. MVC
5. Charts
4. Ext.Loader
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
Ext.Loader is the heart of the new dynamic dependency loading
capability in Ext JS 4+. It is most commonly used via the Ext.require
shorthand. Ext.Loader supports both asynchronous and synchronous
loading approaches.
Asynchronous Loading
Advantages
Cross-domain
No web server needed
Best possible debugging
Disadvantages
Dependencies need to be specified before-hand
Synchronous Loading on Demand
Advantages
There's no need to specify dependencies before-hand
Disadvantages
Not as good debugging experience
Must be from the same domain due to XHR restriction
Need a web server
Hybrid Solution
It has all the advantages
combined from
asynchronous and
synchronous loading
5. Ext.Loader – Sync
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
Ext.create & Ext.widget
// Instead of new Ext.window.Window({...});
Ext.create('widget.window', { ... });
// Same as above, using full class name instead of alias
Ext.create('Ext.window.Window', {});
// Same as above, all you need is the traditional `xtype`
Ext.widget('window', {});
Behind the scene, Ext.ClassManager will automatically check whether the given
class name / alias has already existed on the page. If it's not, Ext.Loader will
immediately switch itself to synchronous mode and automatic load the given class
and all its dependencies.
6. Ext.Loader – Async
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
Ext.require
// Syntax
Ext.require({String/Array} expressions);
// Single alias
Ext.require('widget.window');
// Single class name
Ext.require('Ext.window.Window');
// Multiple aliases / class names mix
Ext.require(['widget.window',
'layout.border', 'Ext.data.Connection']);
// Wildcards
Ext.require(['widget.*', 'layout.*',
'Ext.data.*']);
Ext.exclude
// Syntax: Note that it must be in this
chaining format.
Ext.exclude({String/Array} expressions)
.require({String/Array} expressions);
// Include everything except Ext.data.*
Ext.exclude('Ext.data.*').require('*');
// Include all widgets except
widget.checkbox*,which will match
widget.checkbox, widget.checkboxfield,
widget.checkboxgroup, etc.
Ext.exclude('widget.checkbox*').require('wi
dget.*');
8. Index
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
1. Loader
2. Class System
3. Design Patterns
4. MVC
5. Charts
9. Class System – Naming Convention
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
Classes
Ext.data.Model
Ext.Loader
Ext.data.proxy.Ajax
Source files
Ext.data.Model is stored in /path/to/src/Ext/data/Model.js
Ext.Loader is stored in /path/to/src/Ext/Loader.js
Ext.form.action.Submit is stored in /path/to/src/Ext/form/action/Submi.js
Methods and Variables
encodeUsingMd5()
getHtml()
Properties
Ext.MessageBox.YES
Ext.MessageBox.NO
23. Index
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
1. Loader
2. Class System
3. Design Patterns
4. MVC
5. Charts
24. MVC – Architecture
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
Ext JS 4 comes with a new application architecture that not only organizes
your code but reduces the amount you have to write.
Model
Is a collection of fields and their data (e.g. a User model with username and
password fields). Models know how to persist themselves through the data
package, and can be linked to other models through associations. Models are
normally used with Stores to present data into grids and other components.
View
Is any type of component - grids, trees and panels are all views.
Controllers
Are special places to put all of the code that makes your app work - whether that's
rendering views, instantiating Models, or any other app logic.
37. Charts – Axes
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
Axes types
Axis: base class
Category: A type of axis that displays items in
categories.
Gauge: Gauge Axis is the axis to be used with a
Gauge series. The Gauge axis displays numeric
data from an interval.
Numeric: An axis to handle numeric values.
Time: A type of axis whose units are measured
in time values.
axes: [{
title: 'Name' ,
fields: ['name'] ,
position: 'bottom',
type: 'Category'
} , {
title: 'Balances',
position: 'left',
fields: ['balance'] ,
type: 'Numeric'
}]
Axes are the lines that define the boundaries of the data points that a Chart
can display.
38. Charts – Series
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
series: [{
type: 'line',
xField: 'name',
yField: 'balance'
}]
Series are responsible for the visual representation of the data points
contained in the Store.
Series
Area
Bar
Cartesian
Column
Series types
Gauge
Line
Pie
Radar
Scatter
39. Index
License : Creative Commons (Attribution , Share Alike) 3.0 Generic
1. Loader
2. Class System
3. Design Patterns
4. MVC
5. Charts
6. Misc (dafaq?)