• Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • Tutorials
    • API Docs
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • YUI 2
    • YUI Compressor
    • YUI Doc »
    • YUI Builder
    • YUI PHP Loader
    • YUI Test
    • YUI Website

Blog: Archive for June, 2007

Implementation Focus: Wikia

John Q. Smith is the VP of Engineering and Product for Wikia, a 2-year-old San Mateo-based startup founded by Wikipedia co-founders Jimmy Wales and Angela Beesley. Wikia is dedicated to the support and empowerment of passionate communities and to helping them grow on the web. Wikia itself is growing at a double-digit pace month-over-month in terms of content and traffic. Its communities are passionate and diverse, and the company has a tremendous track record of helping those communities succeed.

We sat down with John at Yahoo! last week to talk about Wikia’s choioce of YUI as its frontend library. Like many startups during the past few years, Wikia was faced with an intriguing decision about its frontend architecture, and it considered four of the major open-source libraries before settling on YUI. We wanted to know what factors drove their decision and what they thought we needed to do better with YUI to improve the experience of implementers.

Tell us a little bit about Wikia. What point are you at in the evolution of your product and your company? What is its relationship to Wikipedia?

We like to say that Wikia and Wikipedia have the same parents, but that otherwise we’re not related. We share with Wikipedia a lot of the same fundamental ways we treat communities and we share with them an overarching respect for the kinds of content generation done by communities. We run on the same software as Wikipedia, MediaWiki, but there’s no business relationship.

At Wikia, our core strengths are community building and helping passionate people find others like them with whom they can collaborate. We have 3,000 communities today. One of the more popular ones is Wookieepedia, a community passionate about all things Star Wars. We have a popular Star Trek community called Memory Alpha and a wonderful community based around the Muppets. The Marvel Database site is a great one, and the Uncyclopedia, which is an unholy parody of Wikipedia, is enough to stop all productivity in the office for at least 30 minutes daily. We have communities based on Sci-Fi, technology, health, travel, and much more…it’s a broad cross-section. Our communities build out huge amounts of content and we try to help them get great exposure for their content, too.

You have adopted YUI as your frontend framework for the interface you’re building on top of MediaWiki. Tell us about that decision.

Our decision set consisted of five key points:

  1. speed of development
  2. quality of the codebase
  3. documentation and examples
  4. robustness/future-proofing
  5. browser support

All of the toolkits we considered (YUI, Dojo, JQuery, Prototype) cover this decision set to some degree, and all of them allow you to generate impressive UIs with just a few lines of code. But our vision for the future required a platform that would enable us to build the robust features and widgets that we want to create ourselves. So we need a framework that we would feel comfortable building on. YUI is versatile, because there’s so much you can do on top of it. But it’s also more than that, because it has a catalogue of bundled widgets also…it gives you the best of both worlds. All of that, combined with the documentation and example code, was important for us given our distributed development team. Our assessment was that there were other libraries that could jump-start our development more quickly, but we felt they would leave us less free over time.

Here’s one specific example of why we chose YUI: A lot of our designs so far have a three-column layout. We started with a test of different libraries dragging items across the three columns. All of the libraries we tested had at least some problem doing that with the exception of YUI. That kind of proved to us that there were things we wouldn’t have to worry about with YUI that might be a concern if we made another choice.

We also talked to a lot of other companies around the valley about YUI, including SmugMug, and most of them had the same response: You’re going to need to write some code to get exactly what you want done, but YUI is a great platform to write code with. For our needs, YUI felt like the right long-term choice.

Every adoption of a new technology comes with some pain. What have the pain points been in adopting and using YUI so far?

I’m not sure we’re deep enough into it to feel the pain so far. What I’ve heard from the developers is that there’s a lot to learn to make full use of the library. Whereas with Ruby on Rails you have this great integration with Prototype and Scriptaculous, and you can get some wonderful interactions built very quickly, YUI has involved a little more mastery on the front end of the process for us. I’m sure there will be more pain points as we go, but that’s where we’re at today.

