SlideShare a Scribd company logo
1 of 45
Download to read offline
Tictacs:Yahoo! Mail
                             add-ons
                             Gopal Venkatesan @g13n,
                             Yahoo! Mail FrontEnd Engineer




Wednesday, November 14, 12
Quick Demo ...



Wednesday, November 14, 12
Yahoo! Mail




Wednesday, November 14, 12
Yahoo! Mail
              • Full-fledged Ajax application




Wednesday, November 14, 12
Yahoo! Mail
              • Full-fledged Ajax application
              • (One of the) largest YUI3 based web
                     application




Wednesday, November 14, 12
Yahoo! Mail
              • Full-fledged Ajax application
              • (One of the) largest YUI3 based web
                     application
              • Built as YUI3 modules with build-time
                     dependency resolution for performance




Wednesday, November 14, 12
Yahoo! Mail
              • Full-fledged Ajax application
              • (One of the) largest YUI3 based web
                     application
              • Built as YUI3 modules with build-time
                     dependency resolution for performance
              • Extensively relies on YUI3 event, base and
                     widget infrastructure


Wednesday, November 14, 12
What is a Tictac?




Wednesday, November 14, 12
What is a Tictac?
              • Yahoo! Mail add-on




Wednesday, November 14, 12
What is a Tictac?
              • Yahoo! Mail add-on
              • Enhances UI, experience




Wednesday, November 14, 12
What is a Tictac?
              • Yahoo! Mail add-on
              • Enhances UI, experience
              • Examples:



Wednesday, November 14, 12
What is a Tictac?
              • Yahoo! Mail add-on
              • Enhances UI, experience
              • Examples:
                 • Attachments


Wednesday, November 14, 12
What is a Tictac?
              • Yahoo! Mail add-on
              • Enhances UI, experience
              • Examples:
                 • Attachments
                 • Photos

Wednesday, November 14, 12
What is a Tictac?
              • Yahoo! Mail add-on
              • Enhances UI, experience
              • Examples:
                 • Attachments
                 • Photos
                 • Calendar, RSVP
Wednesday, November 14, 12
Architecture Overview




Wednesday, November 14, 12
Architecture Overview
                    Yahoo!
                     Mail




Wednesday, November 14, 12
Architecture Overview
                    Yahoo!
                     Mail
                  Tictac Loader




Wednesday, November 14, 12
Architecture Overview
                    Yahoo!
                     Mail
                  Tictac Loader




Wednesday, November 14, 12
Architecture Overview
                    Yahoo!
                     Mail
                  Tictac Loader




                   Read config
                   from Cloud




Wednesday, November 14, 12
Architecture Overview
                    Yahoo!
                     Mail
                  Tictac Loader




                   Read config
                   from Cloud




Wednesday, November 14, 12
Architecture Overview
                    Yahoo!
                     Mail
                  Tictac Loader
                                   Bind add-ons to
                                  Mail [YUI3] events



                   Read config
                   from Cloud




Wednesday, November 14, 12
Architecture Overview
                    Yahoo!
                     Mail
                  Tictac Loader
                                   Bind add-ons to
                                  Mail [YUI3] events


                                  Invoke Y.Tictac[app].loader
                   Read config          on Y.after(event)
                   from Cloud




Wednesday, November 14, 12
App Config
          {
                      name: “attachment-app”,
                      url: “/path/to/main.js”,
                      event: “ymail:message-rendered”,
                      live: true
                      // ...
          }



Wednesday, November 14, 12
Deployment




Wednesday, November 14, 12
Deployment


              • App configuration dictates if its live/not




Wednesday, November 14, 12
Deployment


              • App configuration dictates if its live/not
              • Upon commit the configurations are
                     concatenated and pushed to “cloud”




Wednesday, November 14, 12
How it works?




Wednesday, November 14, 12
How it works?

              • Config reader (PHP) reads application
                     config from Cloud




Wednesday, November 14, 12
How it works?

              • Config reader (PHP) reads application
                     config from Cloud
              • Sets up YUI_config for app base



Wednesday, November 14, 12
How it works?

              • Config reader (PHP) reads application
                     config from Cloud
              • Sets up YUI_config for app base
              • Passes app configuration to JavaScript


Wednesday, November 14, 12
Client-side Code
          // modByEvent: { event: [ app1,
          app2, ... ], ... }
          Y.Object.each(modsByEvent,
                function (moduleList, event) {
                      // ...
                });




