SlideShare a Scribd company logo
1 of 22
Presenter: Gourav Singh, Mindfire Solutions
Date: 04/05/2015
Basic of Ext JS
Framework
Presenter: Gourav Singh, Mindfire Solutions
Agenda
 Why Ext JS?
 Overview of Ext JS API
 Themes and Styling in Ext JS
 Understanding Ext JS API
 Ext JS Component Lifecycle
 Ext JS Components and Events
 Ext JS Layouts
Presenter: Gourav Singh, Mindfire Solutions
Why Ext JS?
 Object-Oriented flavor
 Rich UI controls
 Support for HTML 5
 MVC architecture
 Themes and Styling
 Documentation
 Moving to the mobile version
Presenter: Gourav Singh, Mindfire Solutions
Overview of Ext JS Framework
 The resources folder contains the standard set of
themes that you can use in your application.
 The src folder contains the entire API organized into
numerous JavaScript files.
 The docs folder contains the API documentation and
guides.
 The ext.js file contains the core API.
 The ext-all.js file contains the complete API in a
compressed or minified format.
 The ext-all-dev.js contains the complete API with
comments.
 The ext-all-debug.js contains the complete API with
console warnings. This file is meant to be used for
development.
 The ext-all-debug-w-comments.js contains the
complete API with comments and console warnings.
This file is meant to be used for development.
Presenter: Gourav Singh, Mindfire Solutions
Themes and Styling in Ext JS
 The following css file needs to be included.
Ext JS/resources/css/ext-all.css
 Three themes included in Ext JS4
• Classic (ext-all-classic.css)
• Grey (ext-all-gray.css)
• Neptune (ext-all-neptune.css)
• Crisp (Ext JS 5)
<head>
<link href="extjs/resources/css/ext-all-grey.css" rel="stylesheet"
type="text/css" />
<script src="extjs/ext-all.js" type="text/javascript"></script>
</head>
 The Ext JS API is grouped into packages like those in Java. Every package contains a collection of classes,
