SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
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

Más contenido relacionado

Destacado

Destacado (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 a jQuery Migration

Running Java Applications on Cloud Foundry
Running Java Applications on Cloud FoundryRunning Java Applications on Cloud Foundry
Running Java Applications on Cloud FoundryVMware Tanzu
 
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 wayJohn Azariah
 
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 2020Burton Smith
 
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-framePaul Bostrom
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer ToolsWO 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 communitySelena Deckelmann
 
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 DevelopersGunnar Hillert
 
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 Just van den Broecke
 
Flexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesFlexible Permissions Management with ACL Templates
Flexible Permissions Management with ACL TemplatesJeff Potts
 
Tech Talk Live on Share Extensibility
Tech Talk Live on Share ExtensibilityTech Talk Live on Share Extensibility
Tech Talk Live on Share ExtensibilityAlfresco Software
 
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 VMware Tanzu
 
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
 
Cypress report
Cypress reportCypress report
Cypress reportAdarsh
 
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 shareMike Ensor
 
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...Marjan Nikolovski
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)Rajat Pratap Singh
 
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-studypeter_ibuildings
 
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 WebGilbert Guerrero
 
gDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletongDayX 2013 - Advanced AngularJS - Nicolas Embleton
gDayX 2013 - Advanced AngularJS - Nicolas EmbletonGeorge Nguyen
 
Dd13.2013.milano.open ntf
Dd13.2013.milano.open ntfDd13.2013.milano.open ntf
Dd13.2013.milano.open ntfUlrich Krause
 

Similar a 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
 

Último

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Último (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

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