SlideShare uma empresa Scribd logo
1 de 11
jQCon
Condensed edition
Review
• Selector performance
  – ID
  – Tag name
  – Name, Class
• Use CSS classes to control state
• Specificity helps
  – Ex: $(‘div.ui-content’); instead of $(‘.ui-content’)
Performance
Visibility:                             Business:
    – Install Firebug & Yslow               – Performance is important for
    – Know what is slowing down               the product
      your page loads                       – Performance can be expensive
                                            – Optimize intelligently - weigh
                                              the LOE and the utility gained
Interactivity:
                                            – Performance is most important
    – Profile your $.ready                    to sites that get millions of hits
    – Minimize initialization on page
      load
                                        Tips:
                                            – Low hanging fruit first
Responsiveness:
                                            – Google Analytics to record data
    – throttle/debounce events                about your loads
                                            – 8-bit PNG's with alpha
Contextual jQuery
•   Handle initial state with CSS
•   Write reusable code
•   Delegate event handling
•   Anticipate user actions
    – Scrolling
    – Focus/blur
    – Typing
• .one()
Unit Testing
•   qUnit
•   qUnit
•   qUnit
•   And qUnit
Grunt
• Build tool for JS
• Included tasks
   – Creates scaffolding
   – Lint (JSHint)
   – Unit testing (qUnit)
   – Concat/Minify (UglifyJS)
PhantomJS
• Headless WebKit
  – Like the horseman? Why is this cool?
• Grunt + PhantomJS + qUnit = ?
DEMONSTRATION
Recap of Steps
•   brew install node
•   brew install phantomjs
•   npm install -g grunt
•   grunt -help (Optional)
•   grunt init (Optional)
•   grunt init:jquery
•   grunt qunit
Tools
•   YSlow, PageSpeed
•   JavaScript Errors Notifier Chrome Extension
•   iWebInspector
•   JSHint (for vim)
Resources
• Wiki pages
  – jQuery Conf 2012
  – Best Practices: jQuery
  – Web Dev Quirks
• Read more
  – Introducing Grunt
  – jQuery Plugins w/ Grunt & qUnit
  – https://github.com/cowboy/grunt
  – qUnit Intro

Mais conteúdo relacionado

Mais procurados

Juju, LXC, OpenStack: Fun with Private Clouds
Juju, LXC, OpenStack: Fun with Private CloudsJuju, LXC, OpenStack: Fun with Private Clouds
Juju, LXC, OpenStack: Fun with Private CloudsSameer Verma
 
Frontend architecture design for large(r) team final
Frontend architecture design for large(r) team   finalFrontend architecture design for large(r) team   final
Frontend architecture design for large(r) team finalChadchapol Vittavutkarnvej
 
Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsdavrous
 
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esCreating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esdavrous
 
Modular & Event driven UI Architecture
Modular & Event driven UI ArchitectureModular & Event driven UI Architecture
Modular & Event driven UI ArchitectureVytautas Butkus
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveChris O'Brien
 
Tibco advantage
Tibco advantageTibco advantage
Tibco advantageAbhi Arya
 
Paperclip
PaperclipPaperclip
Papercliptreby
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick startji guang
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.jsEugene Vozniuk
 
JavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de DatosJavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de Datosphilogb
 
Concepts on Mean Stack Development
Concepts on Mean Stack DevelopmentConcepts on Mean Stack Development
Concepts on Mean Stack DevelopmentChristopher Sharkey
 
From HTML to pixels on the Screen
From HTML to pixels on the ScreenFrom HTML to pixels on the Screen
From HTML to pixels on the ScreenIgor Talic
 
Developing for the mobile web
Developing for the mobile webDeveloping for the mobile web
Developing for the mobile webjoeysim
 
Web xr:vr getting started
Web xr:vr getting startedWeb xr:vr getting started
Web xr:vr getting startedWajdi Ben Rabah
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to ReactYos Riady
 
Sfd hanoi2012 nguyen ha duong yang node.js-intro
Sfd hanoi2012 nguyen ha duong yang   node.js-introSfd hanoi2012 nguyen ha duong yang   node.js-intro
Sfd hanoi2012 nguyen ha duong yang node.js-introVu Hung Nguyen
 

