SlideShare a Scribd company logo
1 of 32
Download to read offline
Wednesday, November 2, 11
LAYOUTS
                            Sven Brunken



             sven@sencha.com               @svenbrunken




Wednesday, November 2, 11
Overview
                            Why did we change it?
                              What changed?
                              GXT 2 to GXT 3
                              Usage examples
                                 Questions




Wednesday, November 2, 11
Why Did We Change It?




Wednesday, November 2, 11
Why Did We Change It?

      Steep learning curve of the layout system in GXT 2
      Hard to use and maintain
      UiBinder support not possible
      No clean separation of logic between container and layout




Wednesday, November 2, 11
What’s New Or
                             Different?




Wednesday, November 2, 11
What’s New Or Different?

      UiBinder support including layout data
      Typed API
      Clearer inheritance structure
      DOM structure building
      GWT interface based
      GWT Widget class supported natively without wrapping




Wednesday, November 2, 11
UiBinder Support
       GWT does not allow custom parsers to be registered
       Uses the @UiChild annotation
       Requires a typed API




      <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'...>

         <container:CenterLayoutContainer>
           <gxt:ContentPanel bodyStyle="padding: 6px" headingText="CenterLayout" width="200">
             <g:Label text="I should be centered" />
           </gxt:ContentPanel>
         </container:CenterLayoutContainer>

      </ui:UiBinder>




Wednesday, November 2, 11
Typed API
       Easy to learn
       Code completion and code assist from your favorite IDE
       Only correct LayoutData can be used, IDE code checks



                            BorderLayoutContainer con = new BorderLayoutContainer();
                            con.setBorders(true);

                            con.setNorthWidget(north, northData);
                            con.setWestWidget(west, westData);
                            con.setCenterWidget(center, centerData);
                            con.setEastWidget(east, eastData);
                            con.setSouthWidget(south, southData);




Wednesday, November 2, 11
Inheritance Chain




Wednesday, November 2, 11
Layouts
                                2.0                3.0
                            BorderLayout   BorderLayoutContainer

           Container        CenterLayout   CenterLayoutContainer

                            FlowLayout     FlowLayoutContainer




Wednesday, November 2, 11
Component


                                           Container



    AbstractHtmlLayout           Insert                      Resize


           HtmlLayout          FlowLayout


                                           InsertResize                 Simple



                   BoxLayout                CardLayout                  Viewport

                                          CssFloatLayout              ContentPanel

                  HBoxLayout              HorizontalLayout            BorderLayout

                  VBoxLayout               VerticalLayout


Wednesday, November 2, 11
DOM Structure Building

       2.0
       Child widget’s DOM not connected to container when inserted
       Only occurs after layout executed, element by element



       3.0
       Element is inserted into its parent directly after insertion into container
       Insert your Viewport with all child elements in one chunk




Wednesday, November 2, 11
GWT Interface Based
       Supports for HasWidgets, IndexPanel, InsertPanel, HasOneWidget,
       RequiresResize and ProvidesResize
       Based on the IsWidget interface

   public abstract class Container extends Component implements HasWidgets.ForIsWidget,
   IndexedPanel.ForIsWidget

   public abstract class ResizeContainer extends Container implements ProvidesResize

   public class SimpleContainer extends ResizeContainer implements HasOneWidget

   public void add(IsWidget child) {
     this.add(asWidgetOrNull(child));
   }

   public void insert(IsWidget w, int beforeIndex) {
     insert(asWidgetOrNull(w), beforeIndex);
   }


Wednesday, November 2, 11
Native Widget Support

       2.0
       Widgets wrapped in WidgetComponent


       3.0
       Direct support of Widgets, no wrapping
       Parent <-> Child relationship as expected
       Support for the GWT LayoutPanel classes




Wednesday, November 2, 11
GWT / GXT
                            Interoperability
                                Example




Wednesday, November 2, 11
LayoutPanel Integration
       Example shows LayoutPanels and Containers used together
       VerticalLayoutContainer -> DockPanel -> ContentPanel