Wednesday, November 14, 12
Client-side Code

          Y.Object.each(modsByEvent,
                function (moduleList, event) {
                      Y.once(event, function (ev) {
                      });
                });




Wednesday, November 14, 12
Client-side Code
          Y.Object.each(modsByEvent,

               function (moduleList, event) {

                     Y.once(event, function (ev) {

                             Y.use(moduleList, function (Y) {

                             });

                     });

               });




Wednesday, November 14, 12
Client-side Code
          Y.Object.each(modsByEvent,
              function (moduleList, event) {

                   Y.once(event, function (ev) {

                       Y.use(moduleList, function (Y) {
                             Y.Array.each(moduleList, function (md) {

                               Y.after(event, Y.Tictac[md].loader);

                             });
                       });

                   });

              });




Wednesday, November 14, 12
Tictacs are usually
          Widgets




Wednesday, November 14, 12
Tictacs are usually
          Widgets
              • YUI.add()




Wednesday, November 14, 12
Tictacs are usually
          Widgets
              • YUI.add()
              • Y.extend(Tictac,Y.Widget, { /* ... */ })




Wednesday, November 14, 12
Tictacs are usually
          Widgets
              • YUI.add()
              • Y.extend(Tictac,Y.Widget, { /* ... */ })
                    •        initializer, bindUI, renderUI,
                             syncUI




Wednesday, November 14, 12
Tictacs are usually
          Widgets
              • YUI.add()
              • Y.extend(Tictac,Y.Widget, { /* ... */ })
                    •        initializer, bindUI, renderUI,
                             syncUI

              • ATTRS onChange and UI updates

Wednesday, November 14, 12
Conclusion




Wednesday, November 14, 12
Conclusion
              • Not tied to Yahoo! Mail release cycle




Wednesday, November 14, 12
Conclusion
              • Not tied to Yahoo! Mail release cycle
              • Loose coupling between Mail and the add-
                     on using events




Wednesday, November 14, 12
Conclusion
              • Not tied to Yahoo! Mail release cycle
              • Loose coupling between Mail and the add-
                     on using events
              • Clean API - Base and Widget


Wednesday, November 14, 12
Conclusion
              • Not tied to Yahoo! Mail release cycle
              • Loose coupling between Mail and the add-
                     on using events
              • Clean API - Base and Widget
              • Faster development - syntactic sugar and
                     stuff ...


Wednesday, November 14, 12
That’s it!


                 @g13n




Wednesday, November 14, 12