Mais procurados (20)

Deploy like a pro!
Deploy like a pro!Deploy like a pro!
Deploy like a pro!
 
Juju, LXC, OpenStack: Fun with Private Clouds
Juju, LXC, OpenStack: Fun with Private CloudsJuju, LXC, OpenStack: Fun with Private Clouds
Juju, LXC, OpenStack: Fun with Private Clouds
 
Frontend architecture design for large(r) team final
Frontend architecture design for large(r) team   finalFrontend architecture design for large(r) team   final
Frontend architecture design for large(r) team final
 
Unleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.jsUnleashing WebGL & WebAudio with babylon.js
Unleashing WebGL & WebAudio with babylon.js
 
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.esCreating 3D Worlds with WebGL and Babylon.js - Codemotion.es
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
 
Modular & Event driven UI Architecture
Modular & Event driven UI ArchitectureModular & Event driven UI Architecture
Modular & Event driven UI Architecture
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
 
Tibco advantage
Tibco advantageTibco advantage
Tibco advantage
 
Paperclip
PaperclipPaperclip
Paperclip
 
Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
 
Banquet 46
Banquet 46Banquet 46
Banquet 46
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.js
 
JavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de DatosJavaScript para Graficos y Visualizacion de Datos
JavaScript para Graficos y Visualizacion de Datos
 
Basics of VueJS
Basics of VueJSBasics of VueJS
Basics of VueJS
 
Concepts on Mean Stack Development
Concepts on Mean Stack DevelopmentConcepts on Mean Stack Development
Concepts on Mean Stack Development
 
From HTML to pixels on the Screen
From HTML to pixels on the ScreenFrom HTML to pixels on the Screen
From HTML to pixels on the Screen
 
Developing for the mobile web
Developing for the mobile webDeveloping for the mobile web
Developing for the mobile web
 
Web xr:vr getting started
Web xr:vr getting startedWeb xr:vr getting started
Web xr:vr getting started
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
Sfd hanoi2012 nguyen ha duong yang node.js-intro
Sfd hanoi2012 nguyen ha duong yang   node.js-introSfd hanoi2012 nguyen ha duong yang   node.js-intro
Sfd hanoi2012 nguyen ha duong yang node.js-intro
 

Semelhante a jQuery Conf 2012

Building assets on the fly with Node.js
Building assets on the fly with Node.jsBuilding assets on the fly with Node.js
Building assets on the fly with Node.jsAcquisio
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk GwtChris Schalk
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHPMarcos Quesada
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCPDana Hoffman
 
Google Dev Fest Presentation
Google Dev Fest PresentationGoogle Dev Fest Presentation
Google Dev Fest PresentationAndrew Mackenzie
 
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012Andrew Mackenzie
 
Intuit Kubernetes Journey
Intuit Kubernetes JourneyIntuit Kubernetes Journey
Intuit Kubernetes JourneyRavi Hari
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with DjangoRoger Barnes
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryAlek Davis
 
NDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDDNDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDDjbandi
 
Building Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBuilding Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBrian Lyttle
 
Ignacy Kowalczyk
Ignacy KowalczykIgnacy Kowalczyk
Ignacy KowalczykCodeFest
 
Drupal 7 - The Top 40 Core Modules and What They Mean for You
Drupal 7 - The Top 40 Core Modules and What They Mean for YouDrupal 7 - The Top 40 Core Modules and What They Mean for You
Drupal 7 - The Top 40 Core Modules and What They Mean for YouAcquia
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampHow to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampJesus Manuel Olivas
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend PerformanceThomas Weinert
 

Semelhante a jQuery Conf 2012 (20)

Building assets on the fly with Node.js
Building assets on the fly with Node.jsBuilding assets on the fly with Node.js
Building assets on the fly with Node.js
 
Devfest09 Cschalk Gwt
Devfest09 Cschalk GwtDevfest09 Cschalk Gwt
Devfest09 Cschalk Gwt
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
 
The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCP
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
Google Dev Fest Presentation
Google Dev Fest PresentationGoogle Dev Fest Presentation
Google Dev Fest Presentation
 
