SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

PDF
Deploy like a pro!
Damian Serrano Thode
 
PDF
Juju, LXC, OpenStack: Fun with Private Clouds
Sameer Verma
 
PPTX
Frontend architecture design for large(r) team final
Chadchapol Vittavutkarnvej
 
PPTX
Unleashing WebGL & WebAudio with babylon.js
davrous
 
PPTX
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
davrous
 
PPTX
Modular & Event driven UI Architecture
Vytautas Butkus
 
PPTX
SharePoint Ribbon Deep Dive
Chris O'Brien
 
PPTX
Tibco advantage
Abhi Arya
 
PDF
Paperclip
treby
 
PDF
Phantom js quick start
ji guang
 
PDF
Banquet 46
Koubei UED
 
PPTX
Decoupled drupal + vue.js
Eugene Vozniuk
 
PDF
JavaScript para Graficos y Visualizacion de Datos
philogb
 
ODP
Basics of VueJS
Squash Apps Pvt Ltd
 
PPTX
Concepts on Mean Stack Development
Christopher Sharkey
 
PPTX
From HTML to pixels on the Screen
Igor Talic
 
KEY
Developing for the mobile web
joeysim
 
PDF
Web xr:vr getting started
Wajdi Ben Rabah
 
PDF
Introduction to React
Yos Riady
 
ODP
Sfd hanoi2012 nguyen ha duong yang node.js-intro
Vu Hung Nguyen
 
Deploy like a pro!
Damian Serrano Thode
 
Juju, LXC, OpenStack: Fun with Private Clouds
Sameer Verma
 
Frontend architecture design for large(r) team final
Chadchapol Vittavutkarnvej
 
Unleashing WebGL & WebAudio with babylon.js
davrous
 
Creating 3D Worlds with WebGL and Babylon.js - Codemotion.es
davrous
 
Modular & Event driven UI Architecture
Vytautas Butkus
 
SharePoint Ribbon Deep Dive
Chris O'Brien
 
Tibco advantage
Abhi Arya
 
Paperclip
treby
 
Phantom js quick start
ji guang
 
Banquet 46
Koubei UED
 
Decoupled drupal + vue.js
Eugene Vozniuk
 
JavaScript para Graficos y Visualizacion de Datos
philogb
 
Basics of VueJS
Squash Apps Pvt Ltd
 
Concepts on Mean Stack Development
Christopher Sharkey
 
From HTML to pixels on the Screen
Igor Talic
 
Developing for the mobile web
joeysim
 
Web xr:vr getting started
Wajdi Ben Rabah
 
Introduction to React
Yos Riady
 
Sfd hanoi2012 nguyen ha duong yang node.js-intro
Vu Hung Nguyen
 

Similar to jQuery Conf 2012 (20)

PPTX
Building assets on the fly with Node.js
Acquisio
 
PDF
Devfest09 Cschalk Gwt
Chris Schalk
 
PDF
Grunt.js and Yeoman, Continous Integration
David Amend
 
ODP
Behat Workshop at WeLovePHP
Marcos Quesada
 
PDF
The Java alternative to Javascript
Manuel Carrasco Moñino
 
PDF
Infrastructure Management in GCP
Dana Hoffman
 
PDF
Guides To Analyzing WebKit Performance
National Cheng Kung University
 
PDF
Droidcon Paris 2015
Renaud Boulard
 
PDF
Google DevFest 2012 Presentation
Daniel Ruiz Giménez
 
PDF
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
Andrew Mackenzie
 
PDF
Google Dev Fest Presentation
Andrew Mackenzie
 
PDF
Intuit Kubernetes Journey
Ravi Hari
 
PDF
Towards Continuous Deployment with Django
Roger Barnes
 
PPTX
Introduction to jQuery
Alek Davis
 
PDF
NDC 2011 - Building .NET Applications with BDD
jbandi
 
PPTX
Building Mobile Web Apps with jQM and Cordova on Azure
Brian Lyttle
 
PDF
Ignacy Kowalczyk
CodeFest
 
PDF
Drupal 7 - The Top 40 Core Modules and What They Mean for You
Acquia
 
PDF
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
Jesus Manuel Olivas
 
PDF
Optimizing Your Frontend Performance
Thomas Weinert
 
Building assets on the fly with Node.js
Acquisio
 
Devfest09 Cschalk Gwt
Chris Schalk
 
Grunt.js and Yeoman, Continous Integration
David Amend
 
Behat Workshop at WeLovePHP
Marcos Quesada
 
The Java alternative to Javascript
Manuel Carrasco Moñino
 
Infrastructure Management in GCP
Dana Hoffman
 
Guides To Analyzing WebKit Performance
National Cheng Kung University
 
Droidcon Paris 2015
Renaud Boulard
 
Google DevFest 2012 Presentation
Daniel Ruiz Giménez
 
Developing TouchActive with GAE and GWT - Google DevFest Barcelona 2012
Andrew Mackenzie
 
Google Dev Fest Presentation
Andrew Mackenzie
 
Intuit Kubernetes Journey
Ravi Hari
 
Towards Continuous Deployment with Django
Roger Barnes
 
Introduction to jQuery
Alek Davis
 
NDC 2011 - Building .NET Applications with BDD
jbandi
 
Building Mobile Web Apps with jQM and Cordova on Azure
Brian Lyttle
 
Ignacy Kowalczyk
CodeFest
 
Drupal 7 - The Top 40 Core Modules and What They Mean for You
Acquia
 
How to keep Drupal relevant in the Git-based and API-driven CMS era - BADCamp
Jesus Manuel Olivas
 
Optimizing Your Frontend Performance
Thomas Weinert
 
Ad

Recently uploaded (20)

PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Ad

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

Editor's Notes

  • #2: Explain the format, # of attendees, the general vibeBreakout sessions
  • #3: Explain why the selector performance orderExplain why the specificity helps
  • #4: 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
  • #5: 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
  • #6: 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
  • #7: 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.
  • #8: PhantomJS is cool because it runs like a phantom.Typical qUnit opens an actual browser, this runs on the command line.
  • #11: JSHint has plugins for other editors as well.
  • #12: Slides and notes from the conferencecan be found in the wikiBest PracticesWeb dev quirks – this may or may not be useful to you