SlideShare a Scribd company logo
1 of 21
Download to read offline
jQuery Migration
   Migrating a site to jQuery




   Chris Pederick
   Yelp Learning Group 2011




This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Who?




Eastern Screetch Owl by t.davis photogrpahy
This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Who?


       • Lead front-end engineer at Bleacher Report
       • 4th largest sports media site
       • Nearly 20 million uniques and 500 million
               page views a month



This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
What?




 Cold Aluminum Board by Yasuhiro
 This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
What?


       • Ruby on Rails
       • JavaScript written on top of Prototype
       • Migrate to jQuery



This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Why?




White Boxer Puppy by Nic Adler
This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Why?


       •       Experience
       •       Popularity
       •       Simplicity
       •       Performance



This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
How?




How cute can you possibly get? by Ville Miettinen
This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Asset packager
       • Merges and compresses JavaScript into fewer
               files
       • Create new packages for the migration
       • Prefix new packages and directories
                 common:                                                         redesign_common:
                   - prototype                                                     - redesign/jquery
                   - lowpro                                                        - redesign/modernizr
                   - effects                                                       - redesign/namespace
                   - dragdrop                                                      - redesign/common
                   - controls                                                      - redesign/tooltips
                   ...                                                             ...
This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Layouts


       • Combined with the view to create a response
       • Create new layouts that use the new asset
               packages

                default.html.erb → redesign_default.html.erb




This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Page by page
       • Migrate pages by priority
                    •       Importance
                    •       Simplicity
                    •       Common functionality/code

       • Switch pages to new layouts and asset
               packages
       • Rewrite page specific code to use jQuery and
               create new asset packages for these

This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Clean up

       • Delete unused packages in the asset
               packager
       • Delete JavaScript files from the deleted asset
               packages
       • Delete old layouts
       • Rename all prefixed asset packages,
               directories and layouts to defaults

This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Plugins

       • Use existing plugins or write your own?
                    •       Problem already solved
                    •       Support
                    •       Complexity/performance

       • Wrap existing plugins with your own interface
                    •       Can switch plugins or replace with your own code without
                            changing every usage




This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Plugins

       • Choose a standard plugin for each solution
               that should be used by everyone
       • We are using three templating plugins
                    •       Tmpl
                    •       Tmpl2
                    •       Mustache




This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Design patterns
       (function() {
         BR.Feature                = {};
         BR.Feature.publicFunction = privateFunction;

            var variable = true;

            $(function() {
              // Run on page load
              initialize();
            });

            function initialize() {
              // Set up the feature
            }

         function privateFunction() {
           // Can be called by other code
         }
       })();


This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Design patterns



       • jQuery plugin patterns
               wintoni.us/post/123029056/jquery-plugin-patterns




This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Tools
       • Web Developer ☺
               chrispederick.com/work/web-developer/

       • Firebug
               getfirebug.com

       • Page Speed/YSlow
               code.google.com/speed/page-speed/
               developer.yahoo.com/yslow/

       • WebPagetest
               www.webpagetest.org


This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
WebPagetest


• Waterfall view
• Optimization checklist
• Content breakdown



This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
jQuery upgrades


       • QA (even point releases)
       • Identify “fragile” features/pages
       • Unit tests



This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Selector tests

       • Simple HTML page to test problematic
               selectors




        #link-to + ul .token-input-token:first p
        #tags-1 + ul .token-input-token:eq(1) p



This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
Questions?




Lemuren by baerchen57
This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License

More Related Content

Viewers also liked (9)

Differences Over Slavery
Differences Over SlaveryDifferences Over Slavery
Differences Over Slavery
 
Call To Arms
Call To ArmsCall To Arms
Call To Arms
 
The Cell & Inheritance
The Cell & InheritanceThe Cell & Inheritance
The Cell & Inheritance
 
Taxes
TaxesTaxes
Taxes
 
Conquests Shaam
Conquests ShaamConquests Shaam
Conquests Shaam
 
Reforming Spirit
Reforming SpiritReforming Spirit
Reforming Spirit
 
Control Weight app
Control Weight appControl Weight app
Control Weight app
 
Mr. Schumaier
Mr. SchumaierMr. Schumaier
Mr. Schumaier
 
Cyworld AppStore Weekly Report 2011-05-31
Cyworld AppStore Weekly Report 2011-05-31Cyworld AppStore Weekly Report 2011-05-31
Cyworld AppStore Weekly Report 2011-05-31
 

Similar to jQuery Migration

WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer Tools
WO Community
 
Own it: working with a changing open source community
Own it: working with a changing open source communityOwn it: working with a changing open source community
Own it: working with a changing open source community
Selena Deckelmann
 
ARTDM 171, Week 14: Multimedia on the Web
ARTDM 171, Week 14: Multimedia on the WebARTDM 171, Week 14: Multimedia on the Web
ARTDM 171, Week 14: Multimedia on the Web
Gilbert Guerrero
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletongDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
George Nguyen
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
Ulrich Krause
 

Similar to jQuery Migration (20)

