YUI PHP Loader Beta Release

September 14, 2009 at 2:19 pm by Eric Miraglia | In Development | 11 Comments

The YUI PHP Loader is a server-side utility for loading YUI JavaScript and CSS; version 1.0.0 beta 1 is available for download from YUILibrary.com today.

PHP Loader, originally written by longtime YUI engineer Adam Moore and now developed and maintained by fellow Yahoo Chad Auld, has several key features that make it easier to use YUI in PHP-based applications:

  • Reliable, sorted loading of dependencies: You specify the version of YUI that you’re using, the modules you want to use, and PHP Loader outputs the requisite script and css tags for your implementation. Even if YUI’s dependency tree changes in a future version, your code won’t have to.
  • Support for performance best-practices: PHP Loader has three strategies to help you reduce HTTP requests — support for the Yahoo! CDN and its combo-handler (which aggregates YUI files into single HTTP requests on the fly), support for YUI’s rollup files, and (in the event you don’t want to serve YUI from Yahoo!’s servers) a lightweight combo-handler of its own. Server-side performance is fast as well, leveraging PHP’s APC cache.
  • Extensible metadata format: YUI PHP Loader ships with YUI library metadata (for both YUI 2 and YUI 3); however, the application is generic and can be extended to support your own custom JavaScript and CSS modules — whether or not they use YUI at all.

PHP Loader is simple to use:

include("loader.php");
$loader = new YAHOO_util_Loader("2.7.0");

//Configure your instance; for example, you can turn off rollups
$loader->allowRollups = false;

//Specify YUI components to load
$loader->load("yahoo", "dom", "event", "tabview", "grids", "fonts", "reset");

//Output the tags (this call would most likely be placed in the document head)
$loader->tags();

The above PHP script would output the following to the page:

<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/grids/grids-min.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset/reset-min.css" />
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/tabview/assets/skins/sam/tabview.css" />
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yahoo/yahoo-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/dom/dom-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/event/event-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/element/element-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/tabview/tabview-min.js"></script>
*/

Leveraging the combo-handler on Yahoo!’s servers, you can flip the combine setting on…

$loader->combine = true;

…and end up with just a single HTTP request for CSS and one more for JavaScript:

<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.7.0/build/reset-fonts-grids/reset-fonts-grids.css&2.7.0/build/tabview/assets/skins/sam/tabview.css"> 

<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.7.0/build/yahoo-dom-event/yahoo-dom-event.js&2.7.0/build/element/element-min.js&2.7.0/build/tabview/tabview-min.js"></script>

YUI PHP Loader links:

Welcoming a New YUI Contributor: Chad Auld

Chad Auld of the MiaCMS projectChad Auld has driven the release of PHP Loader, and big thanks are owed to him for taking ownership of this application and adding a series of fantastic features as he prepped it for this beta release. You may know Chad from his work on MiaCMS and the Sideline AIR application for Twitter search. We’ve been looking for an opportunity to collaborate with him for awhile, and we couldn’t be happier to have that happening on this project.

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

YUI 2.8.0: Storage Utility, ProgressBar Control, Swf and SwfStore Utilities

September 14, 2009 at 2:12 pm by Eric Miraglia | In Development | 19 Comments

The YUI team and project contributors are pleased to announce the immediate availability of YUI 2.8.0. This release brings in four new components (Storage Utility, SWFStore Utility, SWF Utility, and the ProgressBar Control) along with hundreds of fixes and enhancements. George Puckett’s release notes for YUI 2.8.0 provide a comprehensive overview of the changes.

Download the Core YUI package; ~13KB.
Download the Core YUI package plus the YUI Loader; ~19KB.
Download the full YUI developer package, including source, documentation and more; ~14MB.
Visit YUI on GitHub

Configure your YUI implementation using the YUI Configurator.

New for 2.8.0