What does your UI look like a year from now? What challenges are you trying to overcome?

Making things more simple and intuitive. If you’ve edited Wikipedia, you know what I’m talking about: "Thar be dragons…" We’d like to make it a more intuitive process for the user, and a more fun experience. People are in online communities because they’re passionate about something. We want to make the expression of that passion fun rather than demanding. We also want to provide more visibility into the presence of other users, more core stuff around making the editing experience friendly, more information back to the users about what they’re doing and what people are doing with the content they generate. Plus, I think there’s a lot we can do in terms of letting our users mashup or combine different sources of information.

For us, it’s all about tapping peoples’ passions and not getting in their way.

You’re growing quickly in terms of traffic. Does that mean you’re ramping up in terms of staff as well?

Absolutely. We’ve grown from about 8 employees around the world a year ago to more than 30 today. Now that we’ve decided on YUI, we’re seeking out great frontend engineers who are familiar with YUI and want to work with Jimmy and Angela as they change the world again with Wikia, just as they did with Wikipedia.

Do you have a YUI implementation that would be of interest to the YUI community? If so, please share your link and post a message to the community forum at YDN-JavaScript, or leave us a message in the comments section below.

By Eric MiragliaJune 18th, 2007

Implementation Focus: Avenue A | Razorfish

Fred WelterlinAs part of our ongoing effort to understand (and share with you) the real-world experiences of YUI implementers, we met a few weeks ago with a team from Avenue A | Razorfish, an agency that works with many Fortune 100 clients to build best-in-class applications for the web and for corporate intranets. AA|RF has the unique agency perspective of working regularly with a wide range of technologies. We sat down with AA|RF’s Fred Welterlin to learn more about his group’s experiences in doing frontend engineering in the agency world.

As senior presentation layer developer, graphical alchemist, and Web Standards advocate with AA|RF, Fred’s experience and areas of focus include designing, architecting, and programming client-side templates, providing project management and technical recommendations, and developing multimedia widgets. Fred has ten years experience working as a user interface designer and developer — responsible for conceptual and practical design development for a wide range of business and industry needs.

From left to right: David Lazzarini, Oliver Langan, Chris Nardi, John Kepler, Julia Debari, Fred Welterlin, Ryan Triggs, Vikas Sharma, Marie De Luna

How has the nature of your web-development work for clients changed over the past couple of years, with the move toward more richness and client-side complexity?

One of AA|RF’s greatest strengths as an agency is in creating compelling user experiences. The advent of such client side technologies as AJAX, JavaScript libraries, Flex, etc. has given us the ability to further enhance our capabilities in delivering next-generation user interfaces. Since many of our clients have existing back-ends, the amount of "richness" we can deliver tends to rely on how well client-side technologies can be integrated. Thus, we are especially interested in easily integrated, flexible, platform agnostic front end technologies.

“Web standards” based coding practices have also become an important aspect our development cycle. As projects get touched by multiple developers, and as timelines and resources evolve, having well written, semantic code structures not only helps in terms of organizing complex functionalities effectively, but also ultimately benefits the user in terms of a streamlined, highly performant experience.

Because you work with the technologies that your clients have already implemented, you end up touching a lot of different frontend tools — YUI, Dojo, Prototype, jQuery, etc. What role are these tools typically playing in your projects for your clients?

The biggest impact that a client-side JavaScript library can have for AA|RF is in rapid prototyping for client pitches, and speeding up the development process for existing projects. Often, the turn around time for client deliveries is really tight, and the projects themselves are complex enough that having a client side framework is critical — after all, no one wants to recreate the wheel. Since JavaScript libraries also take care of many browser quirks, they give us the freedom to concentrate on what is most valuable to our clients — building better and richer user experiences.

You’ve implemented YUI as part of some major projects — when a traveler books travel with Southwest Airlines, they’re likely to run into the YUI Calendar Control as a result of your work, for example. What are some of the most significant customers with which you’ve used YUI, and what parts of YUI did you use on those projects?

