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 !!

Git helper for YUI Contributors v1

April 10th, 2009

Last week I started working on a little helper utility to aid YUI Contributors with GitHub and git.

Currently it is quite usable and ready for people to start using and providing some feedback.

The full source is available on GitHub: http://github.com/davglass/yui-git/

This helper app is an addition to the already awesome git porcelain (meaning pretty, not brittle). When you place the git-yui file in your path, you will now have access to the git yui set of sub commands.

The commands that are currently supported are:

  • git yui up
  • git yui merge
  • git yui sync
  • git yui build
  • git yui docs
  • git yui lint
  • git yui network
  • git yui pullrequest
  • git yui commits
  • git yui create
  • git yui log

The above commands are explained in full here: http://wiki.github.com/davglass/yui-git

Each of these commands are specific to YUI projects (yui2, yui3, yuidoc, builder). Some are only for yui2 and yui3: docs/build.

Hopefully these tools will help when contributing code.

Let me know what everyone thinks and please feel free to ask for feature requests :D

Opening my examples..

November 10th, 2008

I just finished the first scrub of my YUI examples, as of tonight I have 268!!

And it gets better ;)

Tonight I have pushed the full batch to GitHub.

The full source to all of my examples are now available for cloning via git.

For more information on Git, see the guides section on GitHub.

I will be happy to accept updates/additions or fixes for any and all examples, so feel free to clone and update the repository.

I am in the process of moving to a new web host that supports git on the server, so it may take a little bit for me to catchup with any changes you make.

On another note, my Tools and DHTML Forms packages are also available via git.

Update: Just added my Effects package as well..

YUI Local Combo Handler

November 8th, 2008

There have been several questions on how to use the Yahoo! combo handler to serve YUI files over SSL. The Yahoo! combo handler doesn’t support SSL, so I needed another option.

I have written an example what shows how to setup a local combo handler and configure YUI 2.6.0 to use it.

Currently the example doesn’t work for YUI 3.0.0pr1 but it will once YUI 3.0.0pr2 is released.

RTE Tech Talk Video

April 14th, 2008

Play The VideoIt’s been almost a year since I joined the YUI team and today I welcome my first YUI video. Last week I gave a presentation about the YUI RTE and it’s now available online in the YUI Theater. You can find all of the presentation slides here on my site.

Let me know what you think of my rookie debut on video :D

Screenshots of my Complex Example on an iPhone

March 13th, 2008

Here are a few screenshots of my Complex Example rendering on an iPhone. YUI Layout Manager - Complex Example - Home

More YUI/AIR goodness

March 5th, 2008

I have been working on some more AIR apps with YUI and figured I would share them here. The first one is a port of my YUI CSS GridBuilder. The addition to this little app is the ability to save the layout to a file.

The second app, is an offline doc browser for the YUI docs.

Hope you enjoy them :)

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.

© 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