SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

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
giselly40
 

Kürzlich hochgeladen (20)

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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

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