SlideShare une entreprise Scribd logo
1  sur  22
Sencha ExtJs Learning[part 1]
Layout and Container in ExtJs
By : Irfan
Maulana
About Layouting in ExtJs
The layout system is one of the most
powerful parts of Ext JS. It handles the
sizing and positioning of
every Component in your application.
Container hierarchy
The most commonly used Container is Panel.
Or you can use container sometimes.
Which Container should I used ?
Published in https://mazipanneh.wordpress.com/2015/05/05/extjs-different-panel-vs-container/
Ext.panel.Panel is extends of container.
Panel more complex and heavier than container.
Container Layouts
Every container has a layout that manages the sizing and positioning of
its child Components
You must specify layout for all Container.
But default layout for all Containers is Auto Layout.
AutoLayout provides only a passthrough of any layout calls to any child
containers.
Component Layouts
Just like a Container’s Layout defines how a Container sizes and positions
its Component items, a Component also has a Layout which defines how it
sizes and positions its internal child items.
Component layouts are configured using the componentLayout config
option.
Generally, you will not need to use this configuration unless you are
writing a custom Component since all of the provided Components come
with their own layout managers.
Most Components use Auto Layout, but more complex Components will
require a custom component layout (for example a Panel that has a header,
footer, and toolbars).
Basic Ext Layout
Absolute
Accordion
Anchor
Border
Card
Column
Fit
Table
Vbox
Hbox
Sample page : http://dev.sencha.com/deploy/ext-4.0.0/examples/layout-browser/layout-
browser.html
Basic Ext Layout - Absolute
This is a simple layout style that allows you to position items within a
container using CSS-style absolute positioning via XY coordinates.
//sample code
layout: 'absolute',
items:[
{
title: 'Panel 1',
x: 50,
y: 50,
html: 'Positioned at x:50, y:50‘
},{
title: 'Panel 2',
x: 125,
y: 125,
html: 'Positioned at x:125, y:125‘
}]
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Absolute
Basic Ext Layout - Accordion
Displays one panel at a time in a stacked layout. No special config properties are
required other than the layout — all panels added to the container will be converted
to accordion panels.
//sample code
layout: 'accordion',
items:[
{
title: 'Panel 1',
html: 'Content'
},{
title: 'Panel 2',
id: 'panel2',
html: 'Content'
}]
// css
#panel2 .x-panel-body {
background:#ffe;
color:#15428B;
}
#panel2 .x-panel-header-text {
color:#555;
}
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Accordion
Basic Ext Layout - Anchor
Provides anchoring of contained items to the container's edges. This type of layout is most
commonly seen within FormPanels (or any container with a FormLayout) where fields are
sized relative to the container without hard-coding their dimensions.
//sample code
layout: 'anchor',
items: [{
title: 'Panel 1',
height: 100,
anchor: '50%'
},{
title: 'Panel 2',
height: 100,
anchor: '-100'
},{
title: 'Panel 3',
anchor: '-10, -262'
}]
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Anchor-cfg-anchor
Basic Ext Layout - Border
This is a multi-pane, application-oriented UI layout style that supports multiple nested
panels, automatic bars between regions and built-in expanding and collapsing of regions.
//sample code
layout:'border',
defaults: {
collapsible: true,
split: true,
bodyStyle: 'padding:15px'
},
items: [{
title: 'Footer',
region: 'south',
height: 150,
minSize: 75,
maxSize: 250,
cmargins: '5 0 0 0‘
},{
title: 'Navigation',
region:'west',
margins: '5 0 0 0',
cmargins: '5 5 0 0',
width: 175,
minSize: 100,
maxSize: 250
},{
title: 'Main Content',
collapsible: false,
region:'center',
margins: '5 0 0 0'http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Border
Basic Ext Layout - Border
Region of Border Layout :
North : Positions component at top.
South : Positions component at bottom.
East : Positions component at right.
West : Positions component at left.
Center : Positions component at the remaining space.
There must be a component with region: "center" in every
border layout.
Basic Ext Layout - Card
This layout manages multiple child Components, each fitted to the Container, where only a
single child Component can be visible at any given time.
This layout style is most commonly used for wizards, tab implementations, etc.
//sample code
layout:'card',
activeItem: 0, // index or id
bbar: ['->',
{
id: 'card-prev',
text: '« Previous'
},{
id: 'card-next',
text: 'Next »‘
}],
items: [
{
id: 'card-0',
html: 'Step 1‘
},{
id: 'card-1',
html: 'Step 2'
},{
id: 'card-2',
html: 'Step 3'
}]http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Card
Basic Ext Layout - Column
This is a useful layout style when you need multiple columns that can have varying
content height.
//sample code
layout:'column',
items: [{
title: 'Width = 25%',
columnWidth: .25,
html: 'Content'
},{
title: 'Width = 75%',
columnWidth: .75,
html: 'Content'
},{
title: 'Width = 250px',
width: 250,
html: 'Content'
}]
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Column
Basic Ext Layout - Fit
A very simple layout that simply fills the container with a
single panel.
This is usually the best default layout choice when you
have no other specific layout requirements.
//sample code
layout:'fit',
items: {
title: 'Fit Panel',
html: 'Content',
border: false
}
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Fit
Basic Ext Layout - Table
Outputs a standard HTML table as the layout container.
This is sometimes useful for complex layouts where cell spanning is required, or when you
want to allow the contents to flow naturally based on standard browser table layout rules.
//sample code
layout: {
type: 'table',
columns: 4
},
items: [
{html:'1,1',rowspan:3},
{html:'1,2'},
{html:'1,3'},
{html:'2,2',colspan:2},
{html:'3,2'},
{html:'3,3'}
]
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Table
Basic Ext Layout - Vbox
A layout that arranges items vertically across a Container. This layout optionally divides
available vertical space between child items containing a numeric flex configuration.
//sample code
layout: {
type: 'vbox‘,
align : 'stretch',
pack : 'start',
},
items: [
{html:'panel 1', flex:1},
{html:'panel 2', height:150},
{html:'panel 3', flex:2}
]
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.VBox
Basic Ext Layout - Hbox
A layout that arranges items horizontally across a Container. This layout optionally divides
available horizontal space between child items containing a numeric flex configuration.
//sample code
layout: {
type: 'hbox',
pack: 'start',
align: 'stretch'
},
items: [
{html:'panel 1', flex:1},
{html:'panel 2', width:150},
{html:'panel 3', flex:2}
]
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.HBox
vBox – hBox Configuration
Align : Controls how the child
items of the container are
aligned.
Pack : Controls how the child
items of the container are
packed together.
Tips
Because ExtJs's layout is nested, so see the
raw design start from bigger (base)
component.
Exersice
Please make layout for this mockup in ExtJs’s ways.
Thanks for your attention.
Presented by : Irfan Maulana
Contact me on :
Email : mazipanneh@gmail.com
Blog : www.mazipanneh.wordpress.com

Contenu connexe

Tendances

ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asppriya Nithya
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsEPAM Systems
 
Rethinking Best Practices
Rethinking Best PracticesRethinking Best Practices
Rethinking Best Practicesfloydophone
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Frameworkvaluebound
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the WebCodeValue
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action Alex Movila
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETRajkumarsoy
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom ManipulationMohammed Arif
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jestpksjce
 

Tendances (20)

ASP.NET - Life cycle of asp
ASP.NET - Life cycle of aspASP.NET - Life cycle of asp
ASP.NET - Life cycle of asp
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Rethinking Best Practices
Rethinking Best PracticesRethinking Best Practices
Rethinking Best Practices
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
.Net Core
.Net Core.Net Core
.Net Core
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
 
Reactjs
Reactjs Reactjs
Reactjs
 
Vertx
VertxVertx
Vertx
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Web assembly - Future of the Web
Web assembly - Future of the WebWeb assembly - Future of the Web
Web assembly - Future of the Web
 
Workshop 21: React Router
Workshop 21: React RouterWorkshop 21: React Router
Workshop 21: React Router
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
 

En vedette

Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]
Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]
Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]Irfan Maulana
 
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSSPhp Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSSIrfan Maulana
 