We used:

  • AutoComplete Control on searches for a major global financial services provider.
  • Animation, DOM, and Connection Manager Utilities were used to create modal dialogs, drop down menus, and AJAX interactions for the redesign of Intermec Corporation.
  • Calendar Control for Southwest Airlines and for an intranet application for a leading biotech firm.
  • DOM Collection and Connection Manager on several Yahoo! Projects, including Yahoo! Talent Show.

The AA|RF redesign of the Intermec website using YUI.

If you were asked to give advice to someone who was considering adopting YUI at this point in time for RIA development, what would you tell her about YUI’s core strengths?

Along with the excellent documentation, community support, and available list of commonly used controls, the design patterns and examples for implementing YUI is where this particular toolkit stands above competing libraries. I see YUI as having been originally created to accommodate design needs by Yahoo’s very own web properties, thus leveraging the knowledge of the entire company’s collective experience (from web performance specialists, to UX specialists, developers, and designers, etc). The resulting toolkit provides not only common interface widgets, but also useful CSS design patterns, graded browser support patterns, hosting services, even plug-in style components, like Bill Scott’s carousel.

What would you say are areas where YUI needs to continue growing and improving?

I would like to see YUI continue to stay in touch with developer needs in the industry. For example, one of the aspects that make jQuery really successful is that it was written by someone who needed a concise, straight forward way to handle typical JavaScript tasks. YUI has a similar appeal, in that it is sympathetic to the JavaScript hacker type person who needs to do quick and easy implementations, while still providing a powerful framework to accommodate an enterprise-level implementation. Your challenge is to continue developing YUI so that it can meet the goals of both of these archetypes.

For an agency like AARF — and ignoring for the moment the Microsoft acquisition — how do your developers feel about the ever-broadening list of technologies in play, from DHTML to Flash to Apollo to Silverlight to JavaFX Script and beyond? Is it a great time to be in this industry, or is the supply of divergent platforms beginning to make it even harder to provide flexible agency-style support?

Although these technologies are "seemingly" similar, they all have their strengths and weaknesses. What Silverlight brings to the table is something completely different from what Apollo has to offer. We have always been about taking a ‘business needs first’ approach as far as technology choices are concerned and continue to do so. All the newly emerging tools have essentially enabled us to conceive and deliver experiences that were not possible before.

In general, having an ever-broadening list of technologies to choose from is good for the web dev industry in the same way that having many auto makers competing with each other for better, more efficient automobiles is good for consumers. For AA|RF in particular, the long list of technologies to choose from is a double-edged sword because on the one hand, its great to have the flexibility to choose a framework that best meets a client’s needs, on the other hand, as most developers like to specialize, it becomes more difficult to manage resources and place expertise on the appropriate project at the right time.

The good news is that there are certain interface development paradigms that have emerged as "standard" on all these new platforms. In the interest of wooing as many developers as possible, technology tool vendors are sticking to those standards, thereby reducing the learning curve quite a bit. In any case, there has never been a more exciting time to be working on the client side.

Do you have a YUI implementation that would be of interest to the YUI community? If so, please share your link and post a message to the community forum at YDN-JavaScript, or leave us a message in the comments section below.

By Eric MiragliaJune 15th, 2007

YUI Theater — Karo Caran and Victor Tsaran: “Introduction to Screen Magnifiers”

Picture of Karo Caran and Victor Tsaran from the video's opening. Click here to watch the video on Yahoo! Video.

With the goal of better understanding how people interact with the Web via various types of Assistive Technology (AT) — and what that might mean for developers and designers — Karo Caran takes us on a 16 minute overview of screen magnification software (in this case ZoomText) and how it is used by partially-sighted users to interact with the Web. Karo shows you the basic toolkit and then applies those tools to some typical web sites to give you some perspective on how she uses magnification software while she browses the web.

Though screen readers get most of the press, it’s good to remember that it’s not the only AT game in town.

