SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Aditya Gaur


Mentor: Apurba Nath
What?
   Yahoo User Interface
   Pronounced “Why-you-eye” or “yooey”
   Launched in Feb 2006
   It is a collection of javascript and css resources
  Simplifies building web applications
 Provides ready to use, configurable components
  such as datatable, charts, dialog boxes and other
  widgets.
YUI global object
 Starting point of YUI


 Dependency for all YUI implementation


 Instantiable object- can create as many instances
as we need
Putting YUI on Page (1/3)
<script type="text/javascript"
src="http://yui.yahooapis.com/3.0.0pr1/build/yui/yui-
min.js"></script>



                                             anim       dd
      Y UI Object
           +               http request
     Loader Utility
                                            node        json
Putting YUI on Page (1/3)
 YUI().use('node', function(Y) {
   Y.Node.get('#demo');
 });




    <script type="text/javascript" src="http://
    yui.yahooapis.com/combo?3.0.0pr1/build/oop/oop-
    min.js&3.0.0pr1/build/event/event-min.js&3.0.0pr1/
    build/dom/dom-min.js&3.0.0pr1/build/node/node-
    min.js"></script>


REUSE : If any of the modules is already present on the page,
then http request is not send
Putting YUI on Page (2/3)
  <script type="text/javascript"
  src="http://yui.yahooapis.com/3.0.0pr1/combo?build/yui/yui-
  base.js"></script>



                                                       anim     dd

Y UI Object                  Loader
              http request    Utility   http request

                                                       node     json
Putting YUI on Page (3/3)
The Classical way:
  <script type="text/javascript" src="http://
  yui.yahooapis.com/combo?3.0.0pr1/build/yui-base/yui-
  base-min.js&3.0.0pr1/build/oop/oop-min.js&3.0.0pr1/
  build/event/event-min.js&3.0.0pr1/build/dom/dom-
  min.js&3.0.0pr1/build/node/node-min.js"></script>



  YUI().use('*', function(Y) {
      Y.get('#demo');
  });
YUI global object: Advantages
 Instance based: Sandboxing
   o Each instance is separate
   o Multiple applications per page
   o Secure mashups
 Dynamic
   o Since loader is built into core so we don’t have
     to statically include all modules
 Namespace – Avoiding naming conflict
YUI3 vs YUI2
Global Variable
 YAHOO replaced by YUI


 Reasons:
     Some people don’t like YAHOO in their code
     Both the YUI 2 and YUI 3 code can co exist
Modularity
Modularity is good but “Sub Modularity” is better.


                               Datasource
                                   Y UI 2



                                   Y UI 3
Datasource   Datasource   Datasource    Datasource   Datasource   Datasource
    io          Local       P olling        Get      jsonschema    function
Loader
 In YUI 3 the loader is built into the core.


 In YUI 2, we have a loader utility:
  var loader = new YAHOO.util.YUILoader();
Loader (YUI 2)



                                     Module 1
<script src="module1.js"></script>



<script src="module1.js"></script>   Module 2




                                     Module 3