CP 值很高的 Gulp
CP 值很高的 GulpCP 值很高的 Gulp
CP 值很高的 GulpYvonne Yu
 
Ext Js introduction and new features in Ext Js 6
Ext Js introduction and new features in Ext Js 6Ext Js introduction and new features in Ext Js 6
Ext Js introduction and new features in Ext Js 6Sushil Shinde
 
Journey To The Front End World - Part2 - The Cosmetic
Journey To The Front End World - Part2 - The  CosmeticJourney To The Front End World - Part2 - The  Cosmetic
Journey To The Front End World - Part2 - The CosmeticIrfan Maulana
 
conjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Clientconjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail ClientThorsten Suckow-Homberg
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionIrfan Maulana
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineIrfan Maulana
 
email clients and webmail (presentation)
email clients and webmail   (presentation)email clients and webmail   (presentation)
email clients and webmail (presentation)kay2
 
Journey To The Front End World - Part1 - The Skeleton
Journey To The Front End World - Part1 - The SkeletonJourney To The Front End World - Part1 - The Skeleton
Journey To The Front End World - Part1 - The SkeletonIrfan Maulana
 

En vedette (13)

Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]
Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]
Sencha ExtJs Learning Part 2 - MVC And MVVM Architecture in ExtJs [ENGLISH]
 
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSSPhp Indonesia x Bliblidotcom - Architecting Scalable CSS
Php Indonesia x Bliblidotcom - Architecting Scalable CSS
 
