YUI introduction to build hack interfaces

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    YUI introduction to build hack interfaces - Presentation Transcript

    1. The Yahoo User Interface Library (YUI) Christian Heilmann | http://wait-till-i.com | http://scriptingenabled.org Delhi, India, University Hack Day, January 2009
    2. Let’s take a walk... ...on the client side
    3. The client side is where strange things happen.
    4. Browsers render in fascinating and totally wrong ways.
    5. Random code from dubious sources interferes with your godlike, clean and high quality code.
    6. ...and you fix more than you develop.
    7. The web is a total mess!
    8. The reason is that things seemingly work.
    9. However, you are not the web and neither is your computer.
    10. To make things work for Yahoo we needed to find a way to abstract these issues away from us.
    11. And this is why we built the YUI.
    12. YUI is a framework to build working web applications.
    13. It includes CSS solutions to create layouts that work across browsers and allow for predictable typography.
    14. And it takes the pain out of writing JavaScript.
    15. Last but very much not least it allows you to create applications using tested and working widgets that extend what HTML gives us.
    16. Interface Widgets AutoComplete DataTable Button Layout Calendar Menu Rich Text Charts TabView Container
    17. Everything is fully documented.
    18. http://developer.yahoo.com/yui/docs/
    19. And there are almost 300 examples to look at.
    20. http://developer.yahoo.com/yui/examples/
    21. The controls are driven by custom events to allow for extending and monitoring them.
    22. Say for example you want to make sure to securely chain animation sequences...
    23. //This is the first animation; this one will //fire when the button is clicked. var move = new YAHOO.util.Anim(\"animator\", { left: {from:0, to:75} }, 1); //This is the second animation; it will fire //when the first animation is complete. var changeColor = new YAHOO.util.ColorAnim( \"animator\", { backgroundColor: {from:\"#003366\", to:\"#ff0000\"} }, 1); //Here's the chaining glue: We subscribe to the //first animation's onComplete event, and in //our handler we animate the second animation: move.onComplete.subscribe(function() { changeColor.animate(); });
    24. //Here we set up our YUI Button and subcribe to //its click event. When clicked, it will //animate the first animation: var start = new YAHOO.widget.Button(\"startAnim\"); start.subscribe(\"click\", function() { //reset the color value to the start so that //the animation can be run multiple times: YAHOO.util.Dom.setStyle(\"animator\", \"backgroundColor\", \"#003366\"); move.animate(); });
    25. //You can also make use of the onStart and onTween //custom events in Animation; here, we'll log all //of changeColor's custom events and peek at their //argument signatures: changeColor.onStart.subscribe(function() { YAHOO.log(\"changeColor animation is starting.\", \"info\", \"example\"); }); changeColor.onTween.subscribe(function(s, o) { YAHOO.log(\"changeColor onTween firing with these arguments: \" + YAHOO.lang.dump(o), \"info\", \"example\"); }); changeColor.onComplete.subscribe(function(s, o) { YAHOO.log(\"changeColor onComplete firing with these arguments: \" + YAHOO.lang.dump(o), \"info\", \"example\"); });
    26. All YUI components come as a debug version which log everything that is going on to the logger.
    27. All in all YUI allows you to build web interfaces without having to know all the pain that goes on in the browser world.
    28. Built on agreed standards Separated into modules each dealing with one task Constant reporting of what is going on Own Debugging environment
    29. Let’s hack using YUI!
    30. Step 1: Get the page structure built for you.
    31. http://developer.yahoo.com/yui/grids/builder/
    32. Step 2: Get some nice data, for example photos from Delhi.
    33. http://developer.yahoo.com/yql/console/
    34. Step 3: Find a nice way to display it – for example a Carousel
    35. http://developer.yahoo.com/yui/examples/ carousel/csl_circular.html
    36. Step 4: Add tabs for more content
    37. http://developer.yahoo.com/yui/tabview/
    38. Step 5: Add a menu for other pages
    39. http://developer.yahoo.com/yui/menu/
    40. Step 6: Add a Map!
    41. http://developer.yahoo.com/maps/ajax/
    42. And... L I A F
    43. http://yuiblog.com/blog/2006/12/14/maps-plus-yui/
    44. After you fixed that:
    45. http://isithackday.com/hacks/delhi/
    46. Of course this is a mashup, not a hack.
    47. It is also not creative at all and has been done to death!
    48. But it shows you how you can build a working interface
    49. THANKS! Christian Heilmann http://wait-till-i.com http://scriptingenabled.org http://twitter.com/codepo8

    + Christian HeilmannChristian Heilmann, 9 months ago

    custom

    2200 views, 1 favs, 3 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2200
      • 2131 on SlideShare
      • 69 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 31
    Most viewed embeds
    • 63 views on http://developer.yahoo.net
    • 5 views on http://icant.co.uk
    • 1 views on http://www.hanrss.com

    more

    All embeds
    • 63 views on http://developer.yahoo.net
    • 5 views on http://icant.co.uk
    • 1 views on http://www.hanrss.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories