SlideShare une entreprise Scribd logo
1  sur  146
Slide 1

TEQneers GmbH & Co. KG   www.teqneers.de
Who?


             ‣ Stefan Gehrig
             ‣ @sgehrig
             ‣ gehrig@teqneers.de
             ‣ TEQneers GmbH & Co. KG, Stuttgart
             ‣ Software Architect, Senior Developer PHP &
               Javascript



                                                                   Slide 2

TEQneers GmbH & Co. KG                                      www.teqneers.de
Slide 3

TEQneers GmbH & Co. KG   www.teqneers.de
Products
             ‣ Ext JS 4.1             ‣ Sencha.io

             ‣ Ext JS 3.4             ‣ Ext Core

             ‣ Sencha GXT 3           ‣ Sencha SDK Tools

             ‣ Sencha Touch 2         ‣ JSBuilder

             ‣ Sencha Touch Charts

             ‣ Sencha Architect 2

             ‣ Sencha Animator

                                                                  Slide 4

TEQneers GmbH & Co. KG                                     www.teqneers.de
History
             ‣ 01/2006 Jack Slocum developed an extension for YUI
               called yui-ext
             ‣ 06/2006 Ext JS 1.1 with adapters for YUI, jQuery or
               Prototype
             ‣ 04/2008 Ext JS 2.0 (dual license GPLv3 + commercial)
             ‣ 07/2009 Ext JS 3.0
             ‣ 06/2010 Raphaël + jQTouch + theJIT + Ext JS = Sencha
             ‣ 05/2011 Sencha Touch 1.0 and Ext JS 4.0
             ‣ 04/2012 Ext JS 4.1
             ‣ 06/2012 Sencha Touch 2.0

                                                                             Slide 5

TEQneers GmbH & Co. KG                                                www.teqneers.de
Some Ext JS experience?




                                                          Slide 6

TEQneers GmbH & Co. KG                             www.teqneers.de
Some Ext JS experience?


             ‣ Who has already used Javascript Frameworks?




                                                                    Slide 6

TEQneers GmbH & Co. KG                                       www.teqneers.de
Some Ext JS experience?


             ‣ Who has already used Javascript Frameworks?
             ‣ If so, which ones?




                                                                    Slide 6

TEQneers GmbH & Co. KG                                       www.teqneers.de
Some Ext JS experience?


             ‣ Who has already used Javascript Frameworks?
             ‣ If so, which ones?
             ‣ Who knows Ext JS?




                                                                    Slide 6

TEQneers GmbH & Co. KG                                       www.teqneers.de
Some Ext JS experience?


             ‣ Who has already used Javascript Frameworks?
             ‣ If so, which ones?
             ‣ Who knows Ext JS?
             ‣ Who has already worked with Ext JS?




                                                                    Slide 6

TEQneers GmbH & Co. KG                                       www.teqneers.de
Some Ext JS experience?


             ‣ Who has already used Javascript Frameworks?
             ‣ If so, which ones?
             ‣ Who knows Ext JS?
             ‣ Who has already worked with Ext JS?
             ‣ If so, which version(s)?



                                                                    Slide 6

TEQneers GmbH & Co. KG                                       www.teqneers.de
Ext JS 4.0/4.1


                                                 Slide 7

TEQneers GmbH & Co. KG                    www.teqneers.de
What are we talking about?




                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?




                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?
            Widgets




                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?
            Widgets
            Layouts




                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?
            Widgets
            Layouts
            Data Package




                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?
            Widgets
            Layouts
            Data Package
            Class System




                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?
            Widgets
            Layouts
            Data Package
            Class System
            DOM Manipulation




                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?
            Widgets
            Layouts
            Data Package
            Class System
            DOM Manipulation
            Miscellaneous



                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What are we talking about?
            What is Ext JS?
            Widgets
            Layouts
            Data Package
            Class System
            DOM Manipulation
            Miscellaneous
            Theming

                                                             Slide 8

TEQneers GmbH & Co. KG                                www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 9

TEQneers GmbH & Co. KG         www.teqneers.de
„Full-Stack“-
         Javascript-Framework

                                   Slide 10

TEQneers GmbH & Co. KG      www.teqneers.de
„Full-Stack“-Javascript-Framework




                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library




                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library

             ‣ MVC application
               oriented code




                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library

             ‣ MVC application
               oriented code

             ‣ Layouts




                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library

             ‣ MVC application
               oriented code

             ‣ Layouts

             ‣ Data package




                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library

             ‣ MVC application
               oriented code

             ‣ Layouts

             ‣ Data package

             ‣ Class system




                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library

             ‣ MVC application
               oriented code

             ‣ Layouts

             ‣ Data package

             ‣ Class system

             ‣ DOM manipulation



                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library

             ‣ MVC application
               oriented code

             ‣ Layouts

             ‣ Data package

             ‣ Class system

             ‣ DOM manipulation

             ‣ Templating
                                                            Slide 11

TEQneers GmbH & Co. KG                               www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library   ‣ Drawing / charting

             ‣ MVC application
               oriented code

             ‣ Layouts

             ‣ Data package

             ‣ Class system

             ‣ DOM manipulation

             ‣ Templating
                                                                   Slide 11

TEQneers GmbH & Co. KG                                      www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library   ‣ Drawing / charting

             ‣ MVC application       ‣ AJAX
               oriented code           (XMLHttpRequest)

             ‣ Layouts

             ‣ Data package

             ‣ Class system

             ‣ DOM manipulation

             ‣ Templating
                                                                   Slide 11

TEQneers GmbH & Co. KG                                      www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library   ‣ Drawing / charting

             ‣ MVC application       ‣ AJAX
               oriented code           (XMLHttpRequest)

             ‣ Layouts               ‣ Utilities

             ‣ Data package

             ‣ Class system

             ‣ DOM manipulation

             ‣ Templating
                                                                   Slide 11

TEQneers GmbH & Co. KG                                      www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library   ‣ Drawing / charting

             ‣ MVC application       ‣ AJAX
               oriented code           (XMLHttpRequest)

             ‣ Layouts               ‣ Utilities

             ‣ Data package          ‣ Well documented API,
                                       clean code
             ‣ Class system

             ‣ DOM manipulation

             ‣ Templating
                                                                     Slide 11

TEQneers GmbH & Co. KG                                        www.teqneers.de
„Full-Stack“-Javascript-Framework
             ‣ Huge widget library   ‣ Drawing / charting

             ‣ MVC application       ‣ AJAX
               oriented code           (XMLHttpRequest)

             ‣ Layouts               ‣ Utilities

             ‣ Data package          ‣ Well documented API,
                                       clean code
             ‣ Class system
                                     ‣ Re-usable code,
             ‣ DOM manipulation        excellent cross-
                                       browser compatibility
             ‣ Templating
                                                                      Slide 11

TEQneers GmbH & Co. KG                                         www.teqneers.de
Structure




                                            Slide 12

TEQneers GmbH & Co. KG               www.teqneers.de
Structure




                                            Slide 13

TEQneers GmbH & Co. KG               www.teqneers.de
Structure




                                            Slide 14

TEQneers GmbH & Co. KG               www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 15

TEQneers GmbH & Co. KG         www.teqneers.de
Ext.button.Button




                                                    Slide 16

TEQneers GmbH & Co. KG                       www.teqneers.de
Ext.button.Button
Ext.create('Ext.Button', {
! text: 'Click me',
! renderTo: Ext.getBody(),
! handler: function() {
! !    alert('You clicked the button!');
! }
});




                                                     Slide 16

TEQneers GmbH & Co. KG                        www.teqneers.de
Ext.button.Button
Ext.create('Ext.Button', {
! text: 'Click me',
! renderTo: Ext.getBody(),
! handler: function() {
! !    alert('You clicked the button!');
! }
});




                                                     Slide 16

TEQneers GmbH & Co. KG                        www.teqneers.de
Ext.button.Button
Ext.create('Ext.Button', {
! text: 'Click me',
! renderTo: Ext.getBody(),
! handler: function() {
! !    alert('You clicked the button!');
! }
});


Ext.create('Ext.Button', {
    renderTo: Ext.getBody(),
    text: 'Click Me',
    enableToggle: true
});




                                                     Slide 16

TEQneers GmbH & Co. KG                        www.teqneers.de
Ext.button.Button
Ext.create('Ext.Button', {
! text: 'Click me',
! renderTo: Ext.getBody(),
! handler: function() {
! !    alert('You clicked the button!');
! }
});


Ext.create('Ext.Button', {
    renderTo: Ext.getBody(),
    text: 'Click Me',
    enableToggle: true
});




                                                     Slide 16

TEQneers GmbH & Co. KG                        www.teqneers.de
Ext.button.Button
Ext.create('Ext.Button', {
! text: 'Click me',
! renderTo: Ext.getBody(),
! handler: function() {
! !    alert('You clicked the button!');
! }
});


Ext.create('Ext.Button', {
    renderTo: Ext.getBody(),
    text: 'Click Me',
    enableToggle: true
});




                                                     Slide 16

TEQneers GmbH & Co. KG                        www.teqneers.de
Ext.button.Button
Ext.create('Ext.Button', {
! text: 'Click me',
! renderTo: Ext.getBody(),
! handler: function() {
! !    alert('You clicked the button!');
! }
});


Ext.create('Ext.Button', {
    renderTo: Ext.getBody(),
    text: 'Click Me',
    enableToggle: true
});


Ext.create('Ext.Button', {
    text       : 'Menu button',
    renderTo : Ext.getBody(),
    menu       : [
         {text: 'Item 1'},
         {text: 'Item 2'},
         {text: 'Item 3'},
         {text: 'Item 4'}
    ]
});

                                                      Slide 16

TEQneers GmbH & Co. KG                         www.teqneers.de
Ext.button.Button
Ext.create('Ext.Button', {
! text: 'Click me',
! renderTo: Ext.getBody(),
! handler: function() {
! !    alert('You clicked the button!');
! }
});


Ext.create('Ext.Button', {
    renderTo: Ext.getBody(),
    text: 'Click Me',
    enableToggle: true
});


Ext.create('Ext.Button', {
    text       : 'Menu button',
    renderTo : Ext.getBody(),
    menu       : [
         {text: 'Item 1'},
         {text: 'Item 2'},
         {text: 'Item 3'},
         {text: 'Item 4'}
    ]
});

                                                      Slide 16