whose names begin with the letters Ext.
The general format of any class name is:
Ext.packageName.optionalSubPackageName.ClassName
Ex: Ext.chart.series.Pie
You can define a new class in Ext JS using the Ext.define method.
Ext.define(“MFS.seminar.extjs.Session",{});
Create an object of the class with Ext.create method.
var session1 = Ext.create(“Mfs.seminar.extjs.Session");
Or
var session1 = new Mfs.seminar.extjs.Session();
 The Ext.create("classname") method dynamically loads all the JavaScript files that the classname is
dependent on before creating an instance, whereas this is not possible when you use the new keyword.
Understanding Ext JS API
Presenter: Gourav Singh, Mindfire Solutions
 Constructor is the first function that’s called when an object is created. You
can define constructors in our classes using the special property
constructor.
Ext.define(“Mfs.seminar.extjs.Session",{
constructor : function(){
console.log("Book created");
}
});
Ext.create(“Mfs.seminar.extjs.Session");
Constructor
Presenter: Gourav Singh, Mindfire Solutions
Ext.define("Mfs.seminar.extjs.Session",{
title : "",
price : -1,
constructor : function(title,price){
this.title = title;
this.price = price;
}
});
var session1 = Ext.create("Mfs.seminar.extjs.Session",“Test",16.00);
console.log(session1.title);
console.log(session1.price);
Property
Presenter: Gourav Singh, Mindfire Solutions
 Ext JS provides a config section for every class where you can list the attributes of the class with
default values.
 The object can be created by initializing the attributes in which you are interested.
Ext.define("Mfs.seminar.extjs.Book",{
config : {
title : "",
price : -1,
authors: []
},
constructor : function(cfg){
this.initConfig(cfg);
}
});
 The variables declared in the config section have the getter/setter methods generated
automatically.
 The config generates an apply method for every attribute automatically as well. The apply
method is called internally by the setter method.
Config
Presenter: Gourav Singh, Mindfire Solutions
 You can define custom methods in classes as shown below.
Ext.define("Mfs.seminar.extjs.Book",{
config : {
title : "", price: 0
},
constructor : function(cfg){
this.initConfig(cfg);
},
read: function(){
console.log("Reading " + this.getTitle());
}
});
var xml = Ext.create("Mfs.seminar.extjs.Book",{
title : "XML", price:12.00
});
xml.read(); //Prints Reading XML
Methods
Presenter: Gourav Singh, Mindfire Solutions
 Ext JS provides a statics property where you can list static variables and methods. The static
members can be accessed using the class name, as in OO languages.
Ext.define("Mfs.seminar.extjs.Book",{
statics : {
numberOfBooks: 0,
getNumberOfBooks: function(){
return this.numberOfBooks;
}
},
constructor : function(){
this.statics().numberOfBooks++;
}
});
Ext.create("Mfs.seminar.extjs.Book");
Ext.create("Mfs.seminar.extjs.Book");
console.log(Mfs.seminar.extjs.Book.getNumberOfBooks());
Static Members
Presenter: Gourav Singh, Mindfire Solutions
 We have an extend keyword that can be used to inherit a class in Ext JS 4.
Ext.define(“Mfs.seminar.extjs.Employee",{
config : {
employeeid : "",
name : "",
salary : 0
},
constructor : function(cfg){
this.initConfig(cfg);
},
work : function(){
console.log(this.getName() + " is working");
}
});
Ext.define("Mfs.seminar.extjs.Developer",{
extend : "Mfs.seminar.extjs.Employee",
config : {
Level : 1
}
});
Inheritance
Presenter: Gourav Singh, Mindfire Solutions
 Mixins help you to mix the behavior of different classes into your class. Your class can have the
functionalities of any number of classes mixed together. It’s somewhat similar to interfaces in
Java where a class can implement any number of interfaces.
Ext.define("Aquatic",{
swim : function(){
console.log("Swimming");
}
});
Ext.define("Terrestrial",{
walk : function(){
console.log("Walking");
}
});
Ext.define("Reptile",{
mixins : ["Aquatic","Terrestrial"]
});
var reptile = Ext.create("Reptile");
reptile.swim();
reptile.walk();
Mixins
Presenter: Gourav Singh, Mindfire Solutions
 You can define an alias name for the classes. The alias name is mainly used when you create
custom components.
 You can use the alias property in the definition of the class as shown below.
Ext.define("Mfs.seminar.extjs.Book", {
alias : "Book",
});
Ext.create("Book");
 There are certain conventions involved in creating these alias names. For example, alias names
for custom components begin with the prefix widget, whereas alias names for custom proxy
classes begin with proxy.
Alias
Presenter: Gourav Singh, Mindfire Solutions
 Ext JS 4 provides a way to create singleton classes. Singleton is a popular design pattern in OO
languages where a class configured to be singleton has only one instance throughout the
application.
Ext.define(“Mfs.seminar.extjs.Company", {
singleton : true,
config: {
title: “Mindfire Solutions",
},
getNumberOfEmployees: function () {
return 700;
}
});
console.log(Mfs.seminar.extjs.Company.title);
console.log(Mfs.seminar.extjs.Company.getNumberOfEmployees());
Singleton
Presenter: Gourav Singh, Mindfire Solutions
Presenter: Gourav Singh, Mindfire Solutions
Ext JS Component Lifecycle
 Initialization
• The config object is applied
• The base Component events are created
• The component is registered in ComponentMgr
• The initComponent method is called
• Plugins are loaded (if applicable)
• State is initialized (if applicable)
• The component is rendered (if applicable)
 Rendering
• The beforerender event is fired
• The container is set
• The onRender method is called
• Custom class and/or style applied
• The render event is fired
• The afterRender method is called
 Destruction
• The beforedestroy event is fired
• The beforeDestroy method is called
• Element and its listeners are removed
• The onDestroy method is called
• Component is unregistered from
ComponentMgr
• The destroy event is fired
• Event listeners on the Component are
removed
Presenter: Gourav Singh, Mindfire Solutions
Ext JS Components and Events
 Ext.Component: It serves as the base class for all the UI components.
Ext.create("Ext.Component", {
html: "Raw Component",
renderTo : Ext.getBody()
});
The above code displays a text Raw Component in the page. It generates the following HTML snippet.
<div id="component-1099 class="x-component x-component-default">Raw Component</div>
Presenter: Gourav Singh, Mindfire Solutions
Ext JS Components and Events
 Ext.container.Container: Ext.container.Container class is the base class for all the container-based
components in Ext JS .
Ext.create("Ext.container.Container", {
html : "Raw Container",
renderTo: Ext.getBody()
});
The above code displays a text Raw Component in the page. It generates the following HTML snippet.
<div id="container-1009" class="x-container x-container-default">Raw Container
<div id="container-1009-clearEl" class="x-clear" role="presentation"></div>
</div>
Presenter: Gourav Singh, Mindfire Solutions
Ext JS Container Controls
Ext.panel.Panel: Ext.panel.Panel with the xtype ‘panel' is the root container class for several container
classes. It’s probably the most commonly used container class.
Ext.create("Ext.panel.Panel",{
title : "Sample Panel",
items : [
...
]
});
Ext.panel.Panel is inherited by a number of classes shown here.
Ext.form.Panel: Represents a form
Ext.menu.Menu: Represents a menu
Ext.window.Window: Represents a floatable, draggable window component
Ext.tab.Panel: Represents a tabbed container
Ext.grid.Panel: Represents a grid
Presenter: Gourav Singh, Mindfire Solutions
Ext JS Layouts
 Auto Layout: This layout manager automatically renders the components in a container.
 Absolute Layout: This is the simplest layout in which we can place the component using x, y
coordinate values in the container.
 Fit Layout: The fit layout arranges the contents of the container to occupy the space completely. It fits
the items to the container’s size. Fit layout is usually used on containers that have a single item.
 Anchor Layout: The anchor layout manager arranges the items of a container relative to the size of
the container. Whenever the container is resized, the anchor layout manager rearranges the items
relative to the new size of the container.
 Box Layout: Box layout is subdivided into two types, Vbox and Hbox.
 Accordion Layout: Accordion layout is an extension of VBox layout. It arranges a set of panels
vertically with collapse and expandable features.
 Table Layout: The Table layout is similar to a HTML table element.
 Column Layout: Column layout arranges the container in separate columns starting from left to right
with items that uses column layout is configured with a columnWidth( % or value) attribute.
 Border Layout: Using Border Layout we can design a master layout with regions like header, footer,
and menus.
 Card Layout: In card layout the components are placed one after the other along the z-index.
Question and
Answer
Presenter: Gourav Singh, Mindfire Solutions
Thank you
Presenter: Gourav Singh, Mindfire Solutions
Reference Link: http://docs.sencha.com/extjs/4.2.2/

More Related Content

What's hot

JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done RightMariusz Nowak
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy stepsprince Loffar
 
Jquery- One slide completing all JQuery
Jquery- One slide completing all JQueryJquery- One slide completing all JQuery
Jquery- One slide completing all JQueryKnoldus Inc.
 
Dart for Java Developers
Dart for Java DevelopersDart for Java Developers
Dart for Java DevelopersYakov Fain
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiRan Mizrahi
 
Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...
Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...
Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...Irfan Maulana
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorialDoeun KOCH
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaRainer Stropek
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJWORKS powered by Ordina
 
Tellurium 0.7.0 presentation
Tellurium 0.7.0 presentationTellurium 0.7.0 presentation
Tellurium 0.7.0 presentationJohn.Jian.Fang
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End DevelopmentWalid Ashraf
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 
Developing components and extensions for ext js
Developing components and extensions for ext jsDeveloping components and extensions for ext js
Developing components and extensions for ext jsMats Bryntse
 

What's hot (20)

JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done Right
 
Learn javascript easy steps
Learn javascript easy stepsLearn javascript easy steps
Learn javascript easy steps
 
Spring boot
Spring bootSpring boot
Spring boot
 
Jquery- One slide completing all JQuery
Jquery- One slide completing all JQueryJquery- One slide completing all JQuery
Jquery- One slide completing all JQuery
 
Dart for Java Developers
Dart for Java DevelopersDart for Java Developers
Dart for Java Developers
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...
Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...
Sencha ExtJs Learning Part 1 - Layout And Container in Sencha ExtJs - By Irfa...
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
Java
Java Java
Java
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA Austria
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
 
Tellurium 0.7.0 presentation
Tellurium 0.7.0 presentationTellurium 0.7.0 presentation
Tellurium 0.7.0 presentation
 
Patterns In-Javascript
Patterns In-JavascriptPatterns In-Javascript
Patterns In-Javascript
 
Advance Java
Advance JavaAdvance Java
Advance Java
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End Development
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
 
Developing components and extensions for ext js
Developing components and extensions for ext jsDeveloping components and extensions for ext js
Developing components and extensions for ext js
 
G pars
G parsG pars
G pars
 
Day 5
Day 5Day 5
Day 5
 

Similar to ExtJs Basic Part-1

Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial EnAnkur Dongre
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial EnAnkur Dongre
 
Hands On Intro to Node.js
Hands On Intro to Node.jsHands On Intro to Node.js
Hands On Intro to Node.jsChris Cowan
 
Creating A Language Editor Using Dltk
Creating A Language Editor Using DltkCreating A Language Editor Using Dltk
Creating A Language Editor Using DltkKaniska Mandal
 
Java programming basics
Java programming basicsJava programming basics
Java programming basicsHamid Ghorbani
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JSIvano Malavolta
 
Extension Javascript
Extension JavascriptExtension Javascript
Extension JavascriptYatin Gupta
 
SenchaCon 2010: Developing components and extensions for ext js
SenchaCon 2010: Developing components and extensions for ext jsSenchaCon 2010: Developing components and extensions for ext js
SenchaCon 2010: Developing components and extensions for ext jsMats Bryntse
 
Introduction to ExtJS lesson 01 Part two
Introduction to ExtJS lesson 01 Part twoIntroduction to ExtJS lesson 01 Part two
Introduction to ExtJS lesson 01 Part twoArun Prasad
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesDurgesh Singh
 
Yii in action
Yii in actionYii in action
Yii in actionKeaNy Chu
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
Learn react by Etietop Demas
Learn react by Etietop DemasLearn react by Etietop Demas
Learn react by Etietop DemasEtietop Demas
 
Advance java kvr -satya
Advance java  kvr -satyaAdvance java  kvr -satya
Advance java kvr -satyaSatya Johnny
 

Similar to ExtJs Basic Part-1 (20)

Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
 
Requiring your own files.pptx
Requiring your own files.pptxRequiring your own files.pptx
Requiring your own files.pptx
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 
Hands On Intro to Node.js
Hands On Intro to Node.jsHands On Intro to Node.js
Hands On Intro to Node.js
 
Creating A Language Editor Using Dltk
Creating A Language Editor Using DltkCreating A Language Editor Using Dltk
Creating A Language Editor Using Dltk
 
Java programming basics
Java programming basicsJava programming basics
Java programming basics
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS
 
backend
backendbackend
backend
 
backend
backendbackend
backend
 
Extension Javascript
Extension JavascriptExtension Javascript
Extension Javascript
 
SenchaCon 2010: Developing components and extensions for ext js
SenchaCon 2010: Developing components and extensions for ext jsSenchaCon 2010: Developing components and extensions for ext js
SenchaCon 2010: Developing components and extensions for ext js
 
Introduction to ExtJS lesson 01 Part two
Introduction to ExtJS lesson 01 Part twoIntroduction to ExtJS lesson 01 Part two
Introduction to ExtJS lesson 01 Part two
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modules
 
Yii in action
Yii in actionYii in action
Yii in action
 
ECMAScript 2015
ECMAScript 2015ECMAScript 2015
ECMAScript 2015
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
Learn react by Etietop Demas
Learn react by Etietop DemasLearn react by Etietop Demas
Learn react by Etietop Demas
 
Adv kvr -satya
Adv  kvr -satyaAdv  kvr -satya
Adv kvr -satya
 
Advance java kvr -satya
Advance java  kvr -satyaAdvance java  kvr -satya
Advance java kvr -satya
 

More from Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 
Angular In Depth
Angular In DepthAngular In Depth
Angular In Depth
 

Recently uploaded

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 

Recently uploaded (20)

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

ExtJs Basic Part-1

  • 1. Presenter: Gourav Singh, Mindfire Solutions Date: 04/05/2015 Basic of Ext JS Framework
  • 2. Presenter: Gourav Singh, Mindfire Solutions Agenda  Why Ext JS?  Overview of Ext JS API  Themes and Styling in Ext JS  Understanding Ext JS API  Ext JS Component Lifecycle  Ext JS Components and Events  Ext JS Layouts
  • 3. Presenter: Gourav Singh, Mindfire Solutions Why Ext JS?  Object-Oriented flavor  Rich UI controls  Support for HTML 5  MVC architecture  Themes and Styling  Documentation  Moving to the mobile version
  • 4. Presenter: Gourav Singh, Mindfire Solutions Overview of Ext JS Framework  The resources folder contains the standard set of themes that you can use in your application.  The src folder contains the entire API organized into numerous JavaScript files.  The docs folder contains the API documentation and guides.  The ext.js file contains the core API.  The ext-all.js file contains the complete API in a compressed or minified format.  The ext-all-dev.js contains the complete API with comments.  The ext-all-debug.js contains the complete API with console warnings. This file is meant to be used for development.  The ext-all-debug-w-comments.js contains the complete API with comments and console warnings. This file is meant to be used for development.
  • 5. Presenter: Gourav Singh, Mindfire Solutions Themes and Styling in Ext JS  The following css file needs to be included. Ext JS/resources/css/ext-all.css  Three themes included in Ext JS4 • Classic (ext-all-classic.css) • Grey (ext-all-gray.css) • Neptune (ext-all-neptune.css) • Crisp (Ext JS 5) <head> <link href="extjs/resources/css/ext-all-grey.css" rel="stylesheet" type="text/css" /> <script src="extjs/ext-all.js" type="text/javascript"></script> </head>
  • 6.  The Ext JS API is grouped into packages like those in Java. Every package contains a collection of classes, whose names begin with the letters Ext. The general format of any class name is: Ext.packageName.optionalSubPackageName.ClassName Ex: Ext.chart.series.Pie You can define a new class in Ext JS using the Ext.define method. Ext.define(“MFS.seminar.extjs.Session",{}); Create an object of the class with Ext.create method. var session1 = Ext.create(“Mfs.seminar.extjs.Session"); Or var session1 = new Mfs.seminar.extjs.Session();  The Ext.create("classname") method dynamically loads all the JavaScript files that the classname is dependent on before creating an instance, whereas this is not possible when you use the new keyword. Understanding Ext JS API Presenter: Gourav Singh, Mindfire Solutions
  • 7.  Constructor is the first function that’s called when an object is created. You can define constructors in our classes using the special property constructor. Ext.define(“Mfs.seminar.extjs.Session",{ constructor : function(){ console.log("Book created"); } }); Ext.create(“Mfs.seminar.extjs.Session"); Constructor Presenter: Gourav Singh, Mindfire Solutions
  • 8. Ext.define("Mfs.seminar.extjs.Session",{ title : "", price : -1, constructor : function(title,price){ this.title = title; this.price = price; } }); var session1 = Ext.create("Mfs.seminar.extjs.Session",“Test",16.00); console.log(session1.title); console.log(session1.price); Property Presenter: Gourav Singh, Mindfire Solutions
  • 9.  Ext JS provides a config section for every class where you can list the attributes of the class with default values.  The object can be created by initializing the attributes in which you are interested. Ext.define("Mfs.seminar.extjs.Book",{ config : { title : "", price : -1, authors: [] }, constructor : function(cfg){ this.initConfig(cfg); } });  The variables declared in the config section have the getter/setter methods generated automatically.  The config generates an apply method for every attribute automatically as well. The apply method is called internally by the setter method. Config Presenter: Gourav Singh, Mindfire Solutions
  • 10.  You can define custom methods in classes as shown below. Ext.define("Mfs.seminar.extjs.Book",{ config : { title : "", price: 0 }, constructor : function(cfg){ this.initConfig(cfg); }, read: function(){ console.log("Reading " + this.getTitle()); } }); var xml = Ext.create("Mfs.seminar.extjs.Book",{ title : "XML", price:12.00 }); xml.read(); //Prints Reading XML Methods Presenter: Gourav Singh, Mindfire Solutions
  • 11.  Ext JS provides a statics property where you can list static variables and methods. The static members can be accessed using the class name, as in OO languages. Ext.define("Mfs.seminar.extjs.Book",{ statics : { numberOfBooks: 0, getNumberOfBooks: function(){ return this.numberOfBooks; } }, constructor : function(){ this.statics().numberOfBooks++; } }); Ext.create("Mfs.seminar.extjs.Book"); Ext.create("Mfs.seminar.extjs.Book"); console.log(Mfs.seminar.extjs.Book.getNumberOfBooks()); Static Members Presenter: Gourav Singh, Mindfire Solutions
  • 12.  We have an extend keyword that can be used to inherit a class in Ext JS 4. Ext.define(“Mfs.seminar.extjs.Employee",{ config : { employeeid : "", name : "", salary : 0 }, constructor : function(cfg){ this.initConfig(cfg); }, work : function(){ console.log(this.getName() + " is working"); } }); Ext.define("Mfs.seminar.extjs.Developer",{ extend : "Mfs.seminar.extjs.Employee", config : { Level : 1 } }); Inheritance Presenter: Gourav Singh, Mindfire Solutions
  • 13.  Mixins help you to mix the behavior of different classes into your class. Your class can have the functionalities of any number of classes mixed together. It’s somewhat similar to interfaces in Java where a class can implement any number of interfaces. Ext.define("Aquatic",{ swim : function(){ console.log("Swimming"); } }); Ext.define("Terrestrial",{ walk : function(){ console.log("Walking"); } }); Ext.define("Reptile",{ mixins : ["Aquatic","Terrestrial"] }); var reptile = Ext.create("Reptile"); reptile.swim(); reptile.walk(); Mixins Presenter: Gourav Singh, Mindfire Solutions
  • 14.  You can define an alias name for the classes. The alias name is mainly used when you create custom components.  You can use the alias property in the definition of the class as shown below. Ext.define("Mfs.seminar.extjs.Book", { alias : "Book", }); Ext.create("Book");  There are certain conventions involved in creating these alias names. For example, alias names for custom components begin with the prefix widget, whereas alias names for custom proxy classes begin with proxy. Alias Presenter: Gourav Singh, Mindfire Solutions
  • 15.  Ext JS 4 provides a way to create singleton classes. Singleton is a popular design pattern in OO languages where a class configured to be singleton has only one instance throughout the application. Ext.define(“Mfs.seminar.extjs.Company", { singleton : true, config: { title: “Mindfire Solutions", }, getNumberOfEmployees: function () { return 700; } }); console.log(Mfs.seminar.extjs.Company.title); console.log(Mfs.seminar.extjs.Company.getNumberOfEmployees()); Singleton Presenter: Gourav Singh, Mindfire Solutions
  • 16. Presenter: Gourav Singh, Mindfire Solutions Ext JS Component Lifecycle  Initialization • The config object is applied • The base Component events are created • The component is registered in ComponentMgr • The initComponent method is called • Plugins are loaded (if applicable) • State is initialized (if applicable) • The component is rendered (if applicable)  Rendering • The beforerender event is fired • The container is set • The onRender method is called • Custom class and/or style applied • The render event is fired • The afterRender method is called  Destruction • The beforedestroy event is fired • The beforeDestroy method is called • Element and its listeners are removed • The onDestroy method is called • Component is unregistered from ComponentMgr • The destroy event is fired • Event listeners on the Component are removed
  • 17. Presenter: Gourav Singh, Mindfire Solutions Ext JS Components and Events  Ext.Component: It serves as the base class for all the UI components. Ext.create("Ext.Component", { html: "Raw Component", renderTo : Ext.getBody() }); The above code displays a text Raw Component in the page. It generates the following HTML snippet. <div id="component-1099 class="x-component x-component-default">Raw Component</div>
  • 18. Presenter: Gourav Singh, Mindfire Solutions Ext JS Components and Events  Ext.container.Container: Ext.container.Container class is the base class for all the container-based components in Ext JS . Ext.create("Ext.container.Container", { html : "Raw Container", renderTo: Ext.getBody() }); The above code displays a text Raw Component in the page. It generates the following HTML snippet. <div id="container-1009" class="x-container x-container-default">Raw Container <div id="container-1009-clearEl" class="x-clear" role="presentation"></div> </div>
  • 19. Presenter: Gourav Singh, Mindfire Solutions Ext JS Container Controls Ext.panel.Panel: Ext.panel.Panel with the xtype ‘panel' is the root container class for several container classes. It’s probably the most commonly used container class. Ext.create("Ext.panel.Panel",{ title : "Sample Panel", items : [ ... ] }); Ext.panel.Panel is inherited by a number of classes shown here. Ext.form.Panel: Represents a form Ext.menu.Menu: Represents a menu Ext.window.Window: Represents a floatable, draggable window component Ext.tab.Panel: Represents a tabbed container Ext.grid.Panel: Represents a grid
  • 20. Presenter: Gourav Singh, Mindfire Solutions Ext JS Layouts  Auto Layout: This layout manager automatically renders the components in a container.  Absolute Layout: This is the simplest layout in which we can place the component using x, y coordinate values in the container.  Fit Layout: The fit layout arranges the contents of the container to occupy the space completely. It fits the items to the container’s size. Fit layout is usually used on containers that have a single item.  Anchor Layout: The anchor layout manager arranges the items of a container relative to the size of the container. Whenever the container is resized, the anchor layout manager rearranges the items relative to the new size of the container.  Box Layout: Box layout is subdivided into two types, Vbox and Hbox.  Accordion Layout: Accordion layout is an extension of VBox layout. It arranges a set of panels vertically with collapse and expandable features.  Table Layout: The Table layout is similar to a HTML table element.  Column Layout: Column layout arranges the container in separate columns starting from left to right with items that uses column layout is configured with a columnWidth( % or value) attribute.  Border Layout: Using Border Layout we can design a master layout with regions like header, footer, and menus.  Card Layout: In card layout the components are placed one after the other along the z-index.
  • 21. Question and Answer Presenter: Gourav Singh, Mindfire Solutions
  • 22. Thank you Presenter: Gourav Singh, Mindfire Solutions Reference Link: http://docs.sencha.com/extjs/4.2.2/