Related URLs

  • YUI Theater — Victor Tsaran: “Introduction to Screen Readers”
  • YUI Theater — Doug Geoffray: “From the Mouth of a Screenreader”

Technical Notes

A downloadable and iPod-compatible MPEG version of this video is available for download. The .m4v file format we’ve used for this video (and many others in the YUI Theater) signifies that it is an MPEG-4 file with video; if you’re not downloading to view on an iPod, and/or are using a system that doesn’t recognize the .m4v extension, try renaming the file to .mp4.

By Nate KoechleyJune 12th, 2007

A JavaScript Module Pattern

Eric Miraglia (@miraglia) is an engineering manager for the YUI project at Yahoo. Eric has been at Yahoo since 2003, working on projects ranging from Yahoo Sports to YUI. For the past several years, Eric and his colleagues on the YUI team have worked to establish YUI as the foundation for Yahoo’s frontend engineering work while open-sourcing the project and sharing it with the world under a liberal BSD license. Eric is an editor and frequent contributor to YUIBlog; his personal blog is at ericmiraglia.com. Prior to working at Yahoo, Eric taught writing at Stanford and elsewhere and led frontend engineering teams at several startups.

Global variables are evil. Within YUI, we use only two globals: YAHOO and YAHOO_config. Everthing in YUI makes use of members within the YAHOO object hierarchy or variables that are scoped to such a member. We advise that you exercise similar discipline in your own applications, too.

Douglas Crockford has been teaching a useful singleton pattern for achieving this discipline, and I thought his pattern might be of interest to those of you building on top of YUI. Douglas calls this the “module pattern.” Here’s how it works:

1. Create a namespace object: If you’re using YUI, you can use the YAHOO.namespace() method:

YAHOO.namespace("myProject");

This assigns an empty object myProject as a member of YAHOO (but doesn’t overwrite myProject if it already exists). Now we can begin adding members to YAHOO.myProject.

2. Assign the return value of an anonymous function to your namespace object:

YAHOO.myProject.myModule = function () {

	return  {
		myPublicProperty: "I'm accessible as YAHOO.myProject.myModule.myPublicProperty.",
		myPublicMethod: function () {
			YAHOO.log("I'm accessible as YAHOO.myProject.myModule.myPublicMethod.");
		}
	};

}(); // the parens here cause the anonymous function to execute and return

Note the very last line with the closing curly brace and then the parentheses () — this notation causes the anonymous function to execute immediately, returning the object containing myPublicProperty and myPublicMethod. As soon as the anonymous function returns, that returned object is addressable as YAHOO.myProject.myModule.

3. Add “private” methods and variables in the anonymous function prior to the return statement. So far, the above code hasn’t bought us any more than we could have gotten by assigning myPublicProperty and myPublicMethod directly to YAHOO.myProject.myModule. But the pattern does provide added utility when we place code before the return statement:

YAHOO.myProject.myModule = function () {


	//"private" variables:
	var myPrivateVar = "I can be accessed only from within YAHOO.myProject.myModule.";
	
	//"private" method:
	var myPrivateMethod = function () {
		YAHOO.log("I can be accessed only from within YAHOO.myProject.myModule");
	}


	return  {
		myPublicProperty: "I'm accessible as YAHOO.myProject.myModule.myPublicProperty.",
		myPublicMethod: function () {
			YAHOO.log("I'm accessible as YAHOO.myProject.myModule.myPublicMethod.");

			//Within myProject, I can access "private" vars and methods:
			YAHOO.log(myPrivateVar);
			YAHOO.log(myPrivateMethod());

			//The native scope of myPublicMethod is myProject; we can
			//access public members using "this":
			YAHOO.log(this.myPublicProperty);
		}
	};

}(); // the parens here cause the anonymous function to execute and return

