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

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
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
 

Recently uploaded (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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?
 
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.
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
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
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

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