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

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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 interpreternaman860154
 
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.pptxHampshireHUG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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 MenDelhi Call girls
 
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...Drew Madelung
 
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 2024Rafal Los
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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 WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
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...
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Featured

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.pdfmarketingartwork
 
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 2024Neil Kimberley
 
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)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 
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...Applitools
 
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 WorkGetSmarter
 

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