In the codeblock above, we’re returning from an anonymous function an object with two members. These members are addressable from within YAHOO.myProject.myModule as this.myPublicProperty and this.myPublicMethod respectively. From outside of YAHOO.myProject.myModule, these public members are addressable as YAHOO.myProject.myModule.myPublicProperty and YAHOO.myProject.myModule.myPublicMethod.

The private variables myPrivateProperty and myPrivateMethod can only be accessed from within the anonymous function itself or from within a member of the returned object. They are preserved, despite the immediate execution and termination of the anonymous function, through the power of closure — the principle by which variables local to a function are retained after the function has returned. As long as YAHOO.myProject.myModule needs them, our two private variables will not be destroyed.

4. Do something useful with the pattern. Let’s look at a common use case for the module pattern. Suppose you have a list, some of whose list items should be draggable. The draggable items have the CSS class draggable applied to them.

<!--This script file includes all of the YUI utilities:-->
<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/utilities/utilities.js"></script>

<ul id="myList">
	<li class="draggable">Item one.</li>
	<li>Item two.</li> <!--item two won't be draggable-->
	<li class="draggable">Item three.</li>
</ul>

<script>
YAHOO.namespace("myProject");
YAHOO.myProject.myModule = function () {

	//private shorthand references to YUI utilities:
	var yue = YAHOO.util.Event,
		yud = YAHOO.util.Dom;

	//private method:
	var getListItems = function () {
		
		//note that we can use other private variables here, including
		//our "yud" shorthand to YAHOO.util.Dom:
		var elList = yud.get("myList");
		var aListItems = yud.getElementsByClassName(
			"draggable", //get only items with css class "draggable"
			"li", //only return list items
			elList //restrict search to children of this element
		);
		return aListItems;
	};
	
	//the returned object here will become YAHOO.myProject.myModule:
	return  {

		aDragObjects: [], //a publicly accessible place to store our DD objects
		
		init: function () {
			//we'll defer making list items draggable until the DOM is fully loaded:
			yue.onDOMReady(this.makeLIsDraggable, this, true);
		},
		
		makeLIsDraggable: function () {
			var aListItems = getListItems(); //these are the elements we'll make draggable
			for (var i=0, j=aListItems.length; i<j; i++) {
				this.aDragObjects.push(new YAHOO.util.DD(aListItems[i]));
			}
		}

	};
}(); // the parens here cause the anonymous function to execute and return

//The above code has already executed, so we can access the init
//method immediately:
YAHOO.myProject.myModule.init();
</script>

This example is a simple one, and it’s deliberately verbose — if this was all we were doing, we could doubtless write it in a more compact way. However, this pattern scales well as the project becomes more complex and as its API grows. It stays out of the global namespace, provides publicly addressable API methods, and supports protected or “private” data and methods along the way.

By Eric MiragliaJune 12th, 2007

YUI Theater: Douglas Crockford — “JavaScript: The Good Parts”

Douglas Krockford speaking at the 2007 Konfabulator Developer Day.

Douglas Crockford provided a keynote talk for the 2007 Konfabulator Developer Day yesterday. His talk was entitled “Javascript: The Good Parts” — a topic of interest to Konfabulator hackers, much of whose work is done in JavaScript.

This talk, now one of five talks from Douglas up on the YUI Theater, is the most reflective one we’ve covered. Douglas takes you on a journey through the lens of his own personal experience with JavaScript — a journey from deep skepticism about a flawed, half-baked scripting language in the earliest days to a growing affection for what is now a still-flawed but surprisingly beautiful and powerful language that has “radically changed my way of thinking about programming languages.”

Once you learn to think in JavaScript, I found it completely changed the way I program. Not only that, it made be a better Java programmer. So when I go back and I’m working in the classical languages, I find that I’m writing lighter in that environment, too, even though it’s an environment that encourages…profoundly heavy programming. (28:10)

Douglas with Laurie Voss, Arlo Rose, and other KonfabulistasThe journey from skepticism to appreciation is one that many developers have followed and one that many more are, hopefully, in the process of following as web applicatons continue to attract vast amounts of our innovation and energy. At the end of the day, Douglas advises that we approach JavaScript the way Michaelangelo approached an unsculpted block of marble — that is, with an eye toward its intrinsic beauty. Through the use of tools like JSLint (which is also, apropos of this event, a Yahoo! Widget written in JavaScript and running on the Konfabulator platform), and through studying the unique properties of JavaScript’s lambda nature, he argues that we can find in JavaScript a language for writing great software and a language that will help us become better writers of software. Many thanks to Douglas and the Konfabulator team for letting us record and publish this on YUI Theater.

This presentation is available as an MPEG-4, iOS-compatible download (change the extension from .m4v to .mp4 if your video software doesn’t recognize the extension).

By Eric MiragliaJune 8th, 2007

Who’s Got Style?

With DOM support across all A-grade browsers, many basic (and some complex) interactions can be accomplished with relative ease. Things like adding and removing elements, inserting HTML text, and working with events are now reasonably manageable on a cross-browser basis. There are, of course, some quirks that have to be accounted for, but generally speaking, most things work as you would expect them to. Except for dynamically inserting CSS into your page.

When writing HTML, CSS can be embedded in the page using the <style> element, like this:

<style type="text/css">
  a {     color: red;
  }
</style>

This block of code can be placed anywhere in a page and its rules will be applied to the entire page. Since we have the DOM API, which gives us the ability to dynamically create elements, attributes, and text nodes with a document, one would assume that some very basic JavaScript code could be used to mimic this HTML code. Logically, it would work like this:

var styleElement = document.createElement("style");
styleElement.type = "text/css";
styleElement.appendChild(document.createTextNode("a { color: red; }"));
document.body.appendChild(styleElement);

It should be just that easy…but it’s not. For Opera and Firefox, browsers that purport to have great standards support, this works perfectly well. In Safari and Internet Explorer it fails, though not for the same reason.

Safari requires dynamically created <style> elements to be inserted into the <head> for the rules to be applied, which is a fairly easy change to the previous code:

var styleElement = document.createElement("style");
styleElement.type = "text/css";
styleElement.appendChild(document.createTextNode("a { color: red; }"));
document.getElementsByTagName("head")[0].appendChild(styleElement);

This code now works in Opera, Firefox, and Safari. But what about IE? When IE encounters style.appendChild() it throws the rather obtuse and not-very-helpful error message, “unexpected call to method or property access”. Try replacing that with a call to set innerHTML, and you’ll get an equally useless error message of “unknown runtime error”. What’s going on here?

It turns out that IE won’t let you manipulate <style> elements in this way. There is, however, a different way to do the same thing. IE supports a styleSheet property on each style element that allows for the manipulation of the style sheet and the rules contained within. The styleSheet property has a property called cssText, which can be used to set and retrieve the CSS text for the style sheet. So, the code can be modified to work in IE by doing this:

var styleElement = document.createElement("style");
styleElement.type = "text/css";
if (styleElement.styleSheet) {
  styleElement.styleSheet.cssText = "a { color: red }";
} else {
  styleElement.appendChild(document.createTextNode("a { color: red; }"));
}
document.getElementsByTagName("head")[0].appendChild(styleElement);

This code now works in all A-grade browsers and can be genericized into a function like this:

function addCss(cssCode) {
var styleElement = document.createElement("style");
  styleElement.type = "text/css";
  if (styleElement.styleSheet) {
    styleElement.styleSheet.cssText = cssCode;
  } else {
    styleElement.appendChild(document.createTextNode(cssCode));
  }
  document.getElementsByTagName("head")[0].appendChild(styleElement);
}

Using this function, you can add as many new blocks of CSS code to your page as you would like.

A warning: IE only allows writing to styleSheet.cssText one time per <style> element. If you try to do it more than one time, it can crash the browser. For this reason, it’s best not to reuse <style> elements on your page. Instead, remove them or just add new ones.

By Nicholas C. ZakasJune 7th, 2007

An Interview with Ted Husted, Creator of YUI Community Site “Planet Yazaar”

Software developer and author Ted Husted is the founder of Planet Yazaar, a community website for YUI developers who want to share their YUI-related work with one another. The mission statement:

Yazaar offers three key services to the YUI community:

  • A vehicle for accepting and maintaining contributor extensions in a common location, either in the form of code or documentation
  • “Soup to nuts” project documentation, including coding style guidelines and build systems
  • A public repository with version to version change logs

Our wish is for the Yazaar community to enjoy the best of both worlds: the cathedral and the bazaar!

In addition to his work with Planet Yazaar, Ted is the co-author of three books: JUnit in Action, Struts in Action, and Professional JSP Site Design. His specialty, as he puts it on his blog, is “building agile web applications with open source products like Yahoo! User Interface Library, Struts, Spring, iBATIS, and MySQL, for either Java or Microsoft .NET, and helping others do the same.”

Tell us a little bit about your background and your current work; you are, among other things, an Apache Foundation contributor, correct?

I’ve been a volunteer ASF committer since 2001 and a Member since 2002. Today, the ASF has about two thousand committers contributing to over forty different software projects, ranging from the HTTP web server to the Ant build tool. But, I spend most of my time writing web applications for people that pay me :)

Lately, I’ve been working on a set of intranet applications for a state water authority. Before that I worked on outward-facing applications for a public broadcasting station, including an auction application based on Apache Struts. Back in the 20th century, I created desktop applications using Microsoft Access and Clarion, and when DOS ruled the earth, PC-File and Turbo Pascal :)

You’ve been an increasingly significant presence in the YUI developer community during the past several months. When did you start working with YUI? What kinds of projects are you using it for these days?

We started our YUI spike in Februrary 2007, just in time for the DataTable beta. We’ve been working on moving the permitting process for a water authority to web-based application. Various departments with the authority play different roles in the process, and we are writing a series of “point applications” for each department that share a common database. It’s a typical business application that accesses a database for data-entry and reporting.

We did the first departmental application in ASP.NET, but after the second major release, we started to hit some walls. For richer workflows, we often found ourselves struggling with the lockstep page-rendering cycle. We were starting on another application for a different department, and so we decided to try using standard AJAX on the front-end, but keep the same database facade on the back-end. The Jayrock library has made it very simple to access our business facade through a generic .NET “handler”. (Essentially, a Java servlet.)

After looking at several other libraries, and trying our usual test application in three, we decided to base our UI on YUI. We like the clean design and the excellent documentation “sealed the deal”. :)

Much of our work is based on the DataTable component. Because it’s new and beta, there have been some bugs. But, we have yet to find a bug we couldn’t patch! When we found bugs in the ASP.NET DataGrid, we didn’t have the same luxury. We had to resort to awkward workarounds, or just plain do without.

You’ve started a companion project to YUI, one that you call Yazaar. I gather Yazaar is an attempt to blend the “cathedral” development model YUI has followed with the intrinsic power of the bazaar, bringing the YUI developer community together to leverage each other’s energies on top of YUI’s open-source license?

Yes. The concept is to complement the all-corporate YUI team with an all-volunteer Yazaar group, so that the YUI community can enjoy the best of both worlds.

What kinds of projects are you hoping to attract under the Yazaar umbrella?

It’s not so much “projects” as “components” or “scripts”. In developing any application, most of us end up building one or more reusable components. Jamie Curnow built an unobstrusive validator over the YUI Dom component. Victor Morales extended DataTable to add autocomplete row filtering and row hiding. Matt J. Cormier created a YUI Picker, also based on the DataTable. Caridy Patiño has been developing several scripts that extend YUI components, like the TabView. Both Satyam and I have been extending the DataTable to add editing row in a separate form window. We also have people like Douglas Crockford and David Linquist posting scripts that add missing features or add support for common features, like cookies.

At some point, some of these scripts might be replicated by the standard YUI library. Or not. In the meantime, Yazaar provides a place where a developer can contribute a script without a lot of falderol.

Right now, the scripts are kept in three sections, “extras”, “patched”, and the main section. In the “extras” section, we share copies of miscellaneous third-party scripts, which are also available from the respective authors. Most of these are under the BSD license, just like YUI. The extras are provided in their original form, without modification.

In the “patched” section, we carry modified version of YUI scripts that fix known issues with the current releases. We make a point of reporting any patches to the YUI tracker and cross-referencing the issue number in the patched code.

In the main section, we carry original scripts that are being created and maintained by Yazaar contributors specifically for the YUI library. Anyone with an original script to contribute is invited to join the project. The scope of the library is any script that is useful to a developer’s YUI application, would also be useful to other applications, and is available under the BSD license.

To keep this a “win-win” proposition, the copyright for the various Yazaar scripts remain with the original authors, so no one is signing anything away. Details are on the Yazaar Charter page.

Author and poet Richard Brautigan wrote of a library where if “someone writes a book, they bring it to the library and place it on a shelf anywhere they choose.” Planet Yazaar is Brautigan Library for the YUI community :)

Are you planning a ratings system or other reputation management system to help YUI implementers see the projects that organically rise to the top within Yazaar?

I’m not, since that use case wouldn’t apply to the applications that I’m writing now. The point of Yazaar is to provide a way to share scripts that we already have. Of course, if I were working for InfoQ, or Nabble, or Amazon, where the application scope includes rating features, then I’d certainly try to create a ratings script that we could use at Yazaar and that other sites could use too. It would be fantastic if someone had a ratings script to contribute.

As an experienced YUI user, what feedback do you have for the YUI team at this point? Any significant pain points you’re hoping to see addressed? Any particular virtues in the library today that you want to see preserved?

That’s a tough one. Team YUI is already doing a vast number of things right. Overall, the project seems to be nothing but “virtues that should be preserved.” :)

To suggestions that we’ve already discussed on the list, like “Happy Trails” [a more intuitively arranged, less encyclopedic guide to the YUI components] and “starter applications” [holistic examples that integrate multiple YUI components], I’d next add: “Learn the lesson of Wikipedia.”

No one organization has the resources to do what Wikipedia is able to do. And no one has the resources to do everything YUI might want to do. For example, if Team YUI doesn’t have the resources to bring out the API tool as another team-supported artifact, try it as a conventional open source project. Let the YUI corporate developers work alongside peer developers from other projects. The YUI tool and tags may not be based directly on ScriptDoc or JsDoc or JsDoc Toolkit, but that doesn’t mean those groups wouldn’t be eager and able to help! It would a Good Thing if the ScriptDoc “specification” were expanded to include the tags that teams like YUI actually use. (I’ve started an omnibus list of tags on the Yazaar wiki.)

Speaking of wikis, a YUI community wiki might be another great community resource. That’s part of what we’re trying to do with Planet Yazaar, but an YUI-sponsored community wiki, open to everyone, could quickly grow into a vital resource.

By Eric MiragliaJune 4th, 2007

Pages

  • About
  • Contribute
  • YUI Jobs

Recent Posts

  • 3.11pr1 Released
  • YUI Weekly for June 14th, 2013
  • Pure 0.2.0 Released
  • YUI Weekly for June 7th, 2013
  • YUI 3.10.3 Released to Fix Reintroduced SWF Vulnerability

Archives

Categories

  • Accessibility (25)
  • CSS 101 (8)
  • Design (51)
  • Development (595)
  • Frontend Jobs at Yahoo (13)
  • Graded Browser Support (8)
  • In the Wild (63)
  • Miscellany (11)
  • Open Hours (44)
  • Performance (23)
  • Releases (26)
  • Target Environments (11)
  • Yeti (4)
  • YUI 3 Gallery (29)
  • YUI Events (45)
  • YUI Implementations (55)
  • YUI Theater (146)
  • YUI Weekly (41)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
© 2013 YUI Blog