SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
PRACTICAL EXTJS
                       TIPS AND TRICKS
           Techniques and hacks that saved my day


               Allen Liu                Oct 25, 2011


Wednesday, November 2, 11
Agenda
           About Allen Liu
           About ClickTime
           How we use ExtJS
           Tip: Scope Control
           Trick: Performance hacks
           Q&A




     October 25, 2011           © 2011 Clicktime.com, Inc.   2

Wednesday, November 2, 11
Allen Liu (badallen)




     October 25, 2011       © 2011 Clicktime.com, Inc.   3

Wednesday, November 2, 11
About Allen Liu (badallen)…
           Lead Developer @ ClickTime
           Loves Dogs & JavaScript
           Background:
              IT for global retailer
              Major consulting rm




     October 25, 2011                   © 2011 Clicktime.com, Inc.   4

Wednesday, November 2, 11
About ClickTime…
           SaaS
              Web timesheet and expense
                 reporting
              Founded in 1999
           Customers in 54 countries
              Small Business and
                 Fortune 500
           Located in San Francisco



     October 25, 2011               © 2011 Clicktime.com, Inc.   5

Wednesday, November 2, 11
About ClickTime…
           Agile Development
           C#, JavaScript, MSSQL
           n-tier architecture




     October 25, 2011           © 2011 Clicktime.com, Inc.   6