TEQneers GmbH & Co. KG                         www.teqneers.de
Ext.form.Panel / Ext.form.*




                                                              Slide 17

TEQneers GmbH & Co. KG                                 www.teqneers.de
Ext.form.Panel / Ext.form.*
Ext.create('Ext.form.Panel', {
! frame: true,
! title: 'Form Fields',
! width: 340,
! renderTo: Ext.getBody(),
! bodyPadding: 5,

!    fieldDefaults: {
!    !    labelAlign: 'left',
!    !    labelWidth: 90,
!    !    anchor: '100%'
!    },

! items: [{
! !    xtype: 'textfield',
! !    name: 'textfield1',
! !    fieldLabel: 'Text field',
! !    value: 'Text field value'
! }, {
! !    xtype: 'textfield',
! !    name: 'password1',
! !    inputType: 'password',
! !    fieldLabel: 'Password field'
! }, {
! !    xtype: 'filefield',
! !    name: 'file1',
! !    fieldLabel: 'File upload'
! }, {
! !    xtype: 'textareafield',
! !    name: 'textarea1',
! !    fieldLabel: 'TextArea',
! !    value: 'Textarea value'
! }, ...]
});

                                                                  Slide 17

    TEQneers GmbH & Co. KG                                 www.teqneers.de
Ext.form.Panel / Ext.form.*
Ext.create('Ext.form.Panel', {
! frame: true,
! title: 'Form Fields',
! width: 340,
! renderTo: Ext.getBody(),
! bodyPadding: 5,

!    fieldDefaults: {
!    !    labelAlign: 'left',
!    !    labelWidth: 90,
!    !    anchor: '100%'
!    },

! items: [{
! !    xtype: 'textfield',
! !    name: 'textfield1',
! !    fieldLabel: 'Text field',
! !    value: 'Text field value'
! }, {
! !    xtype: 'textfield',
! !    name: 'password1',
! !    inputType: 'password',
! !    fieldLabel: 'Password field'
! }, {
! !    xtype: 'filefield',
! !    name: 'file1',
! !    fieldLabel: 'File upload'
! }, {
! !    xtype: 'textareafield',
! !    name: 'textarea1',
! !    fieldLabel: 'TextArea',
! !    value: 'Textarea value'
! }, ...]
});

                                                                  Slide 17

    TEQneers GmbH & Co. KG                                 www.teqneers.de
Ext.grid.Panel




                                                 Slide 18

TEQneers GmbH & Co. KG                    www.teqneers.de
Ext.grid.Panel
Ext.create('Ext.data.Store', {
    storeId:'simpsonsStore',
    fields:['name', 'email', 'phone'],
    data:{'items':[
        { 'name': 'Lisa', "email":"lisa@simpsons.com",     "phone":"555-111-1224" },
        { 'name': 'Bart', "email":"bart@simpsons.com",     "phone":"555-222-1234" },
        { 'name': 'Homer', "email":"home@simpsons.com",    "phone":"555-222-1244" },
        { 'name': 'Marge', "email":"marge@simpsons.com",   "phone":"555-222-1254" }
    ]},
    proxy: {
        type: 'memory',
        reader: {
             type: 'json',
             root: 'items'
        }
    }
});

Ext.create('Ext.grid.Panel', {
    title: 'Simpsons',
    store: Ext.data.StoreManager.lookup('simpsonsStore'),
    columns: [
        { header: 'Name', dataIndex: 'name' },
        { header: 'Email', dataIndex: 'email', flex: 1 },
        { header: 'Phone', dataIndex: 'phone' }
    ],
    height: 200,
    width: 400,
    renderTo: Ext.getBody()
});




                                                                                              Slide 18

TEQneers GmbH & Co. KG                                                                 www.teqneers.de
Ext.grid.Panel
Ext.create('Ext.data.Store', {
    storeId:'simpsonsStore',
    fields:['name', 'email', 'phone'],
    data:{'items':[
        { 'name': 'Lisa', "email":"lisa@simpsons.com",     "phone":"555-111-1224" },
        { 'name': 'Bart', "email":"bart@simpsons.com",     "phone":"555-222-1234" },
        { 'name': 'Homer', "email":"home@simpsons.com",    "phone":"555-222-1244" },
        { 'name': 'Marge', "email":"marge@simpsons.com",   "phone":"555-222-1254" }
    ]},
    proxy: {
        type: 'memory',
        reader: {
             type: 'json',
             root: 'items'
        }
    }
});

Ext.create('Ext.grid.Panel', {
    title: 'Simpsons',
    store: Ext.data.StoreManager.lookup('simpsonsStore'),
    columns: [
        { header: 'Name', dataIndex: 'name' },
        { header: 'Email', dataIndex: 'email', flex: 1 },
        { header: 'Phone', dataIndex: 'phone' }
    ],
    height: 200,
    width: 400,
    renderTo: Ext.getBody()
});




                                                                                              Slide 18

TEQneers GmbH & Co. KG                                                                 www.teqneers.de
Ext.panel.Panel




                                                  Slide 19

TEQneers GmbH & Co. KG                     www.teqneers.de
Ext.panel.Panel
Ext.create('Ext.panel.Panel', {
    bodyPadding: 5,
    width: 300,
    title: 'Filters',
    items: [{
         xtype: 'datefield',
         fieldLabel: 'Start date'
    }, {
         xtype: 'datefield',
         fieldLabel: 'End date'
    }],
    renderTo: Ext.getBody()
});




                                                      Slide 19

TEQneers GmbH & Co. KG                         www.teqneers.de
Ext.panel.Panel
Ext.create('Ext.panel.Panel', {
    bodyPadding: 5,
    width: 300,
    title: 'Filters',
    items: [{
         xtype: 'datefield',
         fieldLabel: 'Start date'
    }, {
         xtype: 'datefield',
         fieldLabel: 'End date'
    }],
    renderTo: Ext.getBody()
});




                                                      Slide 19

TEQneers GmbH & Co. KG                         www.teqneers.de
Ext.slider.*




                                               Slide 20

TEQneers GmbH & Co. KG                  www.teqneers.de
Ext.slider.*
 Ext.create('Ext.slider.Single', {
     width: 200,
     value: 50,
     increment: 10,
     minValue: 0,
     maxValue: 100,
     renderTo: Ext.getBody()
 });




                                                           Slide 20

TEQneers GmbH & Co. KG                              www.teqneers.de
Ext.slider.*
 Ext.create('Ext.slider.Single', {
     width: 200,
     value: 50,
     increment: 10,
     minValue: 0,
     maxValue: 100,
     renderTo: Ext.getBody()
 });




                                                           Slide 20

TEQneers GmbH & Co. KG                              www.teqneers.de
Ext.slider.*
 Ext.create('Ext.slider.Single', {
     width: 200,
     value: 50,
     increment: 10,
     minValue: 0,
     maxValue: 100,
     renderTo: Ext.getBody()
 });




Ext.create('Ext.slider.Multi', {
    width: 200,
    values: [25, 50, 75],
    increment: 5,
    minValue: 0,
    maxValue: 100,
    constrainThumbs: false,
    renderTo: Ext.getBody()
});




                                                           Slide 20

TEQneers GmbH & Co. KG                              www.teqneers.de
Ext.slider.*
 Ext.create('Ext.slider.Single', {
     width: 200,
     value: 50,
     increment: 10,
     minValue: 0,
     maxValue: 100,
     renderTo: Ext.getBody()
 });




Ext.create('Ext.slider.Multi', {
    width: 200,
    values: [25, 50, 75],
    increment: 5,
    minValue: 0,
    maxValue: 100,
    constrainThumbs: false,
    renderTo: Ext.getBody()
});




                                                           Slide 20

TEQneers GmbH & Co. KG                              www.teqneers.de
Ext.slider.*
 Ext.create('Ext.slider.Single', {   Ext.create('Ext.slider.Single', {
     width: 200,                         width: 214,
     value: 50,                          minValue: 0,
     increment: 10,                      maxValue: 100,
     minValue: 0,                        useTips: true,
     maxValue: 100,                      tipText: function(thumb){
     renderTo: Ext.getBody()                 return Ext.String.format('**{0}% complete**', thumb.value);
 });                                     },
                                         renderTo: Ext.getBody()
                                     });




Ext.create('Ext.slider.Multi', {
    width: 200,
    values: [25, 50, 75],
    increment: 5,
    minValue: 0,
    maxValue: 100,
    constrainThumbs: false,
    renderTo: Ext.getBody()
});




                                                                                                      Slide 20

TEQneers GmbH & Co. KG                                                                         www.teqneers.de
Ext.slider.*
 Ext.create('Ext.slider.Single', {   Ext.create('Ext.slider.Single', {
     width: 200,                         width: 214,
     value: 50,                          minValue: 0,
     increment: 10,                      maxValue: 100,
     minValue: 0,                        useTips: true,
     maxValue: 100,                      tipText: function(thumb){
     renderTo: Ext.getBody()                 return Ext.String.format('**{0}% complete**', thumb.value);
 });                                     },
                                         renderTo: Ext.getBody()
                                     });




Ext.create('Ext.slider.Multi', {
    width: 200,
    values: [25, 50, 75],
    increment: 5,
    minValue: 0,
    maxValue: 100,
    constrainThumbs: false,
    renderTo: Ext.getBody()
});




                                                                                                      Slide 20

TEQneers GmbH & Co. KG                                                                         www.teqneers.de
Ext.tab.Panel




                                                Slide 21

TEQneers GmbH & Co. KG                   www.teqneers.de
Ext.tab.Panel
 Ext.create('Ext.tab.Panel', {
     width: 300,
     height: 200,
     activeTab: 0,
     items: [
         {
              title: 'Tab 1',
              bodyPadding: 10,
              html : 'A simple tab'
         },
         {
              title: 'Tab 2',
              html : 'Another one'
         }
     ],
     renderTo : Ext.getBody()
 });




                                                      Slide 21

TEQneers GmbH & Co. KG                         www.teqneers.de
Ext.tab.Panel
 Ext.create('Ext.tab.Panel', {
     width: 300,
     height: 200,
     activeTab: 0,
     items: [
         {
              title: 'Tab 1',
              bodyPadding: 10,
              html : 'A simple tab'
         },
         {
              title: 'Tab 2',
              html : 'Another one'
         }
     ],
     renderTo : Ext.getBody()
 });




                                                      Slide 21

TEQneers GmbH & Co. KG                         www.teqneers.de
Ext.toolbar.Toolbar




                                                      Slide 22