Wednesday, November 2, 11
LayoutPanel Integration
                  VerticalLayoutContainer con = new VerticalLayoutContainer();
                  con.setPixelSize(400, 300);
                  ToolBar t = new ToolBar();
                  ...
                  con.add(t, new VerticalLayoutData(1, -1));

                  ContentPanel cp1 = new ContentPanel();
                  cp1.setHeadingText("North");
                  ContentPanel cp2 = new ContentPanel();
                  cp2.setHeadingText("Center");
                  ContentPanel cp3 = new ContentPanel();
                  cp3.setHeadingText("East");

                  DockLayoutPanel dock = new DockLayoutPanel(Unit.PCT);
                  dock.addNorth(cp1, 20);
                  dock.addEast(cp3, 10);
                  dock.add(cp2);

                  con.add(dock, new VerticalLayoutData(1, 1));

Wednesday, November 2, 11
Demonstration




Wednesday, November 2, 11
Important
                            LayoutContainers




Wednesday, November 2, 11
Container

      Holds the base container logic
      Implements the HasWidget interface
      Does not do any resizing of its children




Wednesday, November 2, 11
ResizeContainer

      Extends Container
      Implements the ProvidesResize and RequiresResize interfaces
      Sizes its children
      forceLayout bubbles to children of ResizeContainer at any level




Wednesday, November 2, 11
InsertContainer

      Extends Container
      Implements the InsertPanel interface
      Adds Widget and IsWidget insert support to Container




Wednesday, November 2, 11
InsertResizeContainer

      Extends ResizeContainer
      Implements the InsertPanel interface
      Adds Widget and IsWidget insert support to ResizeContainer




Wednesday, November 2, 11
GXT 2 To GXT 3




Wednesday, November 2, 11
BorderLayout in Explorer Demo

Wednesday, November 2, 11
GXT 2 BorderLayout
               LayoutContainer con = new LayoutContainer();
               con.setLayout(new BorderLayout());
               con.setBorders(true);

               ContentPanel west = new ContentPanel();
               ContentPanel center = new ContentPanel();
               center.setHeading("BorderLayout Example");

               BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
               westData.setCollapsible(true);
               westData.setSplit(true);
               westData.setMargins(new Margins(0, 5, 0, 5));

               BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);

               con.add(west, westData);
               con.add(center, centerData);




Wednesday, November 2, 11
GXT 3 BorderLayout
               BorderLayoutContainer con = new BorderLayoutContainer();

               con.setBorders(true);

               ContentPanel west = new ContentPanel();
               ContentPanel center = new ContentPanel();
               center.setHeadingText("BorderLayout Example");

               BorderLayoutData westData = new BorderLayoutData(150);
               westData.setCollapsible(true);
               westData.setSplit(true);
               westData.setMargins(new Margins(0, 5, 0, 5));

               MarginData centerData = new MarginData();

               con.setWestWidget(west, westData);
               con.setCenterWidget(center, centerData);




Wednesday, November 2, 11
Usage Examples




Wednesday, November 2, 11
Demonstration




Wednesday, November 2, 11
Questions




Wednesday, November 2, 11
Thank You!




Wednesday, November 2, 11

More Related Content

What's hot

Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Kevin Octavian
 
FRP: What does "declarative" mean
FRP: What does "declarative" meanFRP: What does "declarative" mean
FRP: What does "declarative" meanPeter Ovchinnikov
 
Data binding в массы! (1.2)
Data binding в массы! (1.2)Data binding в массы! (1.2)
Data binding в массы! (1.2)Yurii Kotov
 
Programmers, communicate your intentions
Programmers, communicate your intentionsProgrammers, communicate your intentions
Programmers, communicate your intentionsYael Zaritsky Perez
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the TrenchesJonathan Wage
 
ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMJonathan Wage
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesSencha
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperJonathan Wage
 
Anton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightAnton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightMichael Pustovit
 
Event handling using jQuery
Event handling using jQueryEvent handling using jQuery
Event handling using jQueryIban Martinez
 
Vaadin 8 - Data Binding with Binder
Vaadin 8 - Data Binding with BinderVaadin 8 - Data Binding with Binder
Vaadin 8 - Data Binding with BinderPeter Lehto
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinonesalertchair8725
 
Symfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMSymfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMJonathan Wage
 
