SlideShare una empresa de Scribd logo
1 de 80
Tangram
        berg



    infoQ
Agenda

• Challenges & dreams
• Architecture
• Tangram Base
• Tangram UI
Challenges & dreams
Response
as Fast as we can
Changing Every Day
Rich Internet Application
Legacy from 2001, new legacy everyday
The dreams

•
•   Javascript

•
Architecture
app

 widget

component

  base
app

 widget

component

  base
app

 widget

component

  base
app

 widget     UI




component

  base
app

 widget     UI




component

  base
Tangram base
Challenges
•
•
•
•
•
    • T.dom.addClass(ele, "highlight");
•
    • T.dom.addClass(ele, "highlight");
•
    • T.e("#container").addClass("highlight");
•
    • T.dom.addClass(ele, "highlight");
•
    • T.e("#container").addClass("highlight");
•
page:
startBaiduHI.js:




  Put Tangram in a clusure
Conclusions

•
•
•
Tangram UI
Challenges

•
    •
•
•
constructor
              ...


              ...


prototype
              ...
constructor




prototype
constructor
Plugin constructor



prototype




Plugin prototype
baidu.ui.Dialog.register(function(dialog){

      dialog.addEventListener("onload", function(){

        if(dialog.type == "alert"){

            baidu.dom.insertHTML(

             dialog.getId("footer"),

             "beforeEnd",

             getButtonString()

            );

        }

      });

});                                    Constructor
baidu.ui.Dialog.extend({

      okText : "     ",

      _ok : function(){

          this.close();

      }

});
                     Prototype
462   Dialog

 44   closeButton
 57   draggable
 54   iframe
 69   keyboard
 44   modal
 99   resizable
 26   smartCover
UI   =
Data




UI   =
Data

          +
UI   =
Data

          +
UI   =   DOM
Data

          +
UI   =   DOM

          +
Data

           +
UI   =   DOM

           +
         Control
Javascript
Data

           +
UI   =   DOM

           +
         Control
Data

           +
UI   =   DOM

           +
         Control
Data

           +
UI   =   DOM

           +
         Control
Javascript
DOM
DOM
HTML:
DOM
HTML:




Javascript:
Data

           +
UI   =   DOM

           +
         Control
Data

           +
UI   =   DOM

           +
         Control
Data

           +
UI   =   DOM

           +
         Control
UI
ui.Base




          ui.create




Button
ui.Base




          ui.create




Button
ui.Base




          ui.create    lang.Class



                      baidu

Button
ui.Base



     mix-in

          ui.create    lang.Class


            inherit   baidu

Button
button   dialog   table   ...
button   dialog   table         ...

                      alert

                     confirm

                      modal

                     keyboard

                          ...
button   dialog   table         ...

                               alert
draggable
                              confirm

stateable                      modal

                              keyboard
   ...
                                   ...
Conclusions
•
    •
    •
•
    •
About us
http://tangram.baidu.com
Conclusions
•
    •
    •
•       Javascript

•
Tangram
mp3

  IM




Tangram
             hao123
!anks
        berg
!anks
                berg



  Twitter: @cnberg
            : @berg
    i@cnberg.com

Más contenido relacionado

Similar a 百度前端的七巧板 - Tangram

Web Developing In Search
Web Developing In SearchWeb Developing In Search
Web Developing In Search
Frank Xu
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
Mihail Mateev
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
Romain Guy
 

Similar a 百度前端的七巧板 - Tangram (20)

How dojo works
How dojo worksHow dojo works
How dojo works
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
jQTouch at jQuery Conference 2010
jQTouch at jQuery Conference 2010jQTouch at jQuery Conference 2010
jQTouch at jQuery Conference 2010
 
MongoDB at ZPUGDC
MongoDB at ZPUGDCMongoDB at ZPUGDC
MongoDB at ZPUGDC
 
Web Developing In Search
Web Developing In SearchWeb Developing In Search
Web Developing In Search
 
Headless browser: puppeteer and git client : GitKraken
Headless browser: puppeteer and git client : GitKrakenHeadless browser: puppeteer and git client : GitKraken
Headless browser: puppeteer and git client : GitKraken
 
Famo.us introduction
Famo.us introductionFamo.us introduction
Famo.us introduction
 
Digging into your DevTools
Digging into your DevToolsDigging into your DevTools
Digging into your DevTools
 
Introduction to TypeScript
Introduction to TypeScriptIntroduction to TypeScript
Introduction to TypeScript
 
Mobile for the rest of us
Mobile for the rest of usMobile for the rest of us
Mobile for the rest of us
 
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumMobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0
 
Android Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's Perspective
 
Mobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance OptimizationMobile Web & HTML5 Performance Optimization
Mobile Web & HTML5 Performance Optimization
 
ICS3211 lecture 08
ICS3211 lecture 08ICS3211 lecture 08
ICS3211 lecture 08
 
Fluent 2012 v2
Fluent 2012   v2Fluent 2012   v2
Fluent 2012 v2
 
Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010
Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010
Go, Go, Gadgets: Building Gadgets for Atlassian Products - Atlassian Summit 2010
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
 
Google I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb HighlightsGoogle I/O 2011, Android Honeycomb Highlights
Google I/O 2011, Android Honeycomb Highlights
 
Extjs + Gears
Extjs + GearsExtjs + Gears
Extjs + Gears
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
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
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

百度前端的七巧板 - Tangram