TEQneers GmbH & Co. KG                         www.teqneers.de
Ext.toolbar.Toolbar
 Ext.create('Ext.toolbar.Toolbar', {
     renderTo: document.body,
     width    : 500,
     items: [
         {
              text: 'Button'
         },
         {
              xtype: 'splitbutton',
              text : 'Split Button'
         },
         '->',
         {
              xtype    : 'textfield',
              name     : 'field1',
              emptyText: 'enter search term'
         },
         '-',
         'text 1',
         { xtype: 'tbspacer' },
         'text 2',
         { xtype: 'tbspacer', width: 50 },
         'text 3'
     ]
 });


                                                       Slide 22

TEQneers GmbH & Co. KG                          www.teqneers.de
Ext.toolbar.Toolbar
 Ext.create('Ext.toolbar.Toolbar', {
     renderTo: document.body,
     width    : 500,
     items: [
         {
              text: 'Button'
         },
         {
              xtype: 'splitbutton',
              text : 'Split Button'
         },
         '->',
         {
              xtype    : 'textfield',
              name     : 'field1',
              emptyText: 'enter search term'
         },
         '-',
         'text 1',
         { xtype: 'tbspacer' },
         'text 2',
         { xtype: 'tbspacer', width: 50 },
         'text 3'
     ]
 });


                                                       Slide 22

TEQneers GmbH & Co. KG                          www.teqneers.de
Ext.tree.Panel




                                                 Slide 23

TEQneers GmbH & Co. KG                    www.teqneers.de
Ext.tree.Panel
var store = Ext.create('Ext.data.TreeStore', {
    root: {
        expanded: true,
        children: [
            { text: "detention", leaf: true },
            { text: "homework", expanded: true, children: [
                 { text: "book report", leaf: true },
                 { text: "alegrbra", leaf: true}
            ] },
            { text: "buy lottery tickets", leaf: true }
        ]
    }
});

Ext.create('Ext.tree.Panel', {
    title: 'Simple Tree',
    width: 200,
    height: 150,
    store: store,
    rootVisible: false,
    renderTo: Ext.getBody()
});




                                                                     Slide 23

TEQneers GmbH & Co. KG                                        www.teqneers.de
Ext.tree.Panel
var store = Ext.create('Ext.data.TreeStore', {
    root: {
        expanded: true,
        children: [
            { text: "detention", leaf: true },
            { text: "homework", expanded: true, children: [
                 { text: "book report", leaf: true },
                 { text: "alegrbra", leaf: true}
            ] },
            { text: "buy lottery tickets", leaf: true }
        ]
    }
});

Ext.create('Ext.tree.Panel', {
    title: 'Simple Tree',
    width: 200,
    height: 150,
    store: store,
    rootVisible: false,
    renderTo: Ext.getBody()
});




                                                                     Slide 23

TEQneers GmbH & Co. KG                                        www.teqneers.de
Ext.window.MessageBox




                                                        Slide 24

TEQneers GmbH & Co. KG                           www.teqneers.de
Ext.window.MessageBox

Ext.Msg.show({
     title:'Save Changes?',
     msg: 'You are closing a tab that has unsaved changes. Would you like to save your
changes?',
     buttons: Ext.Msg.YESNOCANCEL,
     icon: Ext.Msg.QUESTION
});




                                                                                        Slide 24

 TEQneers GmbH & Co. KG                                                          www.teqneers.de
Ext.window.MessageBox

Ext.Msg.show({
     title:'Save Changes?',
     msg: 'You are closing a tab that has unsaved changes. Would you like to save your
changes?',
     buttons: Ext.Msg.YESNOCANCEL,
     icon: Ext.Msg.QUESTION
});




                                                                                        Slide 24

 TEQneers GmbH & Co. KG                                                          www.teqneers.de
Ext.window.Window




                                                    Slide 25

TEQneers GmbH & Co. KG                       www.teqneers.de
Ext.window.Window

Ext.create('Ext.window.Window', {
    title: 'Hello',
    height: 200,
    width: 400,
    layout: 'fit',
    items: {
        xtype: 'grid',
        border: false,
        columns: [{header: 'World'}],
        store: Ext.create('Ext.data.ArrayStore', {})
    }
}).show();




                                                              Slide 25

TEQneers GmbH & Co. KG                                 www.teqneers.de
Ext.window.Window

Ext.create('Ext.window.Window', {
    title: 'Hello',
    height: 200,
    width: 400,
    layout: 'fit',
    items: {
        xtype: 'grid',
        border: false,
        columns: [{header: 'World'}],
        store: Ext.create('Ext.data.ArrayStore', {})
    }
}).show();




                                                              Slide 25

TEQneers GmbH & Co. KG                                 www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 26

TEQneers GmbH & Co. KG         www.teqneers.de
Layouts


      ‣ Ext JS applications are build
        on components

      ‣ Containers are specialized
        components that contain
        other components (or
        containers)

      ‣ Sizing and positioning of a
        containers‘ children is
        determined by the specified
        layout




                                                         Slide 27

TEQneers GmbH & Co. KG                            www.teqneers.de
Ext.layout.*




                                               Slide 28

TEQneers GmbH & Co. KG                  www.teqneers.de
Examples


                                           Slide 29

TEQneers GmbH & Co. KG              www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 30

TEQneers GmbH & Co. KG         www.teqneers.de
Overview




                                           Slide 31

TEQneers GmbH & Co. KG              www.teqneers.de
Overview




                                           Slide 32

TEQneers GmbH & Co. KG              www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)




                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of




                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of
                  ‣ the underlying storage mechanism




                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of
                  ‣ the underlying storage mechanism
                         ‣ remote (AJAX, JSON-P or Ext.direct)




                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of
                  ‣ the underlying storage mechanism
                         ‣ remote (AJAX, JSON-P or Ext.direct)
                         ‣ local (memory, local/session storage)




                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of
                  ‣ the underlying storage mechanism
                         ‣ remote (AJAX, JSON-P or Ext.direct)
                         ‣ local (memory, local/session storage)
                  ‣ the data format




                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of
                  ‣ the underlying storage mechanism
                         ‣ remote (AJAX, JSON-P or Ext.direct)
                         ‣ local (memory, local/session storage)
                  ‣ the data format
                         ‣ JSON




                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of
                  ‣ the underlying storage mechanism
                         ‣ remote (AJAX, JSON-P or Ext.direct)
                         ‣ local (memory, local/session storage)
                  ‣ the data format
                         ‣ JSON
                         ‣ XML



                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Overview
             ‣ implements Active Record pattern on the client side (sort
               of)
             ‣ abstracts CRUD operations regardless of
                  ‣ the underlying storage mechanism
                         ‣ remote (AJAX, JSON-P or Ext.direct)
                         ‣ local (memory, local/session storage)
                  ‣ the data format
                         ‣ JSON
                         ‣ XML
             ‣ works seamlessly with all data bound widgets

                                                                                  Slide 32

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Example


                                          Slide 33

TEQneers GmbH & Co. KG             www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 34

TEQneers GmbH & Co. KG         www.teqneers.de
A class system in
                 Javascript- why?

                                            Slide 35

TEQneers GmbH & Co. KG               www.teqneers.de
Javascript is a class-
        less, prototype-based
               language

                                     Slide 36

TEQneers GmbH & Co. KG        www.teqneers.de
Class System




                                               Slide 37

TEQneers GmbH & Co. KG                  www.teqneers.de
Class System


             ‣ most developers are more familiar with class-
               based languages




                                                                      Slide 37

TEQneers GmbH & Co. KG                                         www.teqneers.de
Class System


             ‣ most developers are more familiar with class-
               based languages
             ‣ Code based on a class system is easier to handle




                                                                      Slide 37

TEQneers GmbH & Co. KG                                         www.teqneers.de
Class System


             ‣ most developers are more familiar with class-
               based languages
             ‣ Code based on a class system is easier to handle
                  ‣ predictable strcutures




                                                                      Slide 37

TEQneers GmbH & Co. KG                                         www.teqneers.de
Class System


             ‣ most developers are more familiar with class-
               based languages
             ‣ Code based on a class system is easier to handle
                  ‣ predictable strcutures
                  ‣ easily identifiable extension points




                                                                      Slide 37

TEQneers GmbH & Co. KG                                         www.teqneers.de
Class System


             ‣ most developers are more familiar with class-
               based languages
             ‣ Code based on a class system is easier to handle
                  ‣ predictable strcutures
                  ‣ easily identifiable extension points
                  ‣ less maintenance required



                                                                      Slide 37

TEQneers GmbH & Co. KG                                         www.teqneers.de
Example
                    Ext.define('My.sample.Person', {
                        name: 'Unknown',

                          constructor: function(name) {
                              if (name) {
                                  this.name = name;
                              }
                          },

                          eat: function(foodType) {
                              console.log(this.name + " is eating: " + foodType);
                          }
                    });
                    Ext.define('My.sample.Tattletale', {
                    ! extend: 'My.sample.Person',

                          say: function(something) {
                              console.log(this.name + " says: " + something);
                          }
                    });

                    var aaron = Ext.create('My.sample.Person', 'Aaron');
                    aaron.eat("Salad");
                    var maria = Ext.create('My.sample.Tattletale', 'Maria');
                    maria.eat("Sausage");
                    maria.say("Bla bla blub");

                                                                                           Slide 38

TEQneers GmbH & Co. KG                                                              www.teqneers.de
Statics
                    Ext.define('Computer', {
                        statics: {
                            instanceCount: 0,
                            factory: function(brand) {
                                return new this(brand);
                            }
                        },

                    ! brand: null,

                          constructor: function(brand) {
                              this.brand! = brand;
                              this.self.instanceCount ++;
                          }
                    });

                    var dellComputer = Computer.factory('Dell');
                    var appleComputer = Computer.factory('Mac');

                    alert(appleComputer.brand);

                    alert(Computer.instanceCount);




                                                                          Slide 39

TEQneers GmbH & Co. KG                                             www.teqneers.de
Config
     Ext.define('MyClass', {

            config: {
                title: 'Default Title'
            },

            applyTitle: function(newTitle) {
                if (!Ext.isString(newTitle) || newTitle.length === 0) {
                    throw 'Error: Title must be a valid non-empty string';
                }
                else {
                    return newTitle;
                }
            }

     ! /*
     ! getTitle: function() {
            return this.title;
        },

           setTitle: function(newTitle) {
               this.title! = this.applyTitle(newTitle);
           }
     !     */
     });

                                                                                    Slide 40