Google DevFest 2012 Presentation
Google DevFest 2012 PresentationGoogle DevFest 2012 Presentation
Google DevFest 2012 Presentation
 
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
 
Intuit Kubernetes Journey
Intuit Kubernetes JourneyIntuit Kubernetes Journey
Intuit Kubernetes Journey
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
NDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDDNDC 2011 - Building .NET Applications with BDD
NDC 2011 - Building .NET Applications with BDD
 
Building Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBuilding Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on Azure
 
Ignacy Kowalczyk
Ignacy KowalczykIgnacy Kowalczyk
Ignacy Kowalczyk
 
Drupal 7 - The Top 40 Core Modules and What They Mean for You
Drupal 7 - The Top 40 Core Modules and What They Mean for YouDrupal 7 - The Top 40 Core Modules and What They Mean for You
Drupal 7 - The Top 40 Core Modules and What They Mean for You
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCampHow to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
🐬 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
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Último (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

jQuery Conf 2012

  • 2. Review • Selector performance – ID – Tag name – Name, Class • Use CSS classes to control state • Specificity helps – Ex: $(‘div.ui-content’); instead of $(‘.ui-content’)
  • 3. Performance Visibility: Business: – Install Firebug & Yslow – Performance is important for – Know what is slowing down the product your page loads – Performance can be expensive – Optimize intelligently - weigh the LOE and the utility gained Interactivity: – Performance is most important – Profile your $.ready to sites that get millions of hits – Minimize initialization on page load Tips: – Low hanging fruit first Responsiveness: – Google Analytics to record data – throttle/debounce events about your loads – 8-bit PNG's with alpha
  • 4. Contextual jQuery • Handle initial state with CSS • Write reusable code • Delegate event handling • Anticipate user actions – Scrolling – Focus/blur – Typing • .one()
  • 5. Unit Testing • qUnit • qUnit • qUnit • And qUnit
  • 6. Grunt • Build tool for JS • Included tasks – Creates scaffolding – Lint (JSHint) – Unit testing (qUnit) – Concat/Minify (UglifyJS)
  • 7. PhantomJS • Headless WebKit – Like the horseman? Why is this cool? • Grunt + PhantomJS + qUnit = ?
  • 9. Recap of Steps • brew install node • brew install phantomjs • npm install -g grunt • grunt -help (Optional) • grunt init (Optional) • grunt init:jquery • grunt qunit
  • 10. Tools • YSlow, PageSpeed • JavaScript Errors Notifier Chrome Extension • iWebInspector • JSHint (for vim)
  • 11. Resources • Wiki pages – jQuery Conf 2012 – Best Practices: jQuery – Web Dev Quirks • Read more – Introducing Grunt – jQuery Plugins w/ Grunt & qUnit – https://github.com/cowboy/grunt – qUnit Intro

Notas do Editor

  1. Explain the format, # of attendees, the general vibeBreakout sessions
  2. Explain why the selector performance orderExplain why the specificity helps
  3. If it takes you more than a day to implement 1 increase in performance, it is probably not worthwhile. Gauge the effort with the importanceYslow - Initialization after page loadProfilingThrottle/debounce
  4. Initial state with CSS goes against jQuery Mobile, that may mean a change for UIE.Delegating event handling - CPU saved on initial binding: 1 container vs multiple child elementsExamples: - Scrolling – FB Like/audio/images - Focus/blur – form validation/autocomplete - Typing – load next pages in a multi-step process
  5. It seems that the jQuery community has chosen a unit testing framework unanimously.A unit testing framework is only a unit testing framework.qUnit has thrived because of Grunt & PhantomJS
  6. This was created by Ben Alman of Bocoup.He created this to solve many problems, but the biggest problem he solved was eliminating the configuration/setup phase of a project to use Linting, unit testing, and Concat/Minify.
  7. PhantomJS is cool because it runs like a phantom.Typical qUnit opens an actual browser, this runs on the command line.
  8. JSHint has plugins for other editors as well.
  9. Slides and notes from the conferencecan be found in the wikiBest PracticesWeb dev quirks – this may or may not be useful to you