SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Ext JS
Attune UniversityAttune University
What is Ext Js?
• Ext JS is a JavaScript library forExt JS is a JavaScript library for
building Rich Internet Applicationsbuilding Rich Internet Applications
• If you need complex components toIf you need complex components to
manage your information then Ext ismanage your information then Ext is
your best option your best option 
2
From Where You Can Download?
• The first thing we should do is download the frameworkThe first thing we should do is download the framework
from the official website,from the official website,
http://www.sencha.com/products/extjs/http://www.sencha.com/products/extjs/
• If you want to use it online without downloading wholeIf you want to use it online without downloading whole
library you need following two fileslibrary you need following two files
• The CSS file:The CSS file:
http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext-http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext-
all.cssall.css
• The JavaScript file: The JavaScript file: 
http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.jshttp://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js
3
Supports Major Browser
• Ext JS supports all major web browsersExt JS supports all major web browsers
including: including: 
• Internet Explorer 6+Internet Explorer 6+
• Firefox 3.6+ Firefox 3.6+ 
•   Safari 3+X Safari 3+X 
• Chrome 6+ TJSChrome 6+ TJS
• Opera 10.5+Opera 10.5+
4
MVC Application Architecture
• ModelModel
Model is a collection of fields and their data. Models knowModel is a collection of fields and their data. Models know
how to persist themselves through the data package.how to persist themselves through the data package.
• ViewView
View is any type of component - grids, trees and panels areView is any type of component - grids, trees and panels are
all views.all views.
• ControllersControllers
Controllers are special places to put all of the code thatControllers are special places to put all of the code that
makes your app work - whether that's rendering views,makes your app work - whether that's rendering views,
instantiating Models, or any other app logic.instantiating Models, or any other app logic.
5
Ext Js File Structure 6
Let's understand how it works
We have taken example of employee details, we want to seeWe have taken example of employee details, we want to see
list of employee in the grid panellist of employee in the grid panel
So we have app folder, inside app folder we have four moreSo we have app folder, inside app folder we have four more
folders i.e. model, view, controller and store and each folderfolders i.e. model, view, controller and store and each folder
contain one .js filecontain one .js file
Model folderModel folder
we have Employee.js which define model of employee withwe have Employee.js which define model of employee with
employee's properties like employee id, name, salary etc..employee's properties like employee id, name, salary etc..
View folderView folder
we have UserList.js this is view so we define user interfacewe have UserList.js this is view so we define user interface
here. So we create grid which will show list of employees.here. So we create grid which will show list of employees.
Store folderStore folder
we have created a file EmployeeService.js this will fetch allwe have created a file EmployeeService.js this will fetch all
the employee details we have stored in employeeData.jsonthe employee details we have stored in employeeData.json
file under data folder according to model Employee.jsfile under data folder according to model Employee.js
7
Cont... 8
• Controller folder:Controller folder:
Now we have created a grid panel which will show a list ofNow we have created a grid panel which will show a list of
employees, but what to do when user select row in grid, weemployees, but what to do when user select row in grid, we
want to do some action this all event handles here inwant to do some action this all event handles here in
EmpController.jsEmpController.js
• app.js:app.js:
This is file here we create detail about application and we haveThis is file here we create detail about application and we have
launch function which will launch our applicationlaunch function which will launch our application
• Index.html:Index.html:
Finally we have our html file i.e index.html in which we includeFinally we have our html file i.e index.html in which we include
our library ext-all.js , css file i.e. ext-all.css and app.js fileour library ext-all.js , css file i.e. ext-all.css and app.js file
and run this file on server to display resultand run this file on server to display result
• This is how the file structure of Ext Js works and follows MVCThis is how the file structure of Ext Js works and follows MVC
architecturearchitecture
Syntax 9
• Class DefinationClass Defination
Ext.define ('MyClass',Ext.define ('MyClass',
{{
prop1: val1,prop1: val1,
Prop2:val2Prop2:val2
......
});});
• InheritanceInheritance
Ext.define ('MyClass',Ext.define ('MyClass',
{extend: 'ParentClass',{extend: 'ParentClass',
……
});});
• Create ObjectCreate Object
var win = Ext.create ('Ext.window.Window', {id: 'win1'});var win = Ext.create ('Ext.window.Window', {id: 'win1'});
 GridsGrids
 ChartsCharts
 TabsTabs
 WindowsWindows
 TreesTrees
 DrawingDrawing
 Drag&DropDrag&Drop
 QuickTipsQuickTips
 ToolbarsToolbars
 MenusMenus
 ComboBoxComboBox
 Data ViewData View
 FormsForms
 Text EditorsText Editors
 PanelsPanels
 ButtonsButtons
 SliderSlider