TEQneers GmbH & Co. KG                                                       www.teqneers.de
Mixins




                                         Slide 41

TEQneers GmbH & Co. KG            www.teqneers.de
Singleton



                         Ext.define('Logger', {
                             singleton: true,
                             log: function(msg) {
                                 console.log(msg);
                             }
                         });

                         Logger.log('Hello');




                                                            Slide 42

TEQneers GmbH & Co. KG                               www.teqneers.de
The Class Definition Pipeline




                                                               Slide 43

TEQneers GmbH & Co. KG                                  www.teqneers.de
Summary

             ‣ Class system combines classic and well-known
               methodologies with the dynamic nature of
               Javascript
             ‣ When sticking to the naming convention
               (compare to PSR-0 in PHP) Ext JS provides
               dynamic code loading (auto-loading)
             ‣ Class system is the foundation of the whole
               framework (more than 300 shipped classes)


                                                                     Slide 44

TEQneers GmbH & Co. KG                                        www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 45

TEQneers GmbH & Co. KG         www.teqneers.de
DOM Manipulation

             ‣ comparable to the functionality provided by
               jQuery
                  ‣ not as sophisticated
                  ‣ not as fast
                  ‣ syntax not as sleek
                  ‣ but absolutely sufficient when working inside
                    the widget system


                                                                          Slide 46

TEQneers GmbH & Co. KG                                             www.teqneers.de
Features




                                           Slide 47

TEQneers GmbH & Co. KG              www.teqneers.de
Features




             ‣ DOM manipulation




                                                Slide 47

TEQneers GmbH & Co. KG                   www.teqneers.de
Features




             ‣ DOM manipulation
             ‣ DOM queries




                                                Slide 47

TEQneers GmbH & Co. KG                   www.teqneers.de
Features




             ‣ DOM manipulation
             ‣ DOM queries
             ‣ Animations




                                                Slide 47

TEQneers GmbH & Co. KG                   www.teqneers.de
Ext.dom.Helper

                var dh = Ext.DomHelper;    // create shorthand alias
                var spec = {
                    id: 'my-ul',
                    tag: 'ul',
                    cls: 'my-list',
                    children: [
                         {tag: 'li', id:   'item0', html: 'List Item 0'},
                         {tag: 'li', id:   'item1', html: 'List Item 1'},
                         {tag: 'li', id:   'item2', html: 'List Item 2'}
                    ]
                };
                var list = dh.append(
                    Ext.getBody(),
                    spec
                );

                dh.append(list, [
                    {tag: 'li', id: 'item3', html: 'List Item 3'},
                    {tag: 'li', id: 'item4', html: 'List Item 4'}
                ]);




                                                                                   Slide 48

TEQneers GmbH & Co. KG                                                      www.teqneers.de
Ext.dom.Helper - Templating


                 var html = '<a id="{id}" href="{url}" class="nav">{text}</a>';

                 var tpl = Ext.DomHelper.createTemplate(html);
                 tpl.append(Ext.getBody(), {
                     id: 'link1',
                     url: 'http://www.edspencer.net/',
                     text: "Ed's Site"
                 });
                 tpl.append(Ext.getBody(), {
                     id: 'link2',
                     url: 'http://www.dustindiaz.com/',
                     text: "Dustin's Site"
                 });




                                                                                         Slide 49

TEQneers GmbH & Co. KG                                                            www.teqneers.de
Ext.dom.Query


             ‣ provides selector and XPath processing
             ‣ extendable with custom pseudo classes and
               matchers
             ‣ works on HTML and XML
             ‣ supports most of the CSS3 selectors spec and
               basic XPath



                                                                     Slide 50

TEQneers GmbH & Co. KG                                        www.teqneers.de
Animations

                         var myComponent = Ext.create('Ext.Component', {
                             renderTo: document.body,
                             width: 200,
                             height: 200,
                             style: 'border: 1px solid red;'
                         });

                         Ext.create('Ext.fx.Anim', {
                             target: myComponent,
                             duration: 1000,
                             from: {
                                 width: 400
                             },
                             to: {
                                 width: 300,
                                 height: 300
                             }
                         });




                                                                                  Slide 51

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Keyframes

         Ext.create('Ext.fx.Animator', {
             target: Ext.getBody().createChild({
                 style: {
                     width: '100px',
                     height: '100px',
                     'background-color': 'red'
                 }
             }),
             duration: 10000, // 10 seconds
             keyframes: {
                 0: { opacity: 1, backgroundColor: 'FF0000' },
                 20: { x: 30, opacity: 0.5 },
                 40: { x: 130, backgroundColor: '0000FF' },
                 60: { y: 80, opacity: 0.3 },
                 80: { width: 200, y: 200 },
                 100: { opacity: 1, backgroundColor: '00FF00' }
             }
         });




                                                                         Slide 52

TEQneers GmbH & Co. KG                                            www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 53

TEQneers GmbH & Co. KG         www.teqneers.de
Utilities


                                            Slide 54

TEQneers GmbH & Co. KG               www.teqneers.de
Tools
             ‣ Ext.Array             ‣ Ext.util.TextMetrics
             ‣ Ext.Number            ‣ Collections
             ‣ Ext.Object            ‣ HashMaps
             ‣ Ext.String            ‣ Events & Tasks
             ‣ Ext.JSON
             ‣ Ext.Date
             ‣ Ext.Function
             ‣ Ext.util.Format

                                                                     Slide 55

TEQneers GmbH & Co. KG                                        www.teqneers.de
Templating


                                             Slide 56

TEQneers GmbH & Co. KG                www.teqneers.de
Templating
var order!= ...,
! template = new Ext.XTemplate(
'<table class="order">',
! '<tbody>',
! '<tpl for=".">',
! !    '<tpl for="OrderDetails">',
! !    ! '<tr class="{[xindex % 2 === 0 ? "even" : "odd"]}">',
! !    ! ! '<tpl if="xindex == 1">',
! !    ! ! ! '<th rowspan="{[xcount]}">{parent.Order.Id}</th>',
! !    ! ! '</tpl>',
! !    ! ! '<td>{#}.</td>',
! !    ! ! '<td>Product ID <b>{ProductId}</b></td>',
! !    ! ! '<td><tpl if="UnitPrice &gt; 15"><u>{UnitPrice:usMoney}</u></tpl><tpl
if="UnitPrice &lt;= 15">{UnitPrice:usMoney}</tpl></td>',
! !    ! ! '<td>{Quantity * 0.5}</td>',
! !    ! '</tpl>',
! !    '</tr>',
! '</tpl>',
! '</tbody>',
 '</table>'
);

// apply the CustomerOrders array to the template
template.append('content', order.CustomerOrders);



                                                                                    Slide 57

TEQneers GmbH & Co. KG                                                       www.teqneers.de
Example


                                          Slide 58

TEQneers GmbH & Co. KG             www.teqneers.de
AJAX


                                       Slide 59

TEQneers GmbH & Co. KG          www.teqneers.de
Simple XMLHttpRequest



    Ext.Ajax.request({
        url: 'some_page.php',
        success: function(response, opts) {
            var obj = Ext.decode(response.responseText);
            console.log(obj);
        },
        failure: function(response, opts) {
            console.log('server-side failure with status code ' + response.status);
        }
    });




                                                                                        Slide 60

TEQneers GmbH & Co. KG                                                           www.teqneers.de
Can even fake file uploads...


    Ext.Ajax.request({
        url: 'upload.php',
    ! form: 'id_of_a_form_with_an_upload_element',
    ! isUpload: true,
         success: function(response, opts) {
             var obj = Ext.decode(response.responseText);
             console.dir(obj);
         },
         failure: function(response, opts) {
             console.log('server-side failure with status code ' + response.status);
         }
    });




                                                                                         Slide 61

TEQneers GmbH & Co. KG                                                            www.teqneers.de
Keyboard
                         Navgation

                                            Slide 62

TEQneers GmbH & Co. KG               www.teqneers.de
Drag and Drop


                                                Slide 63

TEQneers GmbH & Co. KG                   www.teqneers.de
Drawing


                                          Slide 64

TEQneers GmbH & Co. KG             www.teqneers.de
Drawing




             ‣ renders either
                  ‣ SVG
                  ‣ VML (IE < 9)




                                                    Slide 65

TEQneers GmbH & Co. KG                       www.teqneers.de
Examples


                                           Slide 66

TEQneers GmbH & Co. KG              www.teqneers.de
Charting


                                           Slide 67

TEQneers GmbH & Co. KG              www.teqneers.de
Charting




                                           Slide 68

TEQneers GmbH & Co. KG              www.teqneers.de
Charting



             ‣ relatively simple charting solution out of the box
             ‣ but: lacks a lot of features when compared to
               professional enterprise-grade solutions such as
               Highcharts JS for example




                                                                           Slide 69

TEQneers GmbH & Co. KG                                              www.teqneers.de
Example


                                          Slide 70

TEQneers GmbH & Co. KG             www.teqneers.de
What is Ext JS?

            Widgets

            Layouts

            Data Package

            Class System

            DOM Manipulation

            Miscellaneous

            Theming

                                      Slide 71

TEQneers GmbH & Co. KG         www.teqneers.de
Theming
             ‣ uses SASS and Compass as CSS pre-processor
             ‣ component UIs allow for easy extension / styling