Running Java Applications on Cloud Foundry
Running Java Applications on Cloud FoundryRunning Java Applications on Cloud Foundry
Running Java Applications on Cloud Foundry
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy way
 
Getting started with Vue.js - CodeMash 2020
Getting started with Vue.js - CodeMash 2020Getting started with Vue.js - CodeMash 2020
Getting started with Vue.js - CodeMash 2020
 
Build your next single page app in ClojureScript and re-frame
Build your next single page app in ClojureScript and re-frameBuild your next single page app in ClojureScript and re-frame
Build your next single page app in ClojureScript and re-frame
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer Tools
 
Own it: working with a changing open source community
Own it: working with a changing open source communityOwn it: working with a changing open source community
Own it: working with a changing open source community
 
Migrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring DevelopersMigrating to Angular 5 for Spring Developers
Migrating to Angular 5 for Spring Developers
 
The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL Templates
 
Tech Talk Live on Share Extensibility
Tech Talk Live on Share ExtensibilityTech Talk Live on Share Extensibility
Tech Talk Live on Share Extensibility
 
Migrating to Angular 4 for Spring Developers
Migrating to Angular 4 for Spring Developers Migrating to Angular 4 for Spring Developers
Migrating to Angular 4 for Spring Developers
 
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
 
Cypress report
Cypress reportCypress report
Cypress report
 
Writing an extensible web testing framework ready for the cloud slide share
Writing an extensible web testing framework ready for the cloud   slide shareWriting an extensible web testing framework ready for the cloud   slide share
Writing an extensible web testing framework ready for the cloud slide share
 
Band of brothers, building scalable social web apps on windows azure with asp...
Band of brothers, building scalable social web apps on windows azure with asp...Band of brothers, building scalable social web apps on windows azure with asp...
Band of brothers, building scalable social web apps on windows azure with asp...
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)
 
Surviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-studySurviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-study
 
ARTDM 171, Week 14: Multimedia on the Web
ARTDM 171, Week 14: Multimedia on the WebARTDM 171, Week 14: Multimedia on the Web
ARTDM 171, Week 14: Multimedia on the Web
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletongDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntf
 

Recently uploaded

Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 

jQuery Migration

  • 1. jQuery Migration Migrating a site to jQuery Chris Pederick Yelp Learning Group 2011 This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 2. Who? Eastern Screetch Owl by t.davis photogrpahy This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 3. Who? • Lead front-end engineer at Bleacher Report • 4th largest sports media site • Nearly 20 million uniques and 500 million page views a month This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 4. What? Cold Aluminum Board by Yasuhiro This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 5. What? • Ruby on Rails • JavaScript written on top of Prototype • Migrate to jQuery This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 6. Why? White Boxer Puppy by Nic Adler This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 7. Why? • Experience • Popularity • Simplicity • Performance This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 8. How? How cute can you possibly get? by Ville Miettinen This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 9. Asset packager • Merges and compresses JavaScript into fewer files • Create new packages for the migration • Prefix new packages and directories common: redesign_common: - prototype - redesign/jquery - lowpro - redesign/modernizr - effects - redesign/namespace - dragdrop - redesign/common - controls - redesign/tooltips ... ... This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 10. Layouts • Combined with the view to create a response • Create new layouts that use the new asset packages default.html.erb → redesign_default.html.erb This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 11. Page by page • Migrate pages by priority • Importance • Simplicity • Common functionality/code • Switch pages to new layouts and asset packages • Rewrite page specific code to use jQuery and create new asset packages for these This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 12. Clean up • Delete unused packages in the asset packager • Delete JavaScript files from the deleted asset packages • Delete old layouts • Rename all prefixed asset packages, directories and layouts to defaults This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 13. Plugins • Use existing plugins or write your own? • Problem already solved • Support • Complexity/performance • Wrap existing plugins with your own interface • Can switch plugins or replace with your own code without changing every usage This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 14. Plugins • Choose a standard plugin for each solution that should be used by everyone • We are using three templating plugins • Tmpl • Tmpl2 • Mustache This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 15. Design patterns (function() { BR.Feature = {}; BR.Feature.publicFunction = privateFunction; var variable = true; $(function() { // Run on page load initialize(); }); function initialize() { // Set up the feature } function privateFunction() { // Can be called by other code } })(); This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 16. Design patterns • jQuery plugin patterns wintoni.us/post/123029056/jquery-plugin-patterns This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 17. Tools • Web Developer ☺ chrispederick.com/work/web-developer/ • Firebug getfirebug.com • Page Speed/YSlow code.google.com/speed/page-speed/ developer.yahoo.com/yslow/ • WebPagetest www.webpagetest.org This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 18. WebPagetest • Waterfall view • Optimization checklist • Content breakdown This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 19. jQuery upgrades • QA (even point releases) • Identify “fragile” features/pages • Unit tests This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 20. Selector tests • Simple HTML page to test problematic selectors #link-to + ul .token-input-token:first p #tags-1 + ul .token-input-token:eq(1) p This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
  • 21. Questions? Lemuren by baerchen57 This presentation is distributed under the terms of the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License