<script src="module1.js"></script>
Loader (YUI 3)


    YUI().use("module1“, "module2“ , "module3“,)



                       Y UI seed file




            Module 1        Module 2    Module 3
That’s it for YUI
mViewer Updates

    mViewer
Thank You

Mais conteúdo relacionado

Destaque

Destaque (6)

Wwaipt prior knowledge
Wwaipt prior knowledgeWwaipt prior knowledge
Wwaipt prior knowledge
 
CRM privacy whitepaper final
CRM privacy whitepaper finalCRM privacy whitepaper final
CRM privacy whitepaper final
 
Grails
GrailsGrails
Grails
 
Prototype
PrototypePrototype
Prototype
 
WMB
WMBWMB
WMB
 
Javascript
JavascriptJavascript
Javascript
 

Semelhante a Yui intro

Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
Tom Croucher
 
Liferay UI (R)evolution
Liferay UI (R)evolutionLiferay UI (R)evolution
Liferay UI (R)evolution
Zeno Rocha
 

Semelhante a Yui intro (20)

Running YUI 3 on Node.js - JSConf 2010
Running YUI 3 on Node.js - JSConf 2010Running YUI 3 on Node.js - JSConf 2010
Running YUI 3 on Node.js - JSConf 2010
 
Server Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yetServer Side JavaScript - You ain't seen nothing yet
Server Side JavaScript - You ain't seen nothing yet
 
JavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stackJavaScript Everywhere! Creating a 100% JavaScript web stack
JavaScript Everywhere! Creating a 100% JavaScript web stack
 
Hack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT KharagpurHack U - YUI - 2012 IIT Kharagpur
Hack U - YUI - 2012 IIT Kharagpur
 
Running YUI 3 on Node.js - BayJax
Running YUI 3 on Node.js - BayJaxRunning YUI 3 on Node.js - BayJax
Running YUI 3 on Node.js - BayJax
 
YUI for your Hacks
YUI for your Hacks YUI for your Hacks
YUI for your Hacks
 
YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU YUI3 - IIT Madras HackU
YUI3 - IIT Madras HackU
 
YUI 3
YUI 3YUI 3
YUI 3
 
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
YUI3 and AlloyUI Introduction for Pernambuco.JS 2012
 
YUI Basics
YUI BasicsYUI Basics
YUI Basics
 
YUIConf2013: Introducing The "Modown" Project
YUIConf2013: Introducing The "Modown" ProjectYUIConf2013: Introducing The "Modown" Project
YUIConf2013: Introducing The "Modown" Project
 
Hack with YUI
Hack with YUIHack with YUI
Hack with YUI
 
JS Loading strategies
JS Loading strategiesJS Loading strategies
JS Loading strategies
 
Embracing YUI3 and Frontend Perf
Embracing YUI3 and Frontend PerfEmbracing YUI3 and Frontend Perf
Embracing YUI3 and Frontend Perf
 
YUI Test The Next Generation (YUIConf 2010)
YUI Test The Next Generation (YUIConf 2010)YUI Test The Next Generation (YUIConf 2010)
YUI Test The Next Generation (YUIConf 2010)
 
Let's run JavaScript Everywhere
Let's run JavaScript EverywhereLet's run JavaScript Everywhere
Let's run JavaScript Everywhere
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
Liferay UI (R)evolution
Liferay UI (R)evolutionLiferay UI (R)evolution
Liferay UI (R)evolution
 
Security testing of YUI powered applications
Security testing of YUI powered applicationsSecurity testing of YUI powered applications
Security testing of YUI powered applications
 
YUI on the go
YUI on the goYUI on the go
YUI on the go
 

Ú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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
 

Último (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
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
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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
 
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
 
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 ...
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Yui intro

  • 2. What?  Yahoo User Interface  Pronounced “Why-you-eye” or “yooey”  Launched in Feb 2006  It is a collection of javascript and css resources  Simplifies building web applications  Provides ready to use, configurable components such as datatable, charts, dialog boxes and other widgets.
  • 3. YUI global object  Starting point of YUI  Dependency for all YUI implementation  Instantiable object- can create as many instances as we need
  • 4. Putting YUI on Page (1/3) <script type="text/javascript" src="http://yui.yahooapis.com/3.0.0pr1/build/yui/yui- min.js"></script> anim dd Y UI Object + http request Loader Utility node json
  • 5. Putting YUI on Page (1/3) YUI().use('node', function(Y) { Y.Node.get('#demo'); }); <script type="text/javascript" src="http:// yui.yahooapis.com/combo?3.0.0pr1/build/oop/oop- min.js&3.0.0pr1/build/event/event-min.js&3.0.0pr1/ build/dom/dom-min.js&3.0.0pr1/build/node/node- min.js"></script> REUSE : If any of the modules is already present on the page, then http request is not send
  • 6. Putting YUI on Page (2/3) <script type="text/javascript" src="http://yui.yahooapis.com/3.0.0pr1/combo?build/yui/yui- base.js"></script> anim dd Y UI Object Loader http request Utility http request node json
  • 7. Putting YUI on Page (3/3) The Classical way: <script type="text/javascript" src="http:// yui.yahooapis.com/combo?3.0.0pr1/build/yui-base/yui- base-min.js&3.0.0pr1/build/oop/oop-min.js&3.0.0pr1/ build/event/event-min.js&3.0.0pr1/build/dom/dom- min.js&3.0.0pr1/build/node/node-min.js"></script> YUI().use('*', function(Y) { Y.get('#demo'); });
  • 8. YUI global object: Advantages  Instance based: Sandboxing o Each instance is separate o Multiple applications per page o Secure mashups  Dynamic o Since loader is built into core so we don’t have to statically include all modules  Namespace – Avoiding naming conflict
  • 10. Global Variable  YAHOO replaced by YUI  Reasons:  Some people don’t like YAHOO in their code  Both the YUI 2 and YUI 3 code can co exist
  • 11. Modularity Modularity is good but “Sub Modularity” is better. Datasource Y UI 2 Y UI 3 Datasource Datasource Datasource Datasource Datasource Datasource io Local P olling Get jsonschema function
  • 12. Loader  In YUI 3 the loader is built into the core.  In YUI 2, we have a loader utility: var loader = new YAHOO.util.YUILoader();
  • 13. Loader (YUI 2) Module 1 <script src="module1.js"></script> <script src="module1.js"></script> Module 2 Module 3 <script src="module1.js"></script>
  • 14. Loader (YUI 3) YUI().use("module1“, "module2“ , "module3“,) Y UI seed file Module 1 Module 2 Module 3
  • 16. mViewer Updates mViewer