Fork me on GitHub

Davs Rants and Random Thoughts

YUI 3 Gallery – Hidden Features

November 4th, 2009

Today the YUI Team announced the little project I have been working on for the last couple of months. The YUI 3 Gallery.

So I figured I would write a little post to show a few of the “hidden” features of the Gallery and how you can use them.

JS Lint:
Every module that we push to the CDN has to go through our build system that uses the YUI Builder Tool. The Builder concatenates files, then compresses them with YUICompressor and runs JSLint on them a couple of times. We include this output on every build, so you as the end-user can see that output and use it to determine if you want to use the module in your application. If you look at my YQL Module and click the link for the Build Tag (Which is the stamp we give each CDN push), you will see the code that is required to load this module on your page. Just below that you can see a link called “[Show Build Output]“. Clicking that link will show you the raw output generated by the build system.

Loader
Some people have asked why they have to include the config in their YUI instance, to make a Gallery item work.

Code Snippet

The short answer is: We didn’t want to release a YUI 3.0.1 just to add a couple of lines to one file.
The longer answer is: When we release YUI 3.1.0, this will be built into the Loader module. And it will be done for you automatically. Since the files are hosted on the CDN, but are not in the same directory as the YUI files are, we had to modify Loader to know about Gallery modules and make it smart enough to change directories to use the CDN.

However, I have built an API into the Gallery to help with this.

Loader Code

This example shows how you can load a single js file from YUILibrary.com and plug it into your YUI instance and have access to all the gallery modules that are currently on the CDN.

API
The Gallery was designed with a pretty robust API exposed to help developers and users get the most out of the data inside the Gallery.
Here is the list of valid API endpoints:

Command Line
Last, but not least, my yui-git command line tool has support for the Gallery now.
You can query all the items in the Pending CDN Queue and check them out into a branch to test them before they are on the CDN.

That’s about it for now, hope you all enjoy the new Gallery & I hope to see lots of new modules in there soon.

GitHub @ Yahoo! – YUI Theater scoop!

August 12th, 2009

A few weeks ago, the awesome GitHub crew (Chris, Tom & Scott) dropped by Yahoo! to give a tech talk. They talk about Git, GitHub, Social Coding and more. And you get to see the video before it hits YUI Theater!!

3 Years Ago…

July 23rd, 2009

Three years ago today, I posted my first YUI example to the ydn-javascript list.

Here is the message:

You can use a simple addListener like so:

YAHOO.util.Event.addListener([HTMLObject], 'contextmenu', CallBackFunction);

You can see a working example here:

http://blog.davglass.com/files/yahoo/index.html

FYI, I am also using the YAHOO.namespace in the example.

The link to that code still works :D

After reading a few of the old posts I thought I would do a little data collection & here’s what I came up with. In the last 3 years:

Wow, it’s been an awesome 3 years.. Here’s to 3 more with YUI 3 !!

Yahoo Open Hack London

May 10th, 2009


Yahoo Open Hack London 57

Originally uploaded by Jinho.Jung.


Yahoo Open Hack London 67

Originally uploaded by Jinho.Jung.

This weekend I had the privilege of attending the second Open Hack Day in London. This year I was a presenter instead of just there for user support. I have to say that it was an awesome event and I can’t wait to do it again.

I’ve uploaded the slides from my talk to SlideShare and posted the code example here.

I have to mention that one of the best parts was the band: pornophonique.de. They are a German duo that plays a guitar and a GameBoy. It’s a pretty sweet sound and so far I really like coding to it :D

There are tons of pics available from the event, so browse on over to flickr and check them out.

YUI and Adobe AIR – Sample App

February 25th, 2008

With the release of Adobe AIR 1.0 today, I figured I should package a sample AIR app using the latest YUI release. And what better example of showing YUI 2.5.0 in all it’s glory than to convert my Complex Application example.

This example contains a patched version of the YUI Editor that makes the Editor render inside of AIR. The Editor contained in this app is not a fully functional version of the Editor Control (I am still working on that).

You can download and install the AIR app from here.

So you can see what I have done, I have included the source for the AIR app here.

CSS Grid Builder in the news again

January 30th, 2008

It seems that my CSS Grid Builder has hit the news again. Dion Almaer over at Ajaxian has posted an article linking to an article that Jeremy Zawodny did about my Grid Builder :)

Who would have thought that it’s still getting all this love when I wrote it back in Nov of 2006.

WordPress Plugin Update

September 25th, 2007

I just updated the WordPress plugin for YUI Version 2.3.1. The following things were updated:

  • Bug Fixes
  • Flickr Plugin updated to abide by their TOU
  • Comments toolbar updated to add support for
    • XHTML
    • Unordered Lists
    • Ordered Lists
  • The Editor will now not be displayed if you view the page with an iPhone or Nokia N95 Phone

You can get the details on installing it here.

First YUI Blog Post

August 13th, 2007

Hey all –

Today, I got to post my very first blog article over on the YUI Blog. Swing on over and take a peek..

Flickr Ransomizr

August 9th, 2007

Kent Brewster has released a nifty little hack to let you build something like this:


Link to this Ransomiz

This thing is awesome!!

YUI Rich Text Editor WordPress Plugin

July 31st, 2007

Today, the YUI team released version 2.3.0 of the library and it contains my Rich Text Editor. So I decided to build a plugin for WordPress that allows you to use that editor for blog posts as well as comments.

You can download the plugin here.

You can demo the plugin here: http://rte.davglass.com

The posting and comments feature of the plugin has also been activated, you can test the post editor by logging in with the username and password of: rte

Please be nice with the posts and the comments or I will have to turn off the demo.

I have the plugin installed on this site, so you should now see it in action when you make a comment :)

Enjoy
Dav

Note, I just found out that WordPress is filtering the content coming from the editor.. Let me get that patched. I’ll post an update when that is fixed..

© 2010 Dav Glass - All content is mine, except comments. Comments are the property of the poster. I speak for no person or company.
Can you tell me what this says? 01000100 01100001 01110110 01101001 01100100 00100000 01000111 01101100 01100001 01110011 01110011