CP 值很高的 Gulp
CP 值很高的 GulpCP 值很高的 Gulp
CP 值很高的 Gulp
 
Extjs
ExtjsExtjs
Extjs
 
Ext JS Presentation
Ext JS PresentationExt JS Presentation
Ext JS Presentation
 
Ext Js introduction and new features in Ext Js 6
Ext Js introduction and new features in Ext Js 6Ext Js introduction and new features in Ext Js 6
Ext Js introduction and new features in Ext Js 6
 
Ext js 6
Ext js 6Ext js 6
Ext js 6
 
Journey To The Front End World - Part2 - The Cosmetic
Journey To The Front End World - Part2 - The  CosmeticJourney To The Front End World - Part2 - The  Cosmetic
Journey To The Front End World - Part2 - The Cosmetic
 
conjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Clientconjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Client
 
Bliblidotcom - SASS Introduction
Bliblidotcom - SASS IntroductionBliblidotcom - SASS Introduction
Bliblidotcom - SASS Introduction
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The Machine
 
email clients and webmail (presentation)
email clients and webmail   (presentation)email clients and webmail   (presentation)
email clients and webmail (presentation)
 
Journey To The Front End World - Part1 - The Skeleton
Journey To The Front End World - Part1 - The SkeletonJourney To The Front End World - Part1 - The Skeleton
Journey To The Front End World - Part1 - The Skeleton
 

Similaire à ExtJs Layout Guide

CSS Frameworks
CSS FrameworksCSS Frameworks
CSS FrameworksMike Crabb
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good PracticesHernan Mammana
 
Abstract Window Toolkit
Abstract Window ToolkitAbstract Window Toolkit
Abstract Window ToolkitRutvaThakkar1
 
How to Use Tailwind Config to Customize Theme Styles
How to Use Tailwind Config to Customize Theme StylesHow to Use Tailwind Config to Customize Theme Styles
How to Use Tailwind Config to Customize Theme StylesRonDosh
 
[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
 
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
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magentohainutemicute
 
Building Rich Internet Applications with Ext JS
Building Rich Internet Applications  with Ext JSBuilding Rich Internet Applications  with Ext JS
Building Rich Internet Applications with Ext JSMats Bryntse
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentationsasidhar
 
Creative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS BasicsCreative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS BasicsLukas Oppermann
 
Web topic 9 navigation and link
Web topic 9  navigation and linkWeb topic 9  navigation and link
Web topic 9 navigation and linkCK Yang
 
The New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceThe New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceRachel Andrew
 
Java GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdfJava GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdfPBMaverick
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfOrtus Solutions, Corp
 

Similaire à ExtJs Layout Guide (20)

skintutorial
skintutorialskintutorial
skintutorial
 
skintutorial
skintutorialskintutorial
skintutorial
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
 
HTML and CSS.pptx
HTML and CSS.pptxHTML and CSS.pptx
HTML and CSS.pptx
 
Intro to OctoberCMS
Intro to OctoberCMSIntro to OctoberCMS
Intro to OctoberCMS
 
Front End Good Practices
Front End Good PracticesFront End Good Practices
Front End Good Practices
 
Abstract Window Toolkit
Abstract Window ToolkitAbstract Window Toolkit
Abstract Window Toolkit
 
How to Use Tailwind Config to Customize Theme Styles
How to Use Tailwind Config to Customize Theme StylesHow to Use Tailwind Config to Customize Theme Styles
How to Use Tailwind Config to Customize Theme Styles
 
[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
 
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
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 
Building Rich Internet Applications with Ext JS
Building Rich Internet Applications  with Ext JSBuilding Rich Internet Applications  with Ext JS
Building Rich Internet Applications with Ext JS
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
Creative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS BasicsCreative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS Basics
 
Web topic 9 navigation and link
Web topic 9  navigation and linkWeb topic 9  navigation and link
Web topic 9 navigation and link
 
The New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP ConferenceThe New CSS Layout - Dutch PHP Conference
The New CSS Layout - Dutch PHP Conference
 
AWT.pptx
AWT.pptxAWT.pptx
AWT.pptx
 
Java GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdfJava GUI Programming for beginners-graphics.pdf
Java GUI Programming for beginners-graphics.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 

Plus de Irfan Maulana

Modern Web - an Introduction
Modern Web - an IntroductionModern Web - an Introduction
Modern Web - an IntroductionIrfan Maulana
 
Unit Testing for Frontend Code at Blibli.com
Unit Testing for Frontend Code at Blibli.comUnit Testing for Frontend Code at Blibli.com
Unit Testing for Frontend Code at Blibli.comIrfan Maulana
 
Programmer In Startup Era
Programmer In Startup EraProgrammer In Startup Era
Programmer In Startup EraIrfan Maulana
 
Bliblidotcom - Evolusi Frontend Development di Bliblidotcom
Bliblidotcom - Evolusi Frontend Development di BliblidotcomBliblidotcom - Evolusi Frontend Development di Bliblidotcom
Bliblidotcom - Evolusi Frontend Development di BliblidotcomIrfan Maulana
 
Bliblidotcom - Tech In Asia PDC 2017 Takeaway
Bliblidotcom - Tech In Asia PDC 2017 TakeawayBliblidotcom - Tech In Asia PDC 2017 Takeaway
Bliblidotcom - Tech In Asia PDC 2017 TakeawayIrfan Maulana
 
Bliblidotcom - AMP And PWA
Bliblidotcom - AMP And PWABliblidotcom - AMP And PWA
Bliblidotcom - AMP And PWAIrfan Maulana
 
Angular - The Return of The King
Angular - The Return of The KingAngular - The Return of The King
Angular - The Return of The KingIrfan Maulana
 
How to Become Rockstar Programmer
How to Become Rockstar ProgrammerHow to Become Rockstar Programmer
How to Become Rockstar ProgrammerIrfan Maulana
 
Bliblidotcom - AngularJS Introduction
Bliblidotcom - AngularJS IntroductionBliblidotcom - AngularJS Introduction
Bliblidotcom - AngularJS IntroductionIrfan Maulana
 
Bliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSSBliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSSIrfan Maulana
 
PHP Indonesia - Understanding UI UX from Developer Side
PHP Indonesia - Understanding UI UX from Developer SidePHP Indonesia - Understanding UI UX from Developer Side
PHP Indonesia - Understanding UI UX from Developer SideIrfan Maulana
 
JakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From BasicJakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From BasicIrfan Maulana
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentIrfan Maulana
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of JavascriptIrfan Maulana
 
Create Rest API in Nodejs
Create Rest API in Nodejs Create Rest API in Nodejs
Create Rest API in Nodejs Irfan Maulana
 
Irfan Maulana - Career Journey
Irfan Maulana - Career JourneyIrfan Maulana - Career Journey
Irfan Maulana - Career JourneyIrfan Maulana
 

Plus de Irfan Maulana (16)

Modern Web - an Introduction
Modern Web - an IntroductionModern Web - an Introduction
Modern Web - an Introduction
 
Unit Testing for Frontend Code at Blibli.com
Unit Testing for Frontend Code at Blibli.comUnit Testing for Frontend Code at Blibli.com
Unit Testing for Frontend Code at Blibli.com
 
Programmer In Startup Era
Programmer In Startup EraProgrammer In Startup Era
Programmer In Startup Era
 
Bliblidotcom - Evolusi Frontend Development di Bliblidotcom
Bliblidotcom - Evolusi Frontend Development di BliblidotcomBliblidotcom - Evolusi Frontend Development di Bliblidotcom
Bliblidotcom - Evolusi Frontend Development di Bliblidotcom
 
Bliblidotcom - Tech In Asia PDC 2017 Takeaway
Bliblidotcom - Tech In Asia PDC 2017 TakeawayBliblidotcom - Tech In Asia PDC 2017 Takeaway
Bliblidotcom - Tech In Asia PDC 2017 Takeaway
 
Bliblidotcom - AMP And PWA
Bliblidotcom - AMP And PWABliblidotcom - AMP And PWA
Bliblidotcom - AMP And PWA
 
Angular - The Return of The King
Angular - The Return of The KingAngular - The Return of The King
Angular - The Return of The King
 
How to Become Rockstar Programmer
How to Become Rockstar ProgrammerHow to Become Rockstar Programmer
How to Become Rockstar Programmer
 
Bliblidotcom - AngularJS Introduction
Bliblidotcom - AngularJS IntroductionBliblidotcom - AngularJS Introduction
Bliblidotcom - AngularJS Introduction
 
Bliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSSBliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSS
 
PHP Indonesia - Understanding UI UX from Developer Side
PHP Indonesia - Understanding UI UX from Developer SidePHP Indonesia - Understanding UI UX from Developer Side
PHP Indonesia - Understanding UI UX from Developer Side
 
JakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From BasicJakartaJS - How I Learn Javascript From Basic
JakartaJS - How I Learn Javascript From Basic
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
 
Create Rest API in Nodejs
Create Rest API in Nodejs Create Rest API in Nodejs
Create Rest API in Nodejs
 
Irfan Maulana - Career Journey
Irfan Maulana - Career JourneyIrfan Maulana - Career Journey
Irfan Maulana - Career Journey
 

Dernier

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Dernier (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

ExtJs Layout Guide

  • 1. Sencha ExtJs Learning[part 1] Layout and Container in ExtJs By : Irfan Maulana
  • 2. About Layouting in ExtJs The layout system is one of the most powerful parts of Ext JS. It handles the sizing and positioning of every Component in your application.
  • 3. Container hierarchy The most commonly used Container is Panel. Or you can use container sometimes.
  • 4. Which Container should I used ? Published in https://mazipanneh.wordpress.com/2015/05/05/extjs-different-panel-vs-container/ Ext.panel.Panel is extends of container. Panel more complex and heavier than container.
  • 5. Container Layouts Every container has a layout that manages the sizing and positioning of its child Components You must specify layout for all Container. But default layout for all Containers is Auto Layout. AutoLayout provides only a passthrough of any layout calls to any child containers.
  • 6. Component Layouts Just like a Container’s Layout defines how a Container sizes and positions its Component items, a Component also has a Layout which defines how it sizes and positions its internal child items. Component layouts are configured using the componentLayout config option. Generally, you will not need to use this configuration unless you are writing a custom Component since all of the provided Components come with their own layout managers. Most Components use Auto Layout, but more complex Components will require a custom component layout (for example a Panel that has a header, footer, and toolbars).
  • 7. Basic Ext Layout Absolute Accordion Anchor Border Card Column Fit Table Vbox Hbox Sample page : http://dev.sencha.com/deploy/ext-4.0.0/examples/layout-browser/layout- browser.html
  • 8. Basic Ext Layout - Absolute This is a simple layout style that allows you to position items within a container using CSS-style absolute positioning via XY coordinates. //sample code layout: 'absolute', items:[ { title: 'Panel 1', x: 50, y: 50, html: 'Positioned at x:50, y:50‘ },{ title: 'Panel 2', x: 125, y: 125, html: 'Positioned at x:125, y:125‘ }] http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Absolute
  • 9. Basic Ext Layout - Accordion Displays one panel at a time in a stacked layout. No special config properties are required other than the layout — all panels added to the container will be converted to accordion panels. //sample code layout: 'accordion', items:[ { title: 'Panel 1', html: 'Content' },{ title: 'Panel 2', id: 'panel2', html: 'Content' }] // css #panel2 .x-panel-body { background:#ffe; color:#15428B; } #panel2 .x-panel-header-text { color:#555; } http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Accordion
  • 10. Basic Ext Layout - Anchor Provides anchoring of contained items to the container's edges. This type of layout is most commonly seen within FormPanels (or any container with a FormLayout) where fields are sized relative to the container without hard-coding their dimensions. //sample code layout: 'anchor', items: [{ title: 'Panel 1', height: 100, anchor: '50%' },{ title: 'Panel 2', height: 100, anchor: '-100' },{ title: 'Panel 3', anchor: '-10, -262' }] http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Anchor-cfg-anchor
  • 11. Basic Ext Layout - Border This is a multi-pane, application-oriented UI layout style that supports multiple nested panels, automatic bars between regions and built-in expanding and collapsing of regions. //sample code layout:'border', defaults: { collapsible: true, split: true, bodyStyle: 'padding:15px' }, items: [{ title: 'Footer', region: 'south', height: 150, minSize: 75, maxSize: 250, cmargins: '5 0 0 0‘ },{ title: 'Navigation', region:'west', margins: '5 0 0 0', cmargins: '5 5 0 0', width: 175, minSize: 100, maxSize: 250 },{ title: 'Main Content', collapsible: false, region:'center', margins: '5 0 0 0'http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Border
  • 12. Basic Ext Layout - Border Region of Border Layout : North : Positions component at top. South : Positions component at bottom. East : Positions component at right. West : Positions component at left. Center : Positions component at the remaining space. There must be a component with region: "center" in every border layout.
  • 13. Basic Ext Layout - Card This layout manages multiple child Components, each fitted to the Container, where only a single child Component can be visible at any given time. This layout style is most commonly used for wizards, tab implementations, etc. //sample code layout:'card', activeItem: 0, // index or id bbar: ['->', { id: 'card-prev', text: '« Previous' },{ id: 'card-next', text: 'Next »‘ }], items: [ { id: 'card-0', html: 'Step 1‘ },{ id: 'card-1', html: 'Step 2' },{ id: 'card-2', html: 'Step 3' }]http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Card
  • 14. Basic Ext Layout - Column This is a useful layout style when you need multiple columns that can have varying content height. //sample code layout:'column', items: [{ title: 'Width = 25%', columnWidth: .25, html: 'Content' },{ title: 'Width = 75%', columnWidth: .75, html: 'Content' },{ title: 'Width = 250px', width: 250, html: 'Content' }] http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Column
  • 15. Basic Ext Layout - Fit A very simple layout that simply fills the container with a single panel. This is usually the best default layout choice when you have no other specific layout requirements. //sample code layout:'fit', items: { title: 'Fit Panel', html: 'Content', border: false } http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Fit
  • 16. Basic Ext Layout - Table Outputs a standard HTML table as the layout container. This is sometimes useful for complex layouts where cell spanning is required, or when you want to allow the contents to flow naturally based on standard browser table layout rules. //sample code layout: { type: 'table', columns: 4 }, items: [ {html:'1,1',rowspan:3}, {html:'1,2'}, {html:'1,3'}, {html:'2,2',colspan:2}, {html:'3,2'}, {html:'3,3'} ] http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.Table
  • 17. Basic Ext Layout - Vbox A layout that arranges items vertically across a Container. This layout optionally divides available vertical space between child items containing a numeric flex configuration. //sample code layout: { type: 'vbox‘, align : 'stretch', pack : 'start', }, items: [ {html:'panel 1', flex:1}, {html:'panel 2', height:150}, {html:'panel 3', flex:2} ] http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.VBox
  • 18. Basic Ext Layout - Hbox A layout that arranges items horizontally across a Container. This layout optionally divides available horizontal space between child items containing a numeric flex configuration. //sample code layout: { type: 'hbox', pack: 'start', align: 'stretch' }, items: [ {html:'panel 1', flex:1}, {html:'panel 2', width:150}, {html:'panel 3', flex:2} ] http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.layout.container.HBox
  • 19. vBox – hBox Configuration Align : Controls how the child items of the container are aligned. Pack : Controls how the child items of the container are packed together.
  • 20. Tips Because ExtJs's layout is nested, so see the raw design start from bigger (base) component.
  • 21. Exersice Please make layout for this mockup in ExtJs’s ways.
  • 22. Thanks for your attention. Presented by : Irfan Maulana Contact me on : Email : mazipanneh@gmail.com Blog : www.mazipanneh.wordpress.com