ArticleslgStudy

computer science

YUI Library

YUI Library is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand YUI Library rather than just read about it. In short: The Yahoo! User Interface Library (YUI) is a discontinued open-source JavaScript library for building richly interactive web applications using techniques such as Ajax, DHTML, and DOM scripting.

YUI Library — main illustration
YUI Library — illustration

Key takeaways

  • YUI Library belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect YUI Library to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of YUI Library from memory before moving on to harder problems.

Reference excerpt

The Yahoo! User Interface Library (YUI) is a discontinued open-source JavaScript library for building richly interactive web applications using techniques such as Ajax, DHTML, and DOM scripting. YUI includes several cores CSS resources. It is available under a BSD License. Development on YUI began in 2005 and Yahoo! properties such as My Yahoo! and the Yahoo! front page began using YUI in the summer of that year. YUI was released for public use in February 2006. It was actively developed by a core team of Yahoo! engineers. In September 2009, Yahoo! released YUI 3, a new version of YUI rebuilt from the ground up to modernize the library and incorporate lessons learned from YUI 2. Among the enhancements are a CSS selector driven engine, like jQuery, for retrieving DOM elements, a greater emphasis on granularity of modules, a smaller seed file that loads other modules when necessary, and a variety of syntactic changes intended to make writing code faster and easier. The YUI Library project at Yahoo! was founded by Thomas Sha and sponsored internally by Yahoo! co-founder Jerry Yang; its principal architects have been Sha, Adam Moore, and Matt Sweeney. The library's developers maintain the YUIBlog; the YUI community discusses the library and its implementations in its community forum. On August 29, 2014, it was announced that active development of YUI by Yahoo! would end, citing the evolution of the JavaScript standards, steadily decreasing interest in large JavaScript libraries by developers, and the proliferation of server-side solutions. Future development will be limited to maintenance releases addressing issues that are "absolutely critical to Yahoo properties."

Features The YUI Library is fully documented on its website; detailed API documentation accompanies the library download. It has six types of components: YUI core, utilities, UI controls, CSS components, developer tools, and build tools.

Core The YUI Core is a light (31KB minified) set of tools for event management and DOM manipulation.

YUI Global Object The YUI Global Object contains language utilities, a script loader, and other baseline infrastructure for YUI. Dom Collection Helps with common DOM scripting tasks, including element positioning and CSS style management. Event Utility Provides developers with easy and safe access to browser events (such as mouse clicks and key presses). It also provides the Custom Event object for publishing and subscribing to custom events.

Utilities Animation Helps create "effects" by animating the position, size, opacity or other characteristics of page elements. Browser History Manager Helps web applications use the browser's back button and bookmarking functionality. Connection Manager Helps manage XMLHttpRequest transactions in a cross-browser fashion. It has integrated support for form posts, error handling, callbacks and file uploading. Cookie Allows you to manage browser cookies and subcookies through a simple API. DataSource Provides a common configurable interface for other components to interact with different types of data, from simple JavaScript arrays to online servers over XHR. Drag and drop The YUI Drag and Drop Utility makes it easy to make elements "draggable" and to create drop targets that respond to drag events. Element Provides a wrapper for HTML elements in the DOM and makes simpler common tasks such as adding listeners, manipulating the DOM, and setting and getting attributes. Get The Get Utility supports the asynchronous loading of data and scripts through script nodes and the dynamic loading of external CSS files. ImageLoader YUI's ImageLoader allows you to defer the loading of images that are not visible in the viewport at the time the page loads. This can result in big performance boosts. JSON The JSON Utility provides methods for validation of incoming JSON data to verify that it is safe and methods to convert JavaScript data to a JSON-formatted string. These methods are based on Douglas Crockford's work at JSON.org. Resize Allows you to make any block-level HTML element resizable. Selector The YUI Selector Utility allows you to grab references to HTML elements via CSS3 selector syntax. YUI Loader YUI Loader is a client-side loader engine that can dynamically load any YUI component (and dependencies) on the fly.

Controls AutoComplete Provides autocomplete feature (suggestion lists and type-ahead functionality) for user interactions involving text-entry. It supports a variety of data-source formats. It also supports server-side data-sources via XMLHttpRequest. Button Enables the creation of rich, graphical buttons that function like traditional HTML form buttons. Calendar A graphical, dynamic control used for date selection. Charts The Charts Control retrieves data via the DataSource Utility and displays the data in a variety of common chart formats (line, bar, pie, etc.). Color Picker The Color Picker Control provides a rich visual interface for color selection. Container Supports a variety of DHTML windowing patterns including Tooltip, Panel, Dialog, SimpleDialog, Module and Overlay. DataTable Simple yet powerful API to display screen-reader accessible tabular data on a web page. Notable features include sortable columns, pagination, scrolling, row selection, resizable columns, and inline editing. ImageCropper ImageCropper provides the UI and interactive elements for a client-side image cropper. Layout Manager Allows you to create cross-browser, pixel perfect layouts with little effort by providing a fixed layout containing, top, bottom, left, right and center layout units. Menu Provides an easy API for creating fly-out menus, menu bars, and context menus. Rich Text Editor The YUI Rich Text Editor is a sophisticated client-side text-processor that is modular and highly configurable, suitable for any open-ended text-entry situation. Slider Provides a generic slider element that enables the user to choose within a finite range of values on one or two axes. TabView Provides navigable tabbed views of content; supports dynamic loading of tab content via XMLHttpRequest. TreeView Produces a content tree whose nodes can be expanded and contracted. Uploader Allows for multi-file file upload with feedback on upload progress.

… excerpt ends here. Continue reading the full article.

Illustrations

YUI Library illustration

Worked examples

Example 1 — a first encounter with YUI Library

Start with the simplest possible case. Write down what YUI Library claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to YUI Library before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about YUI Library ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of YUI Library

In research
YUI Library appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses YUI Library in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
YUI Library is common in secondary-school and first-year university syllabi. It links to neighbouring topics Ajax (programming), CSS frameworks, JavaScript libraries, so understanding it makes those chapters shorter.
In everyday life
Look for YUI Library outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “YUI Library” →

How to study YUI Library in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what YUI Library means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain YUI Library out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is YUI Library in simple terms?

The Yahoo! User Interface Library (YUI) is a discontinued open-source JavaScript library for building richly interactive web applications using techniques such as Ajax, DHTML, and DOM scripting.

Why does YUI Library matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study YUI Library?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on YUI Library.

Tags

  • Ajax (programming)
  • CSS frameworks
  • JavaScript libraries
  • Software using the BSD license
  • Yahoo! software

Keep exploring