@include extjs-panel-ui(                      Ext.create('widget.panel', {
    'bubble',                                     ui: 'bubble',
                                                  width: 300,
      $ui-header-font-size: 12px,                 height: 300,
      $ui-header-font-weight: bold,               title: 'Panel with a bubble UI!'
      $ui-header-color: #0D2A59,              });
      $ui-header-background-color: #fff,
      $ui-header-background-gradient: null,

      $ui-border-color: #fff,
      $ui-border-radius: 4px,
      $ui-body-background-color: #fff,
      $ui-body-font-size: 14px
);




                                                                                  Slide 72

TEQneers GmbH & Co. KG                                                     www.teqneers.de
Questions?


                                             Slide 73

TEQneers GmbH & Co. KG                www.teqneers.de
Thank you, come
                      again!

                                          Slide 74

TEQneers GmbH & Co. KG             www.teqneers.de
Links
             ‣ http://www.sencha.com/
                  ‣ http://www.sencha.com/products/extjs/
                  ‣ http://docs.sencha.com/ext-js/4-1/
             ‣ Ext JS 4.1
                  ‣ http://www.sencha.com/blog/first-thoughts-on-ext-js/
                  ‣ http://www.sencha.com/blog/optimizing-ext-js-4-1-based-applications/
             ‣ Class System
                  ‣ http://www.sencha.com/learn/sencha-class-system/
                  ‣ http://www.sencha.com/blog/countdown-to-ext-js-4-dynamic-loading-and-new-class-system
                  ‣ http://edspencer.net/2011/01/classes-in-ext-js-4-under-the-hood.html
                  ‣ http://edspencer.net/2011/01/ext-js-4-the-class-definition-pipeline.html
             ‣ Data Package
                  ‣ http://www.sencha.com/blog/countdown-to-ext-js-4-data-package/
                  ‣ http://www.sencha.com/blog/ext-js-4-anatomy-of-a-model/
                  ‣ http://edspencer.net/2011/02/proxies-extjs-4.html
             ‣ Templating
                  ‣ http://sgehrig.github.com/Ext-Templating-Examples/



                                                                                                                   Slide 75

TEQneers GmbH & Co. KG                                                                                      www.teqneers.de

Contenu connexe

Similaire à Introduction to Ext JS 4

Back To The Future.Key 2
Back To The Future.Key 2Back To The Future.Key 2
Back To The Future.Key 2gueste8cc560
 
Glass Fish Esb Launch Feb10 2009 Part A Frank K
Glass Fish Esb Launch Feb10 2009 Part A Frank KGlass Fish Esb Launch Feb10 2009 Part A Frank K
Glass Fish Esb Launch Feb10 2009 Part A Frank KEduardo Pelegri-Llopart
 
corporateJavascript
corporateJavascriptcorporateJavascript
corporateJavascriptclimboid
 
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...OSCON Byrum
 
Moving From JavaScript to TypeScript: Things Developers Should Know
Moving From JavaScript to TypeScript: Things Developers Should KnowMoving From JavaScript to TypeScript: Things Developers Should Know
Moving From JavaScript to TypeScript: Things Developers Should KnowFibonalabs
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Abdelkrim Boujraf
 
Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012Maxim Zaks
 
The art and pain of teaching JavaScript
The art and pain of teaching JavaScriptThe art and pain of teaching JavaScript
The art and pain of teaching JavaScriptChristian Heilmann
 
Planning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsPlanning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsChristian Heilmann
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.jsSolution Analysts
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.jsSolution Analysts
 
DevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesDevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesFab L
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedJoão Pedro Martins
 
Javascript Framework Roundup FYB
Javascript Framework Roundup FYBJavascript Framework Roundup FYB
Javascript Framework Roundup FYBnukeevry1
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistMark Fayngersh
 
The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...
The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...
The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...Alan Quayle
 
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdfRocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdfAlberto Salazar
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...DevSecCon
 

Similaire à Introduction to Ext JS 4 (20)

Back To The Future.Key 2
Back To The Future.Key 2Back To The Future.Key 2
Back To The Future.Key 2
 
Glass Fish Esb Launch Feb10 2009 Part A Frank K
Glass Fish Esb Launch Feb10 2009 Part A Frank KGlass Fish Esb Launch Feb10 2009 Part A Frank K
Glass Fish Esb Launch Feb10 2009 Part A Frank K
 
corporateJavascript
corporateJavascriptcorporateJavascript
corporateJavascript
 
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...Using and Building Open Source in Google Corporate Engineering - Justin McWil...
Using and Building Open Source in Google Corporate Engineering - Justin McWil...
 
Moving From JavaScript to TypeScript: Things Developers Should Know
Moving From JavaScript to TypeScript: Things Developers Should KnowMoving From JavaScript to TypeScript: Things Developers Should Know
Moving From JavaScript to TypeScript: Things Developers Should Know
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
 
Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012Test Essentials @mdevcon 2012
Test Essentials @mdevcon 2012
 
The art and pain of teaching JavaScript
The art and pain of teaching JavaScriptThe art and pain of teaching JavaScript
The art and pain of teaching JavaScript
 
Planning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsPlanning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teams
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.js
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.js
 
DevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesDevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation Slides
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
 
GWT Reloaded
GWT ReloadedGWT Reloaded
GWT Reloaded
 
Fuji Overview
Fuji OverviewFuji Overview
Fuji Overview
 
Javascript Framework Roundup FYB
Javascript Framework Roundup FYBJavascript Framework Roundup FYB
Javascript Framework Roundup FYB
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
 
The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...
The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...
The Difference Between Your Project Succeeding or Burning To A Crisp Is Actua...
 
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdfRocking the microservice world with Helidon-LAOUCTour2023.pdf
Rocking the microservice world with Helidon-LAOUCTour2023.pdf
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
 

Dernier

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Introduction to Ext JS 4

  • 1. Slide 1 TEQneers GmbH & Co. KG www.teqneers.de
  • 2. Who? ‣ Stefan Gehrig ‣ @sgehrig ‣ gehrig@teqneers.de ‣ TEQneers GmbH & Co. KG, Stuttgart ‣ Software Architect, Senior Developer PHP & Javascript Slide 2 TEQneers GmbH & Co. KG www.teqneers.de
  • 3. Slide 3 TEQneers GmbH & Co. KG www.teqneers.de
  • 4. Products ‣ Ext JS 4.1 ‣ Sencha.io ‣ Ext JS 3.4 ‣ Ext Core ‣ Sencha GXT 3 ‣ Sencha SDK Tools ‣ Sencha Touch 2 ‣ JSBuilder ‣ Sencha Touch Charts ‣ Sencha Architect 2 ‣ Sencha Animator Slide 4 TEQneers GmbH & Co. KG www.teqneers.de
  • 5. History ‣ 01/2006 Jack Slocum developed an extension for YUI called yui-ext ‣ 06/2006 Ext JS 1.1 with adapters for YUI, jQuery or Prototype ‣ 04/2008 Ext JS 2.0 (dual license GPLv3 + commercial) ‣ 07/2009 Ext JS 3.0 ‣ 06/2010 Raphaël + jQTouch + theJIT + Ext JS = Sencha ‣ 05/2011 Sencha Touch 1.0 and Ext JS 4.0 ‣ 04/2012 Ext JS 4.1 ‣ 06/2012 Sencha Touch 2.0 Slide 5 TEQneers GmbH & Co. KG www.teqneers.de
  • 6. Some Ext JS experience? Slide 6 TEQneers GmbH & Co. KG www.teqneers.de
  • 7. Some Ext JS experience? ‣ Who has already used Javascript Frameworks? Slide 6 TEQneers GmbH & Co. KG www.teqneers.de
  • 8. Some Ext JS experience? ‣ Who has already used Javascript Frameworks? ‣ If so, which ones? Slide 6 TEQneers GmbH & Co. KG www.teqneers.de
  • 9. Some Ext JS experience? ‣ Who has already used Javascript Frameworks? ‣ If so, which ones? ‣ Who knows Ext JS? Slide 6 TEQneers GmbH & Co. KG www.teqneers.de
  • 10. Some Ext JS experience? ‣ Who has already used Javascript Frameworks? ‣ If so, which ones? ‣ Who knows Ext JS? ‣ Who has already worked with Ext JS? Slide 6 TEQneers GmbH & Co. KG www.teqneers.de
  • 11. Some Ext JS experience? ‣ Who has already used Javascript Frameworks? ‣ If so, which ones? ‣ Who knows Ext JS? ‣ Who has already worked with Ext JS? ‣ If so, which version(s)? Slide 6 TEQneers GmbH & Co. KG www.teqneers.de
  • 12. Ext JS 4.0/4.1 Slide 7 TEQneers GmbH & Co. KG www.teqneers.de
  • 13. What are we talking about? Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 14. What are we talking about? What is Ext JS? Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 15. What are we talking about? What is Ext JS? Widgets Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 16. What are we talking about? What is Ext JS? Widgets Layouts Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 17. What are we talking about? What is Ext JS? Widgets Layouts Data Package Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 18. What are we talking about? What is Ext JS? Widgets Layouts Data Package Class System Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 19. What are we talking about? What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 20. What are we talking about? What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 21. What are we talking about? What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 8 TEQneers GmbH & Co. KG www.teqneers.de
  • 22. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 9 TEQneers GmbH & Co. KG www.teqneers.de
  • 23. „Full-Stack“- Javascript-Framework Slide 10 TEQneers GmbH & Co. KG www.teqneers.de
  • 24. „Full-Stack“-Javascript-Framework Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 25. „Full-Stack“-Javascript-Framework ‣ Huge widget library Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 26. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ MVC application oriented code Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 27. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ MVC application oriented code ‣ Layouts Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 28. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ MVC application oriented code ‣ Layouts ‣ Data package Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 29. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ MVC application oriented code ‣ Layouts ‣ Data package ‣ Class system Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 30. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ MVC application oriented code ‣ Layouts ‣ Data package ‣ Class system ‣ DOM manipulation Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 31. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ MVC application oriented code ‣ Layouts ‣ Data package ‣ Class system ‣ DOM manipulation ‣ Templating Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 32. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ Drawing / charting ‣ MVC application oriented code ‣ Layouts ‣ Data package ‣ Class system ‣ DOM manipulation ‣ Templating Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 33. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ Drawing / charting ‣ MVC application ‣ AJAX oriented code (XMLHttpRequest) ‣ Layouts ‣ Data package ‣ Class system ‣ DOM manipulation ‣ Templating Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 34. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ Drawing / charting ‣ MVC application ‣ AJAX oriented code (XMLHttpRequest) ‣ Layouts ‣ Utilities ‣ Data package ‣ Class system ‣ DOM manipulation ‣ Templating Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 35. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ Drawing / charting ‣ MVC application ‣ AJAX oriented code (XMLHttpRequest) ‣ Layouts ‣ Utilities ‣ Data package ‣ Well documented API, clean code ‣ Class system ‣ DOM manipulation ‣ Templating Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 36. „Full-Stack“-Javascript-Framework ‣ Huge widget library ‣ Drawing / charting ‣ MVC application ‣ AJAX oriented code (XMLHttpRequest) ‣ Layouts ‣ Utilities ‣ Data package ‣ Well documented API, clean code ‣ Class system ‣ Re-usable code, ‣ DOM manipulation excellent cross- browser compatibility ‣ Templating Slide 11 TEQneers GmbH & Co. KG www.teqneers.de
  • 37. Structure Slide 12 TEQneers GmbH & Co. KG www.teqneers.de
  • 38. Structure Slide 13 TEQneers GmbH & Co. KG www.teqneers.de
  • 39. Structure Slide 14 TEQneers GmbH & Co. KG www.teqneers.de
  • 40. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 15 TEQneers GmbH & Co. KG www.teqneers.de
  • 41. Ext.button.Button Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 42. Ext.button.Button Ext.create('Ext.Button', { ! text: 'Click me', ! renderTo: Ext.getBody(), ! handler: function() { ! ! alert('You clicked the button!'); ! } }); Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 43. Ext.button.Button Ext.create('Ext.Button', { ! text: 'Click me', ! renderTo: Ext.getBody(), ! handler: function() { ! ! alert('You clicked the button!'); ! } }); Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 44. Ext.button.Button Ext.create('Ext.Button', { ! text: 'Click me', ! renderTo: Ext.getBody(), ! handler: function() { ! ! alert('You clicked the button!'); ! } }); Ext.create('Ext.Button', { renderTo: Ext.getBody(), text: 'Click Me', enableToggle: true }); Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 45. Ext.button.Button Ext.create('Ext.Button', { ! text: 'Click me', ! renderTo: Ext.getBody(), ! handler: function() { ! ! alert('You clicked the button!'); ! } }); Ext.create('Ext.Button', { renderTo: Ext.getBody(), text: 'Click Me', enableToggle: true }); Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 46. Ext.button.Button Ext.create('Ext.Button', { ! text: 'Click me', ! renderTo: Ext.getBody(), ! handler: function() { ! ! alert('You clicked the button!'); ! } }); Ext.create('Ext.Button', { renderTo: Ext.getBody(), text: 'Click Me', enableToggle: true }); Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 47. Ext.button.Button Ext.create('Ext.Button', { ! text: 'Click me', ! renderTo: Ext.getBody(), ! handler: function() { ! ! alert('You clicked the button!'); ! } }); Ext.create('Ext.Button', { renderTo: Ext.getBody(), text: 'Click Me', enableToggle: true }); Ext.create('Ext.Button', { text : 'Menu button', renderTo : Ext.getBody(), menu : [ {text: 'Item 1'}, {text: 'Item 2'}, {text: 'Item 3'}, {text: 'Item 4'} ] }); Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 48. Ext.button.Button Ext.create('Ext.Button', { ! text: 'Click me', ! renderTo: Ext.getBody(), ! handler: function() { ! ! alert('You clicked the button!'); ! } }); Ext.create('Ext.Button', { renderTo: Ext.getBody(), text: 'Click Me', enableToggle: true }); Ext.create('Ext.Button', { text : 'Menu button', renderTo : Ext.getBody(), menu : [ {text: 'Item 1'}, {text: 'Item 2'}, {text: 'Item 3'}, {text: 'Item 4'} ] }); Slide 16 TEQneers GmbH & Co. KG www.teqneers.de
  • 49. Ext.form.Panel / Ext.form.* Slide 17 TEQneers GmbH & Co. KG www.teqneers.de
  • 50. Ext.form.Panel / Ext.form.* Ext.create('Ext.form.Panel', { ! frame: true, ! title: 'Form Fields', ! width: 340, ! renderTo: Ext.getBody(), ! bodyPadding: 5, ! fieldDefaults: { ! ! labelAlign: 'left', ! ! labelWidth: 90, ! ! anchor: '100%' ! }, ! items: [{ ! ! xtype: 'textfield', ! ! name: 'textfield1', ! ! fieldLabel: 'Text field', ! ! value: 'Text field value' ! }, { ! ! xtype: 'textfield', ! ! name: 'password1', ! ! inputType: 'password', ! ! fieldLabel: 'Password field' ! }, { ! ! xtype: 'filefield', ! ! name: 'file1', ! ! fieldLabel: 'File upload' ! }, { ! ! xtype: 'textareafield', ! ! name: 'textarea1', ! ! fieldLabel: 'TextArea', ! ! value: 'Textarea value' ! }, ...] }); Slide 17 TEQneers GmbH & Co. KG www.teqneers.de
  • 51. Ext.form.Panel / Ext.form.* Ext.create('Ext.form.Panel', { ! frame: true, ! title: 'Form Fields', ! width: 340, ! renderTo: Ext.getBody(), ! bodyPadding: 5, ! fieldDefaults: { ! ! labelAlign: 'left', ! ! labelWidth: 90, ! ! anchor: '100%' ! }, ! items: [{ ! ! xtype: 'textfield', ! ! name: 'textfield1', ! ! fieldLabel: 'Text field', ! ! value: 'Text field value' ! }, { ! ! xtype: 'textfield', ! ! name: 'password1', ! ! inputType: 'password', ! ! fieldLabel: 'Password field' ! }, { ! ! xtype: 'filefield', ! ! name: 'file1', ! ! fieldLabel: 'File upload' ! }, { ! ! xtype: 'textareafield', ! ! name: 'textarea1', ! ! fieldLabel: 'TextArea', ! ! value: 'Textarea value' ! }, ...] }); Slide 17 TEQneers GmbH & Co. KG www.teqneers.de
  • 52. Ext.grid.Panel Slide 18 TEQneers GmbH & Co. KG www.teqneers.de
  • 53. Ext.grid.Panel Ext.create('Ext.data.Store', { storeId:'simpsonsStore', fields:['name', 'email', 'phone'], data:{'items':[ { 'name': 'Lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" }, { 'name': 'Bart', "email":"bart@simpsons.com", "phone":"555-222-1234" }, { 'name': 'Homer', "email":"home@simpsons.com", "phone":"555-222-1244" }, { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254" } ]}, proxy: { type: 'memory', reader: { type: 'json', root: 'items' } } }); Ext.create('Ext.grid.Panel', { title: 'Simpsons', store: Ext.data.StoreManager.lookup('simpsonsStore'), columns: [ { header: 'Name', dataIndex: 'name' }, { header: 'Email', dataIndex: 'email', flex: 1 }, { header: 'Phone', dataIndex: 'phone' } ], height: 200, width: 400, renderTo: Ext.getBody() }); Slide 18 TEQneers GmbH & Co. KG www.teqneers.de
  • 54. Ext.grid.Panel Ext.create('Ext.data.Store', { storeId:'simpsonsStore', fields:['name', 'email', 'phone'], data:{'items':[ { 'name': 'Lisa', "email":"lisa@simpsons.com", "phone":"555-111-1224" }, { 'name': 'Bart', "email":"bart@simpsons.com", "phone":"555-222-1234" }, { 'name': 'Homer', "email":"home@simpsons.com", "phone":"555-222-1244" }, { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254" } ]}, proxy: { type: 'memory', reader: { type: 'json', root: 'items' } } }); Ext.create('Ext.grid.Panel', { title: 'Simpsons', store: Ext.data.StoreManager.lookup('simpsonsStore'), columns: [ { header: 'Name', dataIndex: 'name' }, { header: 'Email', dataIndex: 'email', flex: 1 }, { header: 'Phone', dataIndex: 'phone' } ], height: 200, width: 400, renderTo: Ext.getBody() }); Slide 18 TEQneers GmbH & Co. KG www.teqneers.de
  • 55. Ext.panel.Panel Slide 19 TEQneers GmbH & Co. KG www.teqneers.de
  • 56. Ext.panel.Panel Ext.create('Ext.panel.Panel', { bodyPadding: 5, width: 300, title: 'Filters', items: [{ xtype: 'datefield', fieldLabel: 'Start date' }, { xtype: 'datefield', fieldLabel: 'End date' }], renderTo: Ext.getBody() }); Slide 19 TEQneers GmbH & Co. KG www.teqneers.de
  • 57. Ext.panel.Panel Ext.create('Ext.panel.Panel', { bodyPadding: 5, width: 300, title: 'Filters', items: [{ xtype: 'datefield', fieldLabel: 'Start date' }, { xtype: 'datefield', fieldLabel: 'End date' }], renderTo: Ext.getBody() }); Slide 19 TEQneers GmbH & Co. KG www.teqneers.de
  • 58. Ext.slider.* Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 59. Ext.slider.* Ext.create('Ext.slider.Single', { width: 200, value: 50, increment: 10, minValue: 0, maxValue: 100, renderTo: Ext.getBody() }); Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 60. Ext.slider.* Ext.create('Ext.slider.Single', { width: 200, value: 50, increment: 10, minValue: 0, maxValue: 100, renderTo: Ext.getBody() }); Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 61. Ext.slider.* Ext.create('Ext.slider.Single', { width: 200, value: 50, increment: 10, minValue: 0, maxValue: 100, renderTo: Ext.getBody() }); Ext.create('Ext.slider.Multi', { width: 200, values: [25, 50, 75], increment: 5, minValue: 0, maxValue: 100, constrainThumbs: false, renderTo: Ext.getBody() }); Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 62. Ext.slider.* Ext.create('Ext.slider.Single', { width: 200, value: 50, increment: 10, minValue: 0, maxValue: 100, renderTo: Ext.getBody() }); Ext.create('Ext.slider.Multi', { width: 200, values: [25, 50, 75], increment: 5, minValue: 0, maxValue: 100, constrainThumbs: false, renderTo: Ext.getBody() }); Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 63. Ext.slider.* Ext.create('Ext.slider.Single', { Ext.create('Ext.slider.Single', { width: 200, width: 214, value: 50, minValue: 0, increment: 10, maxValue: 100, minValue: 0, useTips: true, maxValue: 100, tipText: function(thumb){ renderTo: Ext.getBody() return Ext.String.format('**{0}% complete**', thumb.value); }); }, renderTo: Ext.getBody() }); Ext.create('Ext.slider.Multi', { width: 200, values: [25, 50, 75], increment: 5, minValue: 0, maxValue: 100, constrainThumbs: false, renderTo: Ext.getBody() }); Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 64. Ext.slider.* Ext.create('Ext.slider.Single', { Ext.create('Ext.slider.Single', { width: 200, width: 214, value: 50, minValue: 0, increment: 10, maxValue: 100, minValue: 0, useTips: true, maxValue: 100, tipText: function(thumb){ renderTo: Ext.getBody() return Ext.String.format('**{0}% complete**', thumb.value); }); }, renderTo: Ext.getBody() }); Ext.create('Ext.slider.Multi', { width: 200, values: [25, 50, 75], increment: 5, minValue: 0, maxValue: 100, constrainThumbs: false, renderTo: Ext.getBody() }); Slide 20 TEQneers GmbH & Co. KG www.teqneers.de
  • 65. Ext.tab.Panel Slide 21 TEQneers GmbH & Co. KG www.teqneers.de
  • 66. Ext.tab.Panel Ext.create('Ext.tab.Panel', { width: 300, height: 200, activeTab: 0, items: [ { title: 'Tab 1', bodyPadding: 10, html : 'A simple tab' }, { title: 'Tab 2', html : 'Another one' } ], renderTo : Ext.getBody() }); Slide 21 TEQneers GmbH & Co. KG www.teqneers.de
  • 67. Ext.tab.Panel Ext.create('Ext.tab.Panel', { width: 300, height: 200, activeTab: 0, items: [ { title: 'Tab 1', bodyPadding: 10, html : 'A simple tab' }, { title: 'Tab 2', html : 'Another one' } ], renderTo : Ext.getBody() }); Slide 21 TEQneers GmbH & Co. KG www.teqneers.de
  • 68. Ext.toolbar.Toolbar Slide 22 TEQneers GmbH & Co. KG www.teqneers.de
  • 69. Ext.toolbar.Toolbar Ext.create('Ext.toolbar.Toolbar', { renderTo: document.body, width : 500, items: [ { text: 'Button' }, { xtype: 'splitbutton', text : 'Split Button' }, '->', { xtype : 'textfield', name : 'field1', emptyText: 'enter search term' }, '-', 'text 1', { xtype: 'tbspacer' }, 'text 2', { xtype: 'tbspacer', width: 50 }, 'text 3' ] }); Slide 22 TEQneers GmbH & Co. KG www.teqneers.de
  • 70. Ext.toolbar.Toolbar Ext.create('Ext.toolbar.Toolbar', { renderTo: document.body, width : 500, items: [ { text: 'Button' }, { xtype: 'splitbutton', text : 'Split Button' }, '->', { xtype : 'textfield', name : 'field1', emptyText: 'enter search term' }, '-', 'text 1', { xtype: 'tbspacer' }, 'text 2', { xtype: 'tbspacer', width: 50 }, 'text 3' ] }); Slide 22 TEQneers GmbH & Co. KG www.teqneers.de
  • 71. Ext.tree.Panel Slide 23 TEQneers GmbH & Co. KG www.teqneers.de
  • 72. Ext.tree.Panel var store = Ext.create('Ext.data.TreeStore', { root: { expanded: true, children: [ { text: "detention", leaf: true }, { text: "homework", expanded: true, children: [ { text: "book report", leaf: true }, { text: "alegrbra", leaf: true} ] }, { text: "buy lottery tickets", leaf: true } ] } }); Ext.create('Ext.tree.Panel', { title: 'Simple Tree', width: 200, height: 150, store: store, rootVisible: false, renderTo: Ext.getBody() }); Slide 23 TEQneers GmbH & Co. KG www.teqneers.de
  • 73. Ext.tree.Panel var store = Ext.create('Ext.data.TreeStore', { root: { expanded: true, children: [ { text: "detention", leaf: true }, { text: "homework", expanded: true, children: [ { text: "book report", leaf: true }, { text: "alegrbra", leaf: true} ] }, { text: "buy lottery tickets", leaf: true } ] } }); Ext.create('Ext.tree.Panel', { title: 'Simple Tree', width: 200, height: 150, store: store, rootVisible: false, renderTo: Ext.getBody() }); Slide 23 TEQneers GmbH & Co. KG www.teqneers.de
  • 74. Ext.window.MessageBox Slide 24 TEQneers GmbH & Co. KG www.teqneers.de
  • 75. Ext.window.MessageBox Ext.Msg.show({ title:'Save Changes?', msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', buttons: Ext.Msg.YESNOCANCEL, icon: Ext.Msg.QUESTION }); Slide 24 TEQneers GmbH & Co. KG www.teqneers.de
  • 76. Ext.window.MessageBox Ext.Msg.show({ title:'Save Changes?', msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', buttons: Ext.Msg.YESNOCANCEL, icon: Ext.Msg.QUESTION }); Slide 24 TEQneers GmbH & Co. KG www.teqneers.de
  • 77. Ext.window.Window Slide 25 TEQneers GmbH & Co. KG www.teqneers.de
  • 78. Ext.window.Window Ext.create('Ext.window.Window', { title: 'Hello', height: 200, width: 400, layout: 'fit', items: { xtype: 'grid', border: false, columns: [{header: 'World'}], store: Ext.create('Ext.data.ArrayStore', {}) } }).show(); Slide 25 TEQneers GmbH & Co. KG www.teqneers.de
  • 79. Ext.window.Window Ext.create('Ext.window.Window', { title: 'Hello', height: 200, width: 400, layout: 'fit', items: { xtype: 'grid', border: false, columns: [{header: 'World'}], store: Ext.create('Ext.data.ArrayStore', {}) } }).show(); Slide 25 TEQneers GmbH & Co. KG www.teqneers.de
  • 80. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 26 TEQneers GmbH & Co. KG www.teqneers.de
  • 81. Layouts ‣ Ext JS applications are build on components ‣ Containers are specialized components that contain other components (or containers) ‣ Sizing and positioning of a containers‘ children is determined by the specified layout Slide 27 TEQneers GmbH & Co. KG www.teqneers.de
  • 82. Ext.layout.* Slide 28 TEQneers GmbH & Co. KG www.teqneers.de
  • 83. Examples Slide 29 TEQneers GmbH & Co. KG www.teqneers.de
  • 84. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 30 TEQneers GmbH & Co. KG www.teqneers.de
  • 85. Overview Slide 31 TEQneers GmbH & Co. KG www.teqneers.de
  • 86. Overview Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 87. Overview ‣ implements Active Record pattern on the client side (sort of) Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 88. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 89. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of ‣ the underlying storage mechanism Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 90. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of ‣ the underlying storage mechanism ‣ remote (AJAX, JSON-P or Ext.direct) Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 91. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of ‣ the underlying storage mechanism ‣ remote (AJAX, JSON-P or Ext.direct) ‣ local (memory, local/session storage) Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 92. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of ‣ the underlying storage mechanism ‣ remote (AJAX, JSON-P or Ext.direct) ‣ local (memory, local/session storage) ‣ the data format Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 93. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of ‣ the underlying storage mechanism ‣ remote (AJAX, JSON-P or Ext.direct) ‣ local (memory, local/session storage) ‣ the data format ‣ JSON Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 94. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of ‣ the underlying storage mechanism ‣ remote (AJAX, JSON-P or Ext.direct) ‣ local (memory, local/session storage) ‣ the data format ‣ JSON ‣ XML Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 95. Overview ‣ implements Active Record pattern on the client side (sort of) ‣ abstracts CRUD operations regardless of ‣ the underlying storage mechanism ‣ remote (AJAX, JSON-P or Ext.direct) ‣ local (memory, local/session storage) ‣ the data format ‣ JSON ‣ XML ‣ works seamlessly with all data bound widgets Slide 32 TEQneers GmbH & Co. KG www.teqneers.de
  • 96. Example Slide 33 TEQneers GmbH & Co. KG www.teqneers.de
  • 97. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 34 TEQneers GmbH & Co. KG www.teqneers.de
  • 98. A class system in Javascript- why? Slide 35 TEQneers GmbH & Co. KG www.teqneers.de
  • 99. Javascript is a class- less, prototype-based language Slide 36 TEQneers GmbH & Co. KG www.teqneers.de
  • 100. Class System Slide 37 TEQneers GmbH & Co. KG www.teqneers.de
  • 101. Class System ‣ most developers are more familiar with class- based languages Slide 37 TEQneers GmbH & Co. KG www.teqneers.de
  • 102. Class System ‣ most developers are more familiar with class- based languages ‣ Code based on a class system is easier to handle Slide 37 TEQneers GmbH & Co. KG www.teqneers.de
  • 103. Class System ‣ most developers are more familiar with class- based languages ‣ Code based on a class system is easier to handle ‣ predictable strcutures Slide 37 TEQneers GmbH & Co. KG www.teqneers.de
  • 104. Class System ‣ most developers are more familiar with class- based languages ‣ Code based on a class system is easier to handle ‣ predictable strcutures ‣ easily identifiable extension points Slide 37 TEQneers GmbH & Co. KG www.teqneers.de
  • 105. Class System ‣ most developers are more familiar with class- based languages ‣ Code based on a class system is easier to handle ‣ predictable strcutures ‣ easily identifiable extension points ‣ less maintenance required Slide 37 TEQneers GmbH & Co. KG www.teqneers.de
  • 106. Example Ext.define('My.sample.Person', { name: 'Unknown', constructor: function(name) { if (name) { this.name = name; } }, eat: function(foodType) { console.log(this.name + " is eating: " + foodType); } }); Ext.define('My.sample.Tattletale', { ! extend: 'My.sample.Person', say: function(something) { console.log(this.name + " says: " + something); } }); var aaron = Ext.create('My.sample.Person', 'Aaron'); aaron.eat("Salad"); var maria = Ext.create('My.sample.Tattletale', 'Maria'); maria.eat("Sausage"); maria.say("Bla bla blub"); Slide 38 TEQneers GmbH & Co. KG www.teqneers.de
  • 107. Statics Ext.define('Computer', { statics: { instanceCount: 0, factory: function(brand) { return new this(brand); } }, ! brand: null, constructor: function(brand) { this.brand! = brand; this.self.instanceCount ++; } }); var dellComputer = Computer.factory('Dell'); var appleComputer = Computer.factory('Mac'); alert(appleComputer.brand); alert(Computer.instanceCount); Slide 39 TEQneers GmbH & Co. KG www.teqneers.de
  • 108. Config Ext.define('MyClass', { config: { title: 'Default Title' }, applyTitle: function(newTitle) { if (!Ext.isString(newTitle) || newTitle.length === 0) { throw 'Error: Title must be a valid non-empty string'; } else { return newTitle; } } ! /* ! getTitle: function() { return this.title; }, setTitle: function(newTitle) { this.title! = this.applyTitle(newTitle); } ! */ }); Slide 40 TEQneers GmbH & Co. KG www.teqneers.de
  • 109. Mixins Slide 41 TEQneers GmbH & Co. KG www.teqneers.de
  • 110. Singleton Ext.define('Logger', { singleton: true, log: function(msg) { console.log(msg); } }); Logger.log('Hello'); Slide 42 TEQneers GmbH & Co. KG www.teqneers.de
  • 111. The Class Definition Pipeline Slide 43 TEQneers GmbH & Co. KG www.teqneers.de
  • 112. Summary ‣ Class system combines classic and well-known methodologies with the dynamic nature of Javascript ‣ When sticking to the naming convention (compare to PSR-0 in PHP) Ext JS provides dynamic code loading (auto-loading) ‣ Class system is the foundation of the whole framework (more than 300 shipped classes) Slide 44 TEQneers GmbH & Co. KG www.teqneers.de
  • 113. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 45 TEQneers GmbH & Co. KG www.teqneers.de
  • 114. DOM Manipulation ‣ comparable to the functionality provided by jQuery ‣ not as sophisticated ‣ not as fast ‣ syntax not as sleek ‣ but absolutely sufficient when working inside the widget system Slide 46 TEQneers GmbH & Co. KG www.teqneers.de
  • 115. Features Slide 47 TEQneers GmbH & Co. KG www.teqneers.de
  • 116. Features ‣ DOM manipulation Slide 47 TEQneers GmbH & Co. KG www.teqneers.de
  • 117. Features ‣ DOM manipulation ‣ DOM queries Slide 47 TEQneers GmbH & Co. KG www.teqneers.de
  • 118. Features ‣ DOM manipulation ‣ DOM queries ‣ Animations Slide 47 TEQneers GmbH & Co. KG www.teqneers.de
  • 119. Ext.dom.Helper var dh = Ext.DomHelper; // create shorthand alias var spec = { id: 'my-ul', tag: 'ul', cls: 'my-list', children: [ {tag: 'li', id: 'item0', html: 'List Item 0'}, {tag: 'li', id: 'item1', html: 'List Item 1'}, {tag: 'li', id: 'item2', html: 'List Item 2'} ] }; var list = dh.append( Ext.getBody(), spec ); dh.append(list, [ {tag: 'li', id: 'item3', html: 'List Item 3'}, {tag: 'li', id: 'item4', html: 'List Item 4'} ]); Slide 48 TEQneers GmbH & Co. KG www.teqneers.de
  • 120. Ext.dom.Helper - Templating var html = '<a id="{id}" href="{url}" class="nav">{text}</a>'; var tpl = Ext.DomHelper.createTemplate(html); tpl.append(Ext.getBody(), { id: 'link1', url: 'http://www.edspencer.net/', text: "Ed's Site" }); tpl.append(Ext.getBody(), { id: 'link2', url: 'http://www.dustindiaz.com/', text: "Dustin's Site" }); Slide 49 TEQneers GmbH & Co. KG www.teqneers.de
  • 121. Ext.dom.Query ‣ provides selector and XPath processing ‣ extendable with custom pseudo classes and matchers ‣ works on HTML and XML ‣ supports most of the CSS3 selectors spec and basic XPath Slide 50 TEQneers GmbH & Co. KG www.teqneers.de
  • 122. Animations var myComponent = Ext.create('Ext.Component', { renderTo: document.body, width: 200, height: 200, style: 'border: 1px solid red;' }); Ext.create('Ext.fx.Anim', { target: myComponent, duration: 1000, from: { width: 400 }, to: { width: 300, height: 300 } }); Slide 51 TEQneers GmbH & Co. KG www.teqneers.de
  • 123. Keyframes Ext.create('Ext.fx.Animator', { target: Ext.getBody().createChild({ style: { width: '100px', height: '100px', 'background-color': 'red' } }), duration: 10000, // 10 seconds keyframes: { 0: { opacity: 1, backgroundColor: 'FF0000' }, 20: { x: 30, opacity: 0.5 }, 40: { x: 130, backgroundColor: '0000FF' }, 60: { y: 80, opacity: 0.3 }, 80: { width: 200, y: 200 }, 100: { opacity: 1, backgroundColor: '00FF00' } } }); Slide 52 TEQneers GmbH & Co. KG www.teqneers.de
  • 124. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 53 TEQneers GmbH & Co. KG www.teqneers.de
  • 125. Utilities Slide 54 TEQneers GmbH & Co. KG www.teqneers.de
  • 126. Tools ‣ Ext.Array ‣ Ext.util.TextMetrics ‣ Ext.Number ‣ Collections ‣ Ext.Object ‣ HashMaps ‣ Ext.String ‣ Events & Tasks ‣ Ext.JSON ‣ Ext.Date ‣ Ext.Function ‣ Ext.util.Format Slide 55 TEQneers GmbH & Co. KG www.teqneers.de
  • 127. Templating Slide 56 TEQneers GmbH & Co. KG www.teqneers.de
  • 128. Templating var order!= ..., ! template = new Ext.XTemplate( '<table class="order">', ! '<tbody>', ! '<tpl for=".">', ! ! '<tpl for="OrderDetails">', ! ! ! '<tr class="{[xindex % 2 === 0 ? "even" : "odd"]}">', ! ! ! ! '<tpl if="xindex == 1">', ! ! ! ! ! '<th rowspan="{[xcount]}">{parent.Order.Id}</th>', ! ! ! ! '</tpl>', ! ! ! ! '<td>{#}.</td>', ! ! ! ! '<td>Product ID <b>{ProductId}</b></td>', ! ! ! ! '<td><tpl if="UnitPrice &gt; 15"><u>{UnitPrice:usMoney}</u></tpl><tpl if="UnitPrice &lt;= 15">{UnitPrice:usMoney}</tpl></td>', ! ! ! ! '<td>{Quantity * 0.5}</td>', ! ! ! '</tpl>', ! ! '</tr>', ! '</tpl>', ! '</tbody>', '</table>' ); // apply the CustomerOrders array to the template template.append('content', order.CustomerOrders); Slide 57 TEQneers GmbH & Co. KG www.teqneers.de
  • 129. Example Slide 58 TEQneers GmbH & Co. KG www.teqneers.de
  • 130. AJAX Slide 59 TEQneers GmbH & Co. KG www.teqneers.de
  • 131. Simple XMLHttpRequest Ext.Ajax.request({ url: 'some_page.php', success: function(response, opts) { var obj = Ext.decode(response.responseText); console.log(obj); }, failure: function(response, opts) { console.log('server-side failure with status code ' + response.status); } }); Slide 60 TEQneers GmbH & Co. KG www.teqneers.de
  • 132. Can even fake file uploads... Ext.Ajax.request({ url: 'upload.php', ! form: 'id_of_a_form_with_an_upload_element', ! isUpload: true, success: function(response, opts) { var obj = Ext.decode(response.responseText); console.dir(obj); }, failure: function(response, opts) { console.log('server-side failure with status code ' + response.status); } }); Slide 61 TEQneers GmbH & Co. KG www.teqneers.de
  • 133. Keyboard Navgation Slide 62 TEQneers GmbH & Co. KG www.teqneers.de
  • 134. Drag and Drop Slide 63 TEQneers GmbH & Co. KG www.teqneers.de
  • 135. Drawing Slide 64 TEQneers GmbH & Co. KG www.teqneers.de
  • 136. Drawing ‣ renders either ‣ SVG ‣ VML (IE < 9) Slide 65 TEQneers GmbH & Co. KG www.teqneers.de
  • 137. Examples Slide 66 TEQneers GmbH & Co. KG www.teqneers.de
  • 138. Charting Slide 67 TEQneers GmbH & Co. KG www.teqneers.de
  • 139. Charting Slide 68 TEQneers GmbH & Co. KG www.teqneers.de
  • 140. Charting ‣ relatively simple charting solution out of the box ‣ but: lacks a lot of features when compared to professional enterprise-grade solutions such as Highcharts JS for example Slide 69 TEQneers GmbH & Co. KG www.teqneers.de
  • 141. Example Slide 70 TEQneers GmbH & Co. KG www.teqneers.de
  • 142. What is Ext JS? Widgets Layouts Data Package Class System DOM Manipulation Miscellaneous Theming Slide 71 TEQneers GmbH & Co. KG www.teqneers.de
  • 143. Theming ‣ uses SASS and Compass as CSS pre-processor ‣ component UIs allow for easy extension / styling @include extjs-panel-ui( Ext.create('widget.panel', { 'bubble', ui: 'bubble', width: 300, $ui-header-font-size: 12px, height: 300, $ui-header-font-weight: bold, title: 'Panel with a bubble UI!' $ui-header-color: #0D2A59, }); $ui-header-background-color: #fff, $ui-header-background-gradient: null, $ui-border-color: #fff, $ui-border-radius: 4px, $ui-body-background-color: #fff, $ui-body-font-size: 14px ); Slide 72 TEQneers GmbH & Co. KG www.teqneers.de
  • 144. Questions? Slide 73 TEQneers GmbH & Co. KG www.teqneers.de
  • 145. Thank you, come again! Slide 74 TEQneers GmbH & Co. KG www.teqneers.de
  • 146. Links ‣ http://www.sencha.com/ ‣ http://www.sencha.com/products/extjs/ ‣ http://docs.sencha.com/ext-js/4-1/ ‣ Ext JS 4.1 ‣ http://www.sencha.com/blog/first-thoughts-on-ext-js/ ‣ http://www.sencha.com/blog/optimizing-ext-js-4-1-based-applications/ ‣ Class System ‣ http://www.sencha.com/learn/sencha-class-system/ ‣ http://www.sencha.com/blog/countdown-to-ext-js-4-dynamic-loading-and-new-class-system ‣ http://edspencer.net/2011/01/classes-in-ext-js-4-under-the-hood.html ‣ http://edspencer.net/2011/01/ext-js-4-the-class-definition-pipeline.html ‣ Data Package ‣ http://www.sencha.com/blog/countdown-to-ext-js-4-data-package/ ‣ http://www.sencha.com/blog/ext-js-4-anatomy-of-a-model/ ‣ http://edspencer.net/2011/02/proxies-extjs-4.html ‣ Templating ‣ http://sgehrig.github.com/Ext-Templating-Examples/ Slide 75 TEQneers GmbH & Co. KG www.teqneers.de

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. \n
  105. \n
  106. \n
  107. \n
  108. \n
  109. \n
  110. \n
  111. \n
  112. \n
  113. \n
  114. \n
  115. \n
  116. \n
  117. \n
  118. \n
  119. \n
  120. \n
  121. \n
  122. \n
  123. \n
  124. \n
  125. \n
  126. \n
  127. \n
  128. \n
  129. \n
  130. \n
  131. \n
  132. \n
  133. \n