Wednesday, November 2, 11
About ClickTime…

                            Client Browser
                                                 JavaScript


                        ASP.NET (C#)              Web Services



                             Middle Tier (C#)

                                       MS SQL



     October 25, 2011                        © 2011 Clicktime.com, Inc.   7

Wednesday, November 2, 11
About ClickTime
           Why we chose Ext JS
              Started with Ext 2.x
           2 projects written with Sencha frameworks.
              ClickTime Web Timesheet (Ext JS 3.x)
              ClickTime Mobile Time & Expense (Sencha Touch)
           ClickTime ExtJS Demo




     October 25, 2011                 © 2011 Clicktime.com, Inc.   8

Wednesday, November 2, 11
Tip:
    Scope Control in Custom Components




     October 25, 2011       © 2011 Clicktime.com, Inc.   9

Wednesday, November 2, 11
Tip: Scope Control in Custom Components

           Ext JS Out-Of-The-Box UI Components are great
              Extending components is a great way to add
                 custom functionality
              We use CLOSURE to control the scope




     October 25, 2011                   © 2011 Clicktime.com, Inc.   10

Wednesday, November 2, 11
start of the function




                                                      private static members




                                                      private instance members




                                                         instance public
                                                         members


                      function execution
                      end of the function
Wednesday, November 2, 11
Wednesday, November 2, 11
Trick:



     October 25, 2011        © 2011 Clicktime.com, Inc.   13

Wednesday, November 2, 11
Trick: Performance Gains through
     Deception
           Our dev team needed to create a time entry
            page.




     October 25, 2011           © 2011 Clicktime.com, Inc.   14

Wednesday, November 2, 11
ComboBox             ComboBox     ComboBox      Button   Text fields   Custom field




                                         Panel 1
                                       Row Component




                                         Panel 2



Wednesday, November 2, 11
However, we would soon realize…


                              .
                          e … s !!!!
                     d b ent
               co ul
         h ere       mp    on
        T        Co
           00 0+
         1
                      !! !!!!
               DR UM
            RE
Wednesday, November 2, 11
9784
                            Not Good




                             ms
Wednesday, November 2, 11
A simple question…
           How do you create hundreds or thousands
            of Ext JS UI Components?




     October 25, 2011          © 2011 Clicktime.com, Inc.   18

Wednesday, November 2, 11
You Don’t.


Wednesday, November 2, 11
Let me ask again…
           What if you MUST create hundreds or
            thousands of Ext JS UI Components?


     You fake it.

     October 25, 2011          © 2011 Clicktime.com, Inc.   20

Wednesday, November 2, 11
This is an illusion…
            Not Actual Comboboxes
(hidden) Singleton                        Not Actual buttons
                          Column Cell Click Event
Combo box

                            Grid Panel
         (using CSS to have each cells looking like
                                   controls)
      Set value to the underlying record of the gridgrid to the
       Get value from the underlying record of the from the
      (hidden) combo box box
       (not hidden) combo            Not Actual Text Fields




Wednesday, November 2, 11
Ways to fake controls:
           EditorGridPanel
                  ○ Use CSS to style each cell
                  ○ Only works with Ext.form.Field components
           GridPanel (what we use)
                  ○ Use CSS style each cell
                  ○ Give Ext.grid.Column a hidden singleton object
                    that can be any Ext component
                  ○ Position and show the hidden singleton object
                    when users click on the matching grid panel cell



     October 25, 2011                     © 2011 Clicktime.com, Inc.   22

Wednesday, November 2, 11
Good UI, Fast UI
                     Let me show you how we lie.
                            Live Demo


Wednesday, November 2, 11
Summary
           Use EditorGridPanel is possible, otherwise…
           Use Ext.grid.Column object to fake UI components.
              Create a singleton UI component and its related functions
                 (bind/unbind) at Column’s “initComponent()” function.
              Use HTML/CSS to fake the cells to look like the actual UI
                 components at Column’s “renderer()” function.
              Bind the singleton at Column’s “processEvent()” function.
              Unbind the singleton at its “blur” event.




     October 25, 2011                   © 2011 Clicktime.com, Inc.
Wednesday, November 2, 11
<shameless plug>

                            Sign up for free demo at:
                            www.clicktime.com

                            Send resumes to:
                            jobs@clicktime.com


                            </shameless plug>



Wednesday, November 2, 11
Demo Source Code and Slide:
                www.clicktime.com/SenchaCon/2011.zip

                        Contact Info:
                    allen@clicktime.com
               www.twitter.com/badallentweets



Wednesday, November 2, 11
Thank you.

                            Go AL West!
                                          on my fantasy team!




Wednesday, November 2, 11
Q&A




Wednesday, November 2, 11

Mais conteúdo relacionado

Mais de Sencha

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

Mais de Sencha (20)

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

Último

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Community Code: ClickTime

  • 1. PRACTICAL EXTJS TIPS AND TRICKS Techniques and hacks that saved my day Allen Liu Oct 25, 2011 Wednesday, November 2, 11
  • 2. Agenda  About Allen Liu  About ClickTime  How we use ExtJS  Tip: Scope Control  Trick: Performance hacks  Q&A October 25, 2011 © 2011 Clicktime.com, Inc. 2 Wednesday, November 2, 11
  • 3. Allen Liu (badallen) October 25, 2011 © 2011 Clicktime.com, Inc. 3 Wednesday, November 2, 11
  • 4. About Allen Liu (badallen)…  Lead Developer @ ClickTime  Loves Dogs & JavaScript  Background:  IT for global retailer  Major consulting rm October 25, 2011 © 2011 Clicktime.com, Inc. 4 Wednesday, November 2, 11
  • 5. About ClickTime…  SaaS  Web timesheet and expense reporting  Founded in 1999  Customers in 54 countries  Small Business and Fortune 500  Located in San Francisco October 25, 2011 © 2011 Clicktime.com, Inc. 5 Wednesday, November 2, 11
  • 6. About ClickTime…  Agile Development  C#, JavaScript, MSSQL  n-tier architecture October 25, 2011 © 2011 Clicktime.com, Inc. 6 Wednesday, November 2, 11
  • 7. About ClickTime… Client Browser JavaScript ASP.NET (C#) Web Services Middle Tier (C#) MS SQL October 25, 2011 © 2011 Clicktime.com, Inc. 7 Wednesday, November 2, 11
  • 8. About ClickTime  Why we chose Ext JS  Started with Ext 2.x  2 projects written with Sencha frameworks.  ClickTime Web Timesheet (Ext JS 3.x)  ClickTime Mobile Time & Expense (Sencha Touch)  ClickTime ExtJS Demo October 25, 2011 © 2011 Clicktime.com, Inc. 8 Wednesday, November 2, 11
  • 9. Tip: Scope Control in Custom Components October 25, 2011 © 2011 Clicktime.com, Inc. 9 Wednesday, November 2, 11
  • 10. Tip: Scope Control in Custom Components  Ext JS Out-Of-The-Box UI Components are great  Extending components is a great way to add custom functionality  We use CLOSURE to control the scope October 25, 2011 © 2011 Clicktime.com, Inc. 10 Wednesday, November 2, 11
  • 11. start of the function private static members private instance members instance public members function execution end of the function Wednesday, November 2, 11
  • 13. Trick: October 25, 2011 © 2011 Clicktime.com, Inc. 13 Wednesday, November 2, 11
  • 14. Trick: Performance Gains through Deception  Our dev team needed to create a time entry page. October 25, 2011 © 2011 Clicktime.com, Inc. 14 Wednesday, November 2, 11
  • 15. ComboBox ComboBox ComboBox Button Text fields Custom field Panel 1 Row Component Panel 2 Wednesday, November 2, 11
  • 16. However, we would soon realize… . e … s !!!! d b ent co ul h ere mp on T Co 00 0+ 1 !! !!!! DR UM RE Wednesday, November 2, 11
  • 17. 9784 Not Good ms Wednesday, November 2, 11
  • 18. A simple question…  How do you create hundreds or thousands of Ext JS UI Components? October 25, 2011 © 2011 Clicktime.com, Inc. 18 Wednesday, November 2, 11
  • 20. Let me ask again…  What if you MUST create hundreds or thousands of Ext JS UI Components? You fake it. October 25, 2011 © 2011 Clicktime.com, Inc. 20 Wednesday, November 2, 11
  • 21. This is an illusion… Not Actual Comboboxes (hidden) Singleton Not Actual buttons Column Cell Click Event Combo box Grid Panel (using CSS to have each cells looking like controls) Set value to the underlying record of the gridgrid to the Get value from the underlying record of the from the (hidden) combo box box (not hidden) combo Not Actual Text Fields Wednesday, November 2, 11
  • 22. Ways to fake controls:  EditorGridPanel ○ Use CSS to style each cell ○ Only works with Ext.form.Field components  GridPanel (what we use) ○ Use CSS style each cell ○ Give Ext.grid.Column a hidden singleton object that can be any Ext component ○ Position and show the hidden singleton object when users click on the matching grid panel cell October 25, 2011 © 2011 Clicktime.com, Inc. 22 Wednesday, November 2, 11
  • 23. Good UI, Fast UI Let me show you how we lie. Live Demo Wednesday, November 2, 11
  • 24. Summary  Use EditorGridPanel is possible, otherwise…  Use Ext.grid.Column object to fake UI components.  Create a singleton UI component and its related functions (bind/unbind) at Column’s “initComponent()” function.  Use HTML/CSS to fake the cells to look like the actual UI components at Column’s “renderer()” function.  Bind the singleton at Column’s “processEvent()” function.  Unbind the singleton at its “blur” event. October 25, 2011 © 2011 Clicktime.com, Inc. Wednesday, November 2, 11
  • 25. <shameless plug> Sign up for free demo at: www.clicktime.com Send resumes to: jobs@clicktime.com </shameless plug> Wednesday, November 2, 11
  • 26. Demo Source Code and Slide: www.clicktime.com/SenchaCon/2011.zip Contact Info: allen@clicktime.com www.twitter.com/badallentweets Wednesday, November 2, 11
  • 27. Thank you. Go AL West! on my fantasy team! Wednesday, November 2, 11