Special Events: Beyond Custom Events
Special Events: Beyond Custom EventsSpecial Events: Beyond Custom Events
Special Events: Beyond Custom EventsBrandon Aaron
 
Lenguaje de programación jn
Lenguaje de programación jnLenguaje de programación jn
Lenguaje de programación jnJhiselys Vásquez
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinonesnumberlesspasto93
 
Functionality Focused Code Organization
Functionality Focused Code OrganizationFunctionality Focused Code Organization
Functionality Focused Code OrganizationRebecca Murphey
 
Михаил Анохин "Data binding 2.0"
Михаил Анохин "Data binding 2.0"Михаил Анохин "Data binding 2.0"
Михаил Анохин "Data binding 2.0"Fwdays
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coveragebrendacuthbert89
 

What's hot (20)

Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1
 
FRP: What does "declarative" mean
FRP: What does "declarative" meanFRP: What does "declarative" mean
FRP: What does "declarative" mean
 
Data binding в массы! (1.2)
Data binding в массы! (1.2)Data binding в массы! (1.2)
Data binding в массы! (1.2)
 
Programmers, communicate your intentions
Programmers, communicate your intentionsProgrammers, communicate your intentions
Programmers, communicate your intentions
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the Trenches
 
ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODM
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced Templates
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document Mapper
 
Anton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightAnton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 light
 
Event handling using jQuery
Event handling using jQueryEvent handling using jQuery
Event handling using jQuery
 
Vaadin 8 - Data Binding with Binder
Vaadin 8 - Data Binding with BinderVaadin 8 - Data Binding with Binder
Vaadin 8 - Data Binding with Binder
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
Symfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMSymfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODM
 
BVJS
BVJSBVJS
BVJS
 
Special Events: Beyond Custom Events
Special Events: Beyond Custom EventsSpecial Events: Beyond Custom Events
Special Events: Beyond Custom Events
 
Lenguaje de programación jn
Lenguaje de programación jnLenguaje de programación jn
Lenguaje de programación jn
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
Functionality Focused Code Organization
Functionality Focused Code OrganizationFunctionality Focused Code Organization
Functionality Focused Code Organization
 
Михаил Анохин "Data binding 2.0"
Михаил Анохин "Data binding 2.0"Михаил Анохин "Data binding 2.0"
Михаил Анохин "Data binding 2.0"
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 

Similar to Ext GWT 3.0 Layouts

Best Practices in Ext GWT
Best Practices in Ext GWTBest Practices in Ext GWT
Best Practices in Ext GWTSencha
 
Migrating from Touch 1.x to 2.0
Migrating from Touch 1.x to 2.0Migrating from Touch 1.x to 2.0
Migrating from Touch 1.x to 2.0Sencha
 
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023Johnny Sung
 
layout-manager-tutorial.pdf
layout-manager-tutorial.pdflayout-manager-tutorial.pdf
layout-manager-tutorial.pdfShaiAlmog1
 
GWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouGWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouRobert Cooper
 
Cassandra v3.0 at Rakuten meet-up on 12/2/2015
Cassandra v3.0 at Rakuten meet-up on 12/2/2015Cassandra v3.0 at Rakuten meet-up on 12/2/2015
Cassandra v3.0 at Rakuten meet-up on 12/2/2015datastaxjp
 
Model-Driven Software Development - Context-Sensitive Transformation
Model-Driven Software Development - Context-Sensitive TransformationModel-Driven Software Development - Context-Sensitive Transformation
Model-Driven Software Development - Context-Sensitive TransformationEelco Visser
 
On a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdfOn a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdfmukeshkumawat551
 
Creating Ext GWT Extensions and Components
Creating Ext GWT Extensions and ComponentsCreating Ext GWT Extensions and Components
Creating Ext GWT Extensions and ComponentsSencha
 
Android data binding
Android data bindingAndroid data binding
Android data bindingAjit Singh
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkitnikhilyagnic
 
Flutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdfFlutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdfKaty Slemon
 

Similar to Ext GWT 3.0 Layouts (17)

Best Practices in Ext GWT
Best Practices in Ext GWTBest Practices in Ext GWT
Best Practices in Ext GWT
 