Support Many Widget 10
Grids 11
Charts 12
Drag and Drop 13
Buttons, Toolbars & Menus 14
Tree 15
Forms 16
Example
Let's create one simple example which will show a panel with some form fields
we are going write a code in html file for this example but it is good to follow
MVCarchitecture when we create a big application
• Step1 :
<html>
<head>
<title>My first Example</title>
<!-- importing javascript library here -->
<script type="text/javascript" src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js"
></script>
<!-- importing css file here -->
<link type = "text/css" rel="stylesheet" href="http://cdn.sencha.io/ext-4.1.0-
gpl/resources/css/ext-all.css"></link>
<script type="text/javascript">
//we write our code here
</script>
</head>
<body></body>
</html>
17
Cont…
• Step2 : we have created an html file now we are write all code in script tag
now we create a panel
<script>
Ext.onReady(function() // this will call after scripts are loaded
{
Ext.create("Ext.form.Panel" , // creating an instance of panel
{
title : "My First Panel", // title of panel
width : 700, // width of panel
height : 400, // height of panel
renderTo : Ext.getBody() //it will render panel on body of html
file
});
});
</script>
18
Cont…
• when you look in to browser it will look likewhen you look in to browser it will look like
19
Cont…
• Step3 : we now start insert items in panel
Ext.create("Ext.form.Panel",
{
title : "My First Panel",
width : 700,
height : 400,
renderTo:Ext.getBody() ,
layout : 'border', // we have set the border layout of panel which have east, west, south and north regions
items :[{
xtype : 'panel', // we add one more child panel
height : 400,
flex : 1, //it is take one part of parent(25%) width
region : 'west', //we have put this on west region
collapsible : true, // we make this panel collapsible
split : true // we can change width of panel
},
{
xtype : 'panel', // we create other child panel
height : 400,
flex : 3,// it uses 3part of parent width(75%) ratio
region : 'center', // we put this panel on center region
}]
});
20
Cont…
• when you look in to browser it will look likewhen you look in to browser it will look like
21
Cont…
• Step4 : Now we add form items in the second child panel.
{
xtype : 'panel',
height : 400,
flex : 3,
region : 'center',
bodyPadding : 10,
buttonAlign : 'center', // form buttons align to the center
items:[
{ xtype : 'textfield', // we have added textfield
fieldLabel : 'First Name', // name on left side of text field
name : 'fname', // this is require when we control this textfield
emptyText : "First Name", // shows when textfield is empty
allowBlank : false // validation it must require
},
{ xtype : 'textfield',
fieldLabel : 'Last Name',
name : 'lname',
allowBlank : false
},
22
Cont…
{ xtype : 'datefield', // we have added datefield for enter date
fieldLabel : 'Birthdate',
name : 'bdate',
format : 'd/m/Y', // format we have define
allowBlank : false ,
maxValue : new Date()// maximum birthday must be today
},
{ xtype : 'textfield',
fieldLabel : 'Email Id',
name : 'email',
allowBlank : false,
vtype : 'email‘// email type validation for user@example.com
} ]
}
23
Cont…
• Step5 :Now we add submit button in the second child panel for submit the data.
{
xtype : 'panel',
height : 400,
flex : 3,
region : 'center',
bodyPadding : 10,
buttonAlign : 'center', // form buttons align to the center
Items:[
...
...
],
buttons: [
{
text : "Submit",
handler : function() // this fuction executed on click of button
{
var form = this.up('form').getForm();
if(form.isValid())
{
Ext.Msg.alert("Great", "You Have Done A Great Job!"); //display message
}
else
{
Ext.Msg.alert("OOps", "You Have Made A Mistake!");
}
}
}
]
}
24
Cont…
• And we got following screen shotsAnd we got following screen shots
1)1)
25
Cont…
2)2)
26
Cont…
3)3)
27
Contact Us 28
Learn more about EXT JSLearn more about EXT JS
Click
Thanks,
Website: www.attuneuniversity.com
Email: contact@attuneuniversity.com
Phone: USA - +1-732-703-9847
India - +91-90999 12995
Singapore - +65-3158-5078

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Kürzlich hochgeladen (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Empfohlen

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Empfohlen (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Getting Started With Ext Js

  • 2. What is Ext Js? • Ext JS is a JavaScript library forExt JS is a JavaScript library for building Rich Internet Applicationsbuilding Rich Internet Applications • If you need complex components toIf you need complex components to manage your information then Ext ismanage your information then Ext is your best option your best option  2
  • 3. From Where You Can Download? • The first thing we should do is download the frameworkThe first thing we should do is download the framework from the official website,from the official website, http://www.sencha.com/products/extjs/http://www.sencha.com/products/extjs/ • If you want to use it online without downloading wholeIf you want to use it online without downloading whole library you need following two fileslibrary you need following two files • The CSS file:The CSS file: http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext-http://cdn.sencha.io/ext-4.1.0-gpl/resources/css/ext- all.cssall.css • The JavaScript file: The JavaScript file:  http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.jshttp://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js 3
  • 4. Supports Major Browser • Ext JS supports all major web browsersExt JS supports all major web browsers including: including:  • Internet Explorer 6+Internet Explorer 6+ • Firefox 3.6+ Firefox 3.6+  •   Safari 3+X Safari 3+X  • Chrome 6+ TJSChrome 6+ TJS • Opera 10.5+Opera 10.5+ 4
  • 5. MVC Application Architecture • ModelModel Model is a collection of fields and their data. Models knowModel is a collection of fields and their data. Models know how to persist themselves through the data package.how to persist themselves through the data package. • ViewView View is any type of component - grids, trees and panels areView is any type of component - grids, trees and panels are all views.all views. • ControllersControllers Controllers are special places to put all of the code thatControllers are special places to put all of the code that makes your app work - whether that's rendering views,makes your app work - whether that's rendering views, instantiating Models, or any other app logic.instantiating Models, or any other app logic. 5
  • 6. Ext Js File Structure 6
  • 7. Let's understand how it works We have taken example of employee details, we want to seeWe have taken example of employee details, we want to see list of employee in the grid panellist of employee in the grid panel So we have app folder, inside app folder we have four moreSo we have app folder, inside app folder we have four more folders i.e. model, view, controller and store and each folderfolders i.e. model, view, controller and store and each folder contain one .js filecontain one .js file Model folderModel folder we have Employee.js which define model of employee withwe have Employee.js which define model of employee with employee's properties like employee id, name, salary etc..employee's properties like employee id, name, salary etc.. View folderView folder we have UserList.js this is view so we define user interfacewe have UserList.js this is view so we define user interface here. So we create grid which will show list of employees.here. So we create grid which will show list of employees. Store folderStore folder we have created a file EmployeeService.js this will fetch allwe have created a file EmployeeService.js this will fetch all the employee details we have stored in employeeData.jsonthe employee details we have stored in employeeData.json file under data folder according to model Employee.jsfile under data folder according to model Employee.js 7
  • 8. Cont... 8 • Controller folder:Controller folder: Now we have created a grid panel which will show a list ofNow we have created a grid panel which will show a list of employees, but what to do when user select row in grid, weemployees, but what to do when user select row in grid, we want to do some action this all event handles here inwant to do some action this all event handles here in EmpController.jsEmpController.js • app.js:app.js: This is file here we create detail about application and we haveThis is file here we create detail about application and we have launch function which will launch our applicationlaunch function which will launch our application • Index.html:Index.html: Finally we have our html file i.e index.html in which we includeFinally we have our html file i.e index.html in which we include our library ext-all.js , css file i.e. ext-all.css and app.js fileour library ext-all.js , css file i.e. ext-all.css and app.js file and run this file on server to display resultand run this file on server to display result • This is how the file structure of Ext Js works and follows MVCThis is how the file structure of Ext Js works and follows MVC architecturearchitecture
  • 9. Syntax 9 • Class DefinationClass Defination Ext.define ('MyClass',Ext.define ('MyClass', {{ prop1: val1,prop1: val1, Prop2:val2Prop2:val2 ...... });}); • InheritanceInheritance Ext.define ('MyClass',Ext.define ('MyClass', {extend: 'ParentClass',{extend: 'ParentClass', …… });}); • Create ObjectCreate Object var win = Ext.create ('Ext.window.Window', {id: 'win1'});var win = Ext.create ('Ext.window.Window', {id: 'win1'});
  • 10.  GridsGrids  ChartsCharts  TabsTabs  WindowsWindows  TreesTrees  DrawingDrawing  Drag&DropDrag&Drop  QuickTipsQuickTips  ToolbarsToolbars  MenusMenus  ComboBoxComboBox  Data ViewData View  FormsForms  Text EditorsText Editors  PanelsPanels  ButtonsButtons  SliderSlider Support Many Widget 10
  • 17. Example Let's create one simple example which will show a panel with some form fields we are going write a code in html file for this example but it is good to follow MVCarchitecture when we create a big application • Step1 : <html> <head> <title>My first Example</title> <!-- importing javascript library here --> <script type="text/javascript" src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js" ></script> <!-- importing css file here --> <link type = "text/css" rel="stylesheet" href="http://cdn.sencha.io/ext-4.1.0- gpl/resources/css/ext-all.css"></link> <script type="text/javascript"> //we write our code here </script> </head> <body></body> </html> 17
  • 18. Cont… • Step2 : we have created an html file now we are write all code in script tag now we create a panel <script> Ext.onReady(function() // this will call after scripts are loaded { Ext.create("Ext.form.Panel" , // creating an instance of panel { title : "My First Panel", // title of panel width : 700, // width of panel height : 400, // height of panel renderTo : Ext.getBody() //it will render panel on body of html file }); }); </script> 18
  • 19. Cont… • when you look in to browser it will look likewhen you look in to browser it will look like 19
  • 20. Cont… • Step3 : we now start insert items in panel Ext.create("Ext.form.Panel", { title : "My First Panel", width : 700, height : 400, renderTo:Ext.getBody() , layout : 'border', // we have set the border layout of panel which have east, west, south and north regions items :[{ xtype : 'panel', // we add one more child panel height : 400, flex : 1, //it is take one part of parent(25%) width region : 'west', //we have put this on west region collapsible : true, // we make this panel collapsible split : true // we can change width of panel }, { xtype : 'panel', // we create other child panel height : 400, flex : 3,// it uses 3part of parent width(75%) ratio region : 'center', // we put this panel on center region }] }); 20
  • 21. Cont… • when you look in to browser it will look likewhen you look in to browser it will look like 21
  • 22. Cont… • Step4 : Now we add form items in the second child panel. { xtype : 'panel', height : 400, flex : 3, region : 'center', bodyPadding : 10, buttonAlign : 'center', // form buttons align to the center items:[ { xtype : 'textfield', // we have added textfield fieldLabel : 'First Name', // name on left side of text field name : 'fname', // this is require when we control this textfield emptyText : "First Name", // shows when textfield is empty allowBlank : false // validation it must require }, { xtype : 'textfield', fieldLabel : 'Last Name', name : 'lname', allowBlank : false }, 22
  • 23. Cont… { xtype : 'datefield', // we have added datefield for enter date fieldLabel : 'Birthdate', name : 'bdate', format : 'd/m/Y', // format we have define allowBlank : false , maxValue : new Date()// maximum birthday must be today }, { xtype : 'textfield', fieldLabel : 'Email Id', name : 'email', allowBlank : false, vtype : 'email‘// email type validation for user@example.com } ] } 23
  • 24. Cont… • Step5 :Now we add submit button in the second child panel for submit the data. { xtype : 'panel', height : 400, flex : 3, region : 'center', bodyPadding : 10, buttonAlign : 'center', // form buttons align to the center Items:[ ... ... ], buttons: [ { text : "Submit", handler : function() // this fuction executed on click of button { var form = this.up('form').getForm(); if(form.isValid()) { Ext.Msg.alert("Great", "You Have Done A Great Job!"); //display message } else { Ext.Msg.alert("OOps", "You Have Made A Mistake!"); } } } ] } 24
  • 25. Cont… • And we got following screen shotsAnd we got following screen shots 1)1) 25
  • 28. Contact Us 28 Learn more about EXT JSLearn more about EXT JS Click Thanks, Website: www.attuneuniversity.com Email: contact@attuneuniversity.com Phone: USA - +1-732-703-9847 India - +91-90999 12995 Singapore - +65-3158-5078