Four significant components make their debut in this release:

  • The YUI Storage Utility provids a common interface into backends supplied by HTML 5, Flash, and Gears.Matt Snider’s Storage Utility: Matt is the lead frontend engineer (and the first employee) at Mint.com (which uses YUI extensively; congratulations on their big news today) and the author of a popular JavaScript blog. Matt contributed the Storage Utility for 2.8.0, a meta-component for client-side storage that provides HTML5-style local and session storage interfaces across various storage mechanisms. With this initial release, Storage can employ one of three storage mechanisms: HTML5 Storage, Google Gears, and storage via the Flash Shared Object. With HTML5-capable browsers growing share rapidly, and with the prevalence of Flash as a fallback, this gives you reliable coverage for the vast majority of your users. The Storage API allows you to specify which of these three mechanisms to use and in what order to try them.
  • Daniel Barreiro (Satyam)Satyam’s ProgressBar Control: Satyam (Daniel Barreiro) is best known to the YUI community as one of the foremost experts on YUI’s powerful DataTable Control, and he’s the author of important tutorials that have helped tens of thousands of developers make full use of DataTable. He’s also known as one of the most helpful members of the YUI community. With 2.8.0, Satyam contributes a new component, the ProgressBar, that further deepens YUI’s portfolio of UI controls. ProgressBar offers a convenient API, a wide range of custom events, and full support for Animation and its wide range of easing effects.

    Basic ProgressBar example.

  • Alaric Cole’s SWFStore Utility: SWFStore provides the Flash Shared Object functionality to the meta Storage Utility and comprises a JavaScript API for storing text data with FSO. SWFStore supports on-the-fly gzipping of your stored key/value pairs, which helps you get better mileage out of Flash’s 100KB default limit (this can be extended if the user permits). While many developers will use SWFStore in the context of Storage Utility, we’ve also presented it as a standalone feature for those who wish to use it directly.
  • Allen Rabinovich’s SWF Utility: In 2.8.0, we’ve broken out Flash detection and embedding functionality into a separate shared utility. We have begun moving YUI’s hybrid Flash/JS components — including Charts and SWF Store — onto Allen’s new base component. (Note: If you only want to check for Flash version, you can independently included the swfdetect module, which populates YAHOO.env.ua.flash.

Additional Highlights

  • Cross-Domain Support in Connection Manager: Connection Manager (YUI’s XMLHttpRequest component) gets support for basic cross-domain (XDR) requests in 2.8.0. We have implemented the Flash-based XDR mechanism that was first released as part of the YUI 3 IO component. We’ve also broken out core Connection Manager functionality into a connection-core module, reducing your code footprint if you’re only using the basic XHR capability. Head over to the Configurator to update your dependency list if you want to opt in to this more slender package.
  • Event delegation example on the YUI website shows how to use the new event delelgate support to reduce the number of event listeners on the page while building rich, event-driven web apps.Event Delegation Support in Event Utility: YUI has long included a detailed event delegation example/tutorial, and we talked up the technique here on YUIBlog back in 2007. With 2.8.0, Todd Kloots has built support for event delegation directly into the library with the new Event Delegate module, bringing 2.8.0 to parity with the event delegation support we delivered in YUI 3.
  • Carousel Gets a Gallery: Andres Narvaez and Gamaiel Zavala, frontend engineers for Yahoo!’s media properties, have worked with Gopal Venkatasen to extend the YUI Carousel Control to provide “gallery-style” support with multiple rows of items. At Yahoo!, Andres and Gamaiel have implemented this feature on redesigned video galleries for sites like Yahoo! Sports:

  • Calendar Control with year offset example on the YUI website.Calendar Adds Support for Year Offsets: The new year_offset configuration property in the Calendar Control provides support for calendaring systems that are fundamentally Gregorian but whose zero-year is different than 0 C.E. (the Thai calendar is one of several such systems).
  • Dual Axis Support in Charts: Tripp Bridges has been hard at work on YUI Charts, and among many improvements for 2.8.0 he has added support for multi-axis charts.
    Multi-axis chart example.
  • Much More: Hundreds of bug fixes and enhancements are included in YUI 2.8.0; George Puckett’s release manifest provides component-by-component details of these changes.

Acknowledgements

Some of the most interesting new work in YUI 2.8.0 (including Matt’s Storage and Satyam’s ProgressBar) come from outside of Yahoo, and community involvement in the project continues to grow month by month. To those of you who contributed timely bug fixes and enhancements in this release, and to the hundreds who helped refine the library through high-quality enhancement requests and bug reports, thank you!

What’s Next?

YUI 2 development and maintenance continues. You can follow this work on YUILibrary.com, where the Roadmap will soon tick over to the priority list for 2.9.0. As bug fixes roll into the YUI 2 development tree, you can follow them in near-real time on GitHub. If there’s anything that’s not moving fast enough for you, fork the repo, sign a CLA, and start making pull requests.

The team remains hard at work on YUI 3, and we’re now finalizing the documentation for the upcoming 3.0.0 GA release that will bring the new YUI 3 core and most utilities out of beta. YUI 3 is also available on GitHub, so feel free to clone the YUI 3 repo and start exercising the upcoming release. Beyond the GA, we’ll continue to work on bringing widgets to YUI 3 on the new Widget stack and making it easier for the community to make contributions across the project.

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

Announcing YUIConf: Oct 28-29, 2009

September 9, 2009 at 9:37 am by Jenny Donnelly | In Development | 4 Comments

Mark your calendars! We’re pleased to announce that YUIConf 2009, Yahoo!’s annual front-end engineering conference, will take place October 28 and 29 on our Sunnyvale campus.

We have a stellar lineup of technical sessions coming together for this year’s YUI-themed event, including

  • a sneak peek at the latest and greatest evolutions to the YUI library
  • deep dives into the core components of YUI 3, such as Node and Event
  • the widget infrastructure
  • internationalization
  • contributing to YUI
  • and much, much more!

For the first time this year we’ll be making available a limited number of seats for external developers, so stay tuned for schedule and registration information. Hope to see you there!

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

In the Wild for September 1, 2009

September 1, 2009 at 12:58 pm by Eric Miraglia | In In the Wild | 3 Comments

Here are some of the things we’ve noticed in the YUI newstream of late. Did we miss something important? Let us know in the comments.

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

September 8 BayJax Meetup at Yahoo!: Nicholas Zakas on Scalable JavaScript Architectures and Isaac Schlueter/Matt Hackett on Server-Side JS

September 1, 2009 at 9:14 am by Gonzalo Cordero | In Development | Comments Off

BayJax September is here! Once again, Yahoo! is hosting BayJax, the Bay Area Ajax and JavaScript meetup. We have some great talks lined up. Join us on September 8th at 7pm in Classroom 5, Building C on the main Yahoo! campus.

Thanks to everyone who helped make July’s event a success, and we hope to see you again this month! Attendance is free, but seating is limited.

To RSVP for the event, head on over to http://www.meetup.com/BayJax/calendar/11258377/.

Featured Speakers

  • Nicholas C. Zakas, “Scalable JavaScript Application Architecture”: Choosing a JavaScript library is only the first step in the process of creating a large, scalable web application front-end. Building an application framework on top of a JavaScript library empowers your development team, makes your code more maintainable, and allows surgical updates to existing code without risking overall application stability. You’ll learn all you need to know to start building your own JavaScript application framework using real-world examples as a guide for design decisions.

  • Isaac Schlueter and Matt Hackett, “Jic-Jack-Jo: A multiplayer web game using server-side Javascript”: Narwhal is a cross-platform, multi-interpreter, general purpose JavaScript platform that implements Mozilla’s CommonJS Securable Modules standard. Jack is a collection of server-side javascript modules inspired by Ruby’s Rack platform and Python’s WSGI protocol. Jic-Jack-Jo is a multiplayer tic-tac-toe game built from top to bottom in JavaScript, a proof of concept showing how easy itis to build interesting things on this platform.

Presentations by Jon LeBlanc and Douglas Crockford from the July BayJax event at Yahoo! are available on YUI Theater.

Share and extend: Bookmark with del.icio.us | digg it! | reddit!

« Previous Page
Hosted by Yahoo!

Copyright © 2006-2012 Yahoo! Inc. All rights reserved. Privacy Policy - Terms of Service

Powered by WordPress on Yahoo! Web Hosting.