Migrating from Touch 1.x to 2.0
Migrating from Touch 1.x to 2.0Migrating from Touch 1.x to 2.0
Migrating from Touch 1.x to 2.0
 
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
 
java swing
java swingjava swing
java swing
 
layout-manager-tutorial.pdf
layout-manager-tutorial.pdflayout-manager-tutorial.pdf
layout-manager-tutorial.pdf
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
 
Es04
Es04Es04
Es04
 
Draw2D
Draw2DDraw2D
Draw2D
 
GWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouGWT 2 Is Smarter Than You
GWT 2 Is Smarter Than You
 
Cassandra v3.0 at Rakuten meet-up on 12/2/2015
Cassandra v3.0 at Rakuten meet-up on 12/2/2015Cassandra v3.0 at Rakuten meet-up on 12/2/2015
Cassandra v3.0 at Rakuten meet-up on 12/2/2015
 
Model-Driven Software Development - Context-Sensitive Transformation
Model-Driven Software Development - Context-Sensitive TransformationModel-Driven Software Development - Context-Sensitive Transformation
Model-Driven Software Development - Context-Sensitive Transformation
 
On a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdfOn a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdf
 
Creating Ext GWT Extensions and Components
Creating Ext GWT Extensions and ComponentsCreating Ext GWT Extensions and Components
Creating Ext GWT Extensions and Components
 
Android data binding
Android data bindingAndroid data binding
Android data binding
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
 
Flutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdfFlutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdf
 
TY.BSc.IT Java QB U1
TY.BSc.IT Java QB U1TY.BSc.IT Java QB U1
TY.BSc.IT Java QB U1
 

More from Sencha

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsSencha
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 HighlightsSencha
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha
 
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
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridSencha
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportSencha
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsSencha
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSencha
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...Sencha
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...Sencha
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSencha
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsSencha
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...Sencha
 

More from Sencha (20)

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
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
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
 

Recently uploaded

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
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
 
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
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
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
 
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
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Recently uploaded (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
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
 
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
 
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
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
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!
 
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
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Ext GWT 3.0 Layouts

  • 2. LAYOUTS Sven Brunken sven@sencha.com @svenbrunken Wednesday, November 2, 11
  • 3. Overview Why did we change it? What changed? GXT 2 to GXT 3 Usage examples Questions Wednesday, November 2, 11
  • 4. Why Did We Change It? Wednesday, November 2, 11
  • 5. Why Did We Change It? Steep learning curve of the layout system in GXT 2 Hard to use and maintain UiBinder support not possible No clean separation of logic between container and layout Wednesday, November 2, 11
  • 6. What’s New Or Different? Wednesday, November 2, 11
  • 7. What’s New Or Different? UiBinder support including layout data Typed API Clearer inheritance structure DOM structure building GWT interface based GWT Widget class supported natively without wrapping Wednesday, November 2, 11
  • 8. UiBinder Support GWT does not allow custom parsers to be registered Uses the @UiChild annotation Requires a typed API <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'...> <container:CenterLayoutContainer> <gxt:ContentPanel bodyStyle="padding: 6px" headingText="CenterLayout" width="200"> <g:Label text="I should be centered" /> </gxt:ContentPanel> </container:CenterLayoutContainer> </ui:UiBinder> Wednesday, November 2, 11
  • 9. Typed API Easy to learn Code completion and code assist from your favorite IDE Only correct LayoutData can be used, IDE code checks BorderLayoutContainer con = new BorderLayoutContainer(); con.setBorders(true); con.setNorthWidget(north, northData); con.setWestWidget(west, westData); con.setCenterWidget(center, centerData); con.setEastWidget(east, eastData); con.setSouthWidget(south, southData); Wednesday, November 2, 11
  • 11. Layouts 2.0 3.0 BorderLayout BorderLayoutContainer Container CenterLayout CenterLayoutContainer FlowLayout FlowLayoutContainer Wednesday, November 2, 11
  • 12. Component Container AbstractHtmlLayout Insert Resize HtmlLayout FlowLayout InsertResize Simple BoxLayout CardLayout Viewport CssFloatLayout ContentPanel HBoxLayout HorizontalLayout BorderLayout VBoxLayout VerticalLayout Wednesday, November 2, 11
  • 13. DOM Structure Building 2.0 Child widget’s DOM not connected to container when inserted Only occurs after layout executed, element by element 3.0 Element is inserted into its parent directly after insertion into container Insert your Viewport with all child elements in one chunk Wednesday, November 2, 11
  • 14. GWT Interface Based Supports for HasWidgets, IndexPanel, InsertPanel, HasOneWidget, RequiresResize and ProvidesResize Based on the IsWidget interface public abstract class Container extends Component implements HasWidgets.ForIsWidget, IndexedPanel.ForIsWidget public abstract class ResizeContainer extends Container implements ProvidesResize public class SimpleContainer extends ResizeContainer implements HasOneWidget public void add(IsWidget child) { this.add(asWidgetOrNull(child)); } public void insert(IsWidget w, int beforeIndex) { insert(asWidgetOrNull(w), beforeIndex); } Wednesday, November 2, 11
  • 15. Native Widget Support 2.0 Widgets wrapped in WidgetComponent 3.0 Direct support of Widgets, no wrapping Parent <-> Child relationship as expected Support for the GWT LayoutPanel classes Wednesday, November 2, 11
  • 16. GWT / GXT Interoperability Example Wednesday, November 2, 11
  • 17. LayoutPanel Integration Example shows LayoutPanels and Containers used together VerticalLayoutContainer -> DockPanel -> ContentPanel Wednesday, November 2, 11
  • 18. LayoutPanel Integration VerticalLayoutContainer con = new VerticalLayoutContainer(); con.setPixelSize(400, 300); ToolBar t = new ToolBar(); ... con.add(t, new VerticalLayoutData(1, -1)); ContentPanel cp1 = new ContentPanel(); cp1.setHeadingText("North"); ContentPanel cp2 = new ContentPanel(); cp2.setHeadingText("Center"); ContentPanel cp3 = new ContentPanel(); cp3.setHeadingText("East"); DockLayoutPanel dock = new DockLayoutPanel(Unit.PCT); dock.addNorth(cp1, 20); dock.addEast(cp3, 10); dock.add(cp2); con.add(dock, new VerticalLayoutData(1, 1)); Wednesday, November 2, 11
  • 20. Important LayoutContainers Wednesday, November 2, 11
  • 21. Container Holds the base container logic Implements the HasWidget interface Does not do any resizing of its children Wednesday, November 2, 11
  • 22. ResizeContainer Extends Container Implements the ProvidesResize and RequiresResize interfaces Sizes its children forceLayout bubbles to children of ResizeContainer at any level Wednesday, November 2, 11
  • 23. InsertContainer Extends Container Implements the InsertPanel interface Adds Widget and IsWidget insert support to Container Wednesday, November 2, 11
  • 24. InsertResizeContainer Extends ResizeContainer Implements the InsertPanel interface Adds Widget and IsWidget insert support to ResizeContainer Wednesday, November 2, 11
  • 25. GXT 2 To GXT 3 Wednesday, November 2, 11
  • 26. BorderLayout in Explorer Demo Wednesday, November 2, 11
  • 27. GXT 2 BorderLayout LayoutContainer con = new LayoutContainer(); con.setLayout(new BorderLayout()); con.setBorders(true); ContentPanel west = new ContentPanel(); ContentPanel center = new ContentPanel(); center.setHeading("BorderLayout Example"); BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150); westData.setCollapsible(true); westData.setSplit(true); westData.setMargins(new Margins(0, 5, 0, 5)); BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER); con.add(west, westData); con.add(center, centerData); Wednesday, November 2, 11
  • 28. GXT 3 BorderLayout BorderLayoutContainer con = new BorderLayoutContainer(); con.setBorders(true); ContentPanel west = new ContentPanel(); ContentPanel center = new ContentPanel(); center.setHeadingText("BorderLayout Example"); BorderLayoutData westData = new BorderLayoutData(150); westData.setCollapsible(true); westData.setSplit(true); westData.setMargins(new Margins(0, 5, 0, 5)); MarginData centerData = new MarginData(); con.setWestWidget(west, westData); con.setCenterWidget(center, centerData); Wednesday, November 2, 11