More Related Content

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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)
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Tictacs: Yahoo! Mail add-ons

  • 1. Tictacs:Yahoo! Mail add-ons Gopal Venkatesan @g13n, Yahoo! Mail FrontEnd Engineer Wednesday, November 14, 12
  • 2. Quick Demo ... Wednesday, November 14, 12
  • 4. Yahoo! Mail • Full-fledged Ajax application Wednesday, November 14, 12
  • 5. Yahoo! Mail • Full-fledged Ajax application • (One of the) largest YUI3 based web application Wednesday, November 14, 12
  • 6. Yahoo! Mail • Full-fledged Ajax application • (One of the) largest YUI3 based web application • Built as YUI3 modules with build-time dependency resolution for performance Wednesday, November 14, 12
  • 7. Yahoo! Mail • Full-fledged Ajax application • (One of the) largest YUI3 based web application • Built as YUI3 modules with build-time dependency resolution for performance • Extensively relies on YUI3 event, base and widget infrastructure Wednesday, November 14, 12
  • 8. What is a Tictac? Wednesday, November 14, 12
  • 9. What is a Tictac? • Yahoo! Mail add-on Wednesday, November 14, 12
  • 10. What is a Tictac? • Yahoo! Mail add-on • Enhances UI, experience Wednesday, November 14, 12
  • 11. What is a Tictac? • Yahoo! Mail add-on • Enhances UI, experience • Examples: Wednesday, November 14, 12
  • 12. What is a Tictac? • Yahoo! Mail add-on • Enhances UI, experience • Examples: • Attachments Wednesday, November 14, 12
  • 13. What is a Tictac? • Yahoo! Mail add-on • Enhances UI, experience • Examples: • Attachments • Photos Wednesday, November 14, 12
  • 14. What is a Tictac? • Yahoo! Mail add-on • Enhances UI, experience • Examples: • Attachments • Photos • Calendar, RSVP Wednesday, November 14, 12
  • 16. Architecture Overview Yahoo! Mail Wednesday, November 14, 12
  • 17. Architecture Overview Yahoo! Mail Tictac Loader Wednesday, November 14, 12
  • 18. Architecture Overview Yahoo! Mail Tictac Loader Wednesday, November 14, 12
  • 19. Architecture Overview Yahoo! Mail Tictac Loader Read config from Cloud Wednesday, November 14, 12
  • 20. Architecture Overview Yahoo! Mail Tictac Loader Read config from Cloud Wednesday, November 14, 12
  • 21. Architecture Overview Yahoo! Mail Tictac Loader Bind add-ons to Mail [YUI3] events Read config from Cloud Wednesday, November 14, 12
  • 22. Architecture Overview Yahoo! Mail Tictac Loader Bind add-ons to Mail [YUI3] events Invoke Y.Tictac[app].loader Read config on Y.after(event) from Cloud Wednesday, November 14, 12
  • 23. App Config { name: “attachment-app”, url: “/path/to/main.js”, event: “ymail:message-rendered”, live: true // ... } Wednesday, November 14, 12
  • 25. Deployment • App configuration dictates if its live/not Wednesday, November 14, 12
  • 26. Deployment • App configuration dictates if its live/not • Upon commit the configurations are concatenated and pushed to “cloud” Wednesday, November 14, 12
  • 27. How it works? Wednesday, November 14, 12
  • 28. How it works? • Config reader (PHP) reads application config from Cloud Wednesday, November 14, 12
  • 29. How it works? • Config reader (PHP) reads application config from Cloud • Sets up YUI_config for app base Wednesday, November 14, 12
  • 30. How it works? • Config reader (PHP) reads application config from Cloud • Sets up YUI_config for app base • Passes app configuration to JavaScript Wednesday, November 14, 12
  • 31. Client-side Code // modByEvent: { event: [ app1, app2, ... ], ... } Y.Object.each(modsByEvent, function (moduleList, event) { // ... }); Wednesday, November 14, 12
  • 32. Client-side Code Y.Object.each(modsByEvent, function (moduleList, event) { Y.once(event, function (ev) { }); }); Wednesday, November 14, 12
  • 33. Client-side Code Y.Object.each(modsByEvent, function (moduleList, event) { Y.once(event, function (ev) { Y.use(moduleList, function (Y) { }); }); }); Wednesday, November 14, 12
  • 34. Client-side Code Y.Object.each(modsByEvent, function (moduleList, event) { Y.once(event, function (ev) { Y.use(moduleList, function (Y) { Y.Array.each(moduleList, function (md) { Y.after(event, Y.Tictac[md].loader); }); }); }); }); Wednesday, November 14, 12
  • 35. Tictacs are usually Widgets Wednesday, November 14, 12
  • 36. Tictacs are usually Widgets • YUI.add() Wednesday, November 14, 12
  • 37. Tictacs are usually Widgets • YUI.add() • Y.extend(Tictac,Y.Widget, { /* ... */ }) Wednesday, November 14, 12
  • 38. Tictacs are usually Widgets • YUI.add() • Y.extend(Tictac,Y.Widget, { /* ... */ }) • initializer, bindUI, renderUI, syncUI Wednesday, November 14, 12
  • 39. Tictacs are usually Widgets • YUI.add() • Y.extend(Tictac,Y.Widget, { /* ... */ }) • initializer, bindUI, renderUI, syncUI • ATTRS onChange and UI updates Wednesday, November 14, 12
  • 41. Conclusion • Not tied to Yahoo! Mail release cycle Wednesday, November 14, 12
  • 42. Conclusion • Not tied to Yahoo! Mail release cycle • Loose coupling between Mail and the add- on using events Wednesday, November 14, 12
  • 43. Conclusion • Not tied to Yahoo! Mail release cycle • Loose coupling between Mail and the add- on using events • Clean API - Base and Widget Wednesday, November 14, 12
  • 44. Conclusion • Not tied to Yahoo! Mail release cycle • Loose coupling between Mail and the add- on using events • Clean API - Base and Widget • Faster development - syntactic sugar and stuff ... Wednesday, November 14, 12
  • 45. That’s it! @g13n Wednesday, November 14, 12