Include to favorites
Log in Logout Register
Start Login Contact Help Photos What's new
Avanced Search
FAQ
RESULTS IN: TEXT IMAGES
 

Hello, Guest
Login  Register
Online: 147 visitors

Blogging (2)
Business (1)
Educational (2)
Gadgets (1)
Games (8)
High Tech News (1)
Internet (1)
PC (2)
PDA (0)
Science (1)
Shopping (6)
Software (1)
Wireless (1)


Browse by date

<< May 2012 >>
MonTueWedThrFriSatSun
123456
78910111213
14151617181920
21222324252627
28293031




Recent searches

Popular searches

Hot this month

Weblogs Archive


GADGETS AND GAMES DIRECTORY :: > Software Register Weblog >  Software Tech Weblogs - WEEKLYBITS.COM GADGETS AND GAMES DIRECTORY
Yahoo User Interface Blog
generated by http://wordpress.org/?v=3.0.4  en Blogger
SEND A FRIEND
Suscribing to  please login first
User: Login

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications.
News and Articles about Designing and Developing with Yahoo! Libraries.Visit Yahoo! User Interface Blog
Address URLhttp://www.yuiblog.com/blog    Registered: 26-Apr-2008
Ads:

Send to email
Visit Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt in Developmentbooksdan wellmandaniel barreiropacktSatyamyui 2
By Satyam
el 20-Jul-2010

Daniel Barreiro (Satyam)About the Author: Daniel Barreiro (screen name Satyam) has been around for quite some time. The ENIAC was turned off the day before he was born, so he missed that but he hasn’t missed much since. He’s had a chance to punch cards, program 6502 chips (remember the Apple II?), own a TRS-80 and see some fantastic pieces of operating equipment in his native Argentina which might have been in museums elsewhere. When globalization opened the doors to the world, his then barely usable English (plus an Electrical Engineering degree) put him on the career path which ended in a 5-year job in the Bay Area back in the days of NCSA Mosaic. Totally intrigued by the funny squiggles a friend of his wrote in his plain text editor, full of <’s and >’s, he ended up learning quite a lot about the world of frontend engineering. It’s been a long journey since COBOL and Fortran. Now he lives quite happily semi-retired in the Mediterranean coast close to Barcelona, Spain. When he’s not basking in the Mediterranean sun, Satyam can be found among the most prolific and knowledgable participants in the YUI community on the YUI Forums.

In December 2009, editors at Packt Publishing asked me if I’d like to write the second edition of their book on the YUI Library. The original author, Dan Wellman, was engaged in other business at the time, and they needed an author who was broadly familiar with YUI 2. The first thing I thought was: aren’t you a little bit late? Much of YUI 3 was already out in GA and more was coming with every release. But the Packt team wanted to proceed, and I agreed to take on the challenge.

On July 16th, the new volume came out, YUI 2.8: Learning the Library, not as a second edition but as a new title. In the end, it wasn’t such a bad decision. While the book was going through the editing process, YUI 3 gained the ability to load YUI 2 components from the use() statement. This extends the usefulness of the extensive YUI 2 catalog while taking the pressure off developers to produce YUI 3 versions of all YUI 2 components.

  • Sample Chapter: Packt has released a sample chapter from the new volume, covering YUI 2.8 Rich Text Editor, on their website, giving you a flavor of what the new book contains.

The goal with this new volume was to cover all non-beta YUI 2 components. This broad vision forced me to take a deeper look at components I had barely used in their most basic forms as well as others I’d not used at all. However, in contrast to the first edition, a project that began not long after the library had been made public, I had a few years of cumulative experience with YUI ? my own experience paired with that of the many users who share their experiences and advice on the forums and the blog. I was also spared from many blunders by an excellent team of reviewers, two of whom, Caridy Patiño and Iliyan Peichev, are also well known YUI contributors.

To keep the book to a manageable length, I eliminated some images, long examples, and reference material that could be found at the YUI website. While the first edition had at most two components per chapter, the new one has up to four and has a couple of new chapters. Even so, some components didn’t make the cut.

The Evolution of YUI 2

I learned a lot about the YUI Library while writing this book, and the changes I made to Dan’s text were instructive about the library’s evolution since its release in 2006.

The programming style for example code has changed in these years. Instead of creating a namespace (or using YAHOO.example, which is always available as a placeholder), we now tend to fit everything within an anonymous function created when the DOM becomes available. (This style is closer to what we see in YUI 3.) We now use namespaces when we absolutely need to create globally accessible variables (including objects) such as when we create a custom library component. Sandboxing saves us some typing, since we can define functionally-scoped aliases for the objects we use more often from YUI (Dom, Event, Lang are common shortcuts) or variables of our own. This approach also lets YUI Compressor do a far better job.

Having a panoramic view of the whole of the library allowed me to notice how it developed over time. The architecture of the components changed and it is clear how everything has converged into what is now YUI 3.

Early components, like TreeView, had few dependencies. As certain patterns started to become obvious, some basic component infrastructure started to develop. The Container family had a Config object which allowed for getter and setter methods, and so have all the components that inherit from it. It also uses the Custom Event object, which is one of the two ways to work with custom events we have available in YUI 2.

With the release of TabView came the YUI 2 Element Utility, which provided improved getters and setters (via AttributeProvider) as well as better custom events (via EventProvider). Seventeen other YUI 2 components inherit from Element. Looking at the evolution the library, it’s easy to see how the ideas behind Element, as a DOM element wrapper, came to inform YUI 3’s Node. Element’s role as a basis for other components was broken out in YUI 3’s Base and Widget, though the new components are all far more powerful and complete, each in its own area. For example, Node’s all and one methods return Node instances while Element’s getXxxx methods return plain DOM element references, not completely abstracting the DOM.

The two models, Config and CustomEvents on the one hand and AttributeProvider and EventProvider on the other are not totally incompatible. In Menu and Split Buttons both models coexist, as Button inherits from Element and it hosts a regular Menu that inherits from Container.

Undoubtedly, YUI 3 benefited from all of this experience; but YUI 2 also benefitted from YUI3. Cool stuff came from YUI 3 to enrich YUI 2, such as event-delegate and element-delegate and other new events we can listen to (focusin and focusout, mouseenter and mouseleave). This also became possible because of the way we load components, which changed during YUI 2’s lifespan ? most importantly with the introduction of the YUI 2 Loader ? and became formalized as intrinsic support for client-side loading in YUI 3.

Loading affected how the components got designed and how the final component files are built. In YUI 2, to minimize the number of outstanding server requests, the components had to have as much of what they needed packed together. Thus, some components got loosely related objects in them just to have them handy when and if needed, others got a bunch of objects with a whole range of features packed in one file because loading the separate parts was too costly. Then came aggregates such as yahoo-dom-events.js or reset-fonts-grids.css since they are almost invariably used together or utilities.js which gathers all the often used components in the YAHOO.util branch. But the real change came with combo-handled requests, which allowed us to pull any number of script and css files each in just one http request. That makes it less necessary to optimize the packaging of the objects in the library into component files and those into aggregates based on a hypothetical ‘average user’.

In YUI 3 we no longer need to load the ‘container family’ all at once. We can load the separate widget-xxxx files on top of the basic widget according to the features we need. That approach is the standard in YUI 3, but it came as one of the steps in the evolution of YUI 2. Hence, more recent YUI 2 components like event-delegate and element-delegate are packaged separately from from their base components and so is Event’s mouseenter and mouseleave. We might see further splits in library components in future releases, allowing you to choose more specifically the feature set you want and leave unneeded code off the page.

This is a story of progress, a process that necessarily went though some failed efforts. Why doesn’t TreeView inherit from Element or why hasn’t Container, and thus Menu, switched to Element or, at least, to AttributeProvider and EventProvider? Technically, the answer is ‘backward compatibility’, but in more general terms it is ‘respect’. There are thousands of websites (and tens of thousands of developers) using the the published public interface of the YUI 2 components. Making those changes would break many applications or would cut them off the upgrade path, should they want to benefit from a code fix or a new feature. Being so respectful of the installed code base is a library feature in itself. Being respectful to us, who create that code, is a feature of the people in the YUI team, and I’m very grateful it is so.



Read 30 times

Suscribing to  please login first
Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt -  Tech Weblogs - WEEKLYBITS.COM  Blogger Is a collection of i

Photologs

Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
About the Author: Daniel Barreiro (screen name Satyam) has been around for quite some time. The ENIAC was turned off the day before he was born, so he missed that but he hasn’t missed much since. He’s had a chance to punch cards, program 6502 chips (remember the Apple II?), own a TRS-80 and [...] [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 20-Jul-2010 by Satyam in Developmentbooksdan wellmandaniel barreiropacktSatyamyui 2
Read 30 times. More hits in More articles Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt Images about Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Yahoo User Interface Blog Blogger

Is a collection of industrial-grade JavaScript utilities and widgets that enable you to efficiently get the most out of today’s powerful web applications. Yahoo! User Interface Blog News and Articles about Designing and Developing wiht Yahoo! Libraries.

Ask Satyam ? and Be Eligible for a Free Copy of the New YUI 2.8 Book from Packt
Satyam (Daniel Barreiro) wrote last week about his experience writing YUI 2.8: Learning the Library, the new YUI 2 volume now available from Packt. Packt has generously offered a few free electronic copies to YUIBlog readers. Suggest a question or tutorial you’d like to see from Satyam on a YUI 2.8-related topic as a comment [...] [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 29-Jul-2010 by Eric Miraglia in Development
Read 27 times. More hits in More articles Ask Satyam ? and Be Eligible for a Free Copy of the New YUI 2.8 Book from Packt Images about Ask Satyam ? and Be Eligible for a Free Copy of the New YUI 2.8 Book from Packt
Kotaku`s The Gamers Guide Blogger

XBOX 360 Gamers Weblog Gossip, news and leaks for obsessive gamers Kotaku As if you don't waste enough of your time in a gamer's haze, here's Kotaku: a gamer's guide that goes beyond the press release. Gossip, cheats, criticism, design, nostalgia, pred

Sci-Fi Author Writing Not One, Not Two, But Three Games For Electronic Arts [Ea]
Acclaimed British science fiction author Richard K. Morgan has announced that he's teaming up with EA to help pen the stories for three of the publisher's upcoming titles. Writing on his site, Morgan - best known for his novels Altered Carbon and Black Man/Thirteen - says he was [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 04-Nov-2009 by Luke Plunkett in Ea NewsRichard K. Morgan
Read 18 times. More hits in More articles  Sci-Fi Author Writing Not One, Not Two, But Three Games For Electronic Arts [Ea] Images about  Sci-Fi Author Writing Not One, Not Two, But Three Games For Electronic Arts [Ea]
Teachable Moment Blogger

Instructional technology research and news from Trey Martindale

Trey's E-Learning Trey Martindale on e-learning, openness, environments, and other fun.

Running notes on the future of e-learning
A few running notes from the panel on the future of e-learning, here at the D2L user’s conference. Note: Next time I should be ready to use CoverItLive or another live blogging tool. Stephen Downes talks about open educational resources. GNU license Creative Commons http://creativecommons.org attribution, non-commercial, no-derivatives, share-alike. David Wiley OPL http://opencontent.org/ope [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 23-Jul-2008 by Trey Martindale in News
Read 41 times. More hits in More articles Running notes on the future of e-learning Images about Running notes on the future of e-learning
Teachable Moment Blogger

Instructional technology research and news from Trey Martindale

Trey's E-Learning Trey Martindale on e-learning, openness, environments, and other fun.

Notes from the Other Side: Kudos and Complaints From My First E-learning Experience
Here’s a revealing account of one person’s experience taking an online university course, via eLearn Magazine: eLearn: Feature Article Technorati Tags: elearning, onlinecourse [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 16-Jul-2008 by Trey Martindale in e-learning
Read 33 times. More hits in More articles Notes from the Other Side: Kudos and Complaints From My First E-learning Experience Images about Notes from the Other Side: Kudos and Complaints From My First E-learning Experience
Teachable Moment Blogger

Instructional technology research and news from Trey Martindale

E-Learning Inquiry What Trey Martindale is Learning about E-Learning

Notes from the Other Side: Kudos and Complaints From My First E-learning Experience
Here’s a revealing account of one person’s experience taking an online university course, via eLearn Magazine: eLearn: Feature Article Technorati Tags: elearning, onlinecourse [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 16-Jul-2008 by Trey Martindale in e-learning
Read 28 times. More hits in More articles Notes from the Other Side: Kudos and Complaints From My First E-learning Experience Images about Notes from the Other Side: Kudos and Complaints From My First E-learning Experience
Kotaku`s The Gamers Guide Blogger

XBOX 360 Gamers Weblog Gossip, news and leaks for obsessive gamers Kotaku As if you don't waste enough of your time in a gamer's haze, here's Kotaku: a gamer's guide that goes beyond the press release. Gossip, cheats, criticism, design, nostalgia, pred

Hugo-Nominated Sci-Fi Author Writes The Book On Crysis 2 [Books]
Click here to read Hugo-Nominated Sci-Fi Author Writes The Book On Crysis 2 - Hugo-Nominated Sci-Fi Author Writes The Book On Crysis 2 [Books] [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 01-Dec-2010 by Mike Fahey in Bookscrysis 2Crysis: LegionCrytekDel rey booksEaNovelizationPCPeter wattsPS3XBox360
Read 13 times. More hits in More articles Hugo-Nominated Sci-Fi Author Writes The Book On Crysis 2 [Books] Images about Hugo-Nominated Sci-Fi Author Writes The Book On Crysis 2 [Books]
Kotaku`s The Gamers Guide Blogger

XBOX 360 Gamers Weblog Gossip, news and leaks for obsessive gamers Kotaku As if you don't waste enough of your time in a gamer's haze, here's Kotaku: a gamer's guide that goes beyond the press release. Gossip, cheats, criticism, design, nostalgia, pred

Penny Arcade Writing "Anniversary" Book, Out In 2010 [Twisp & Catsby]
Click here to read Raskulls Preview: Dig, Please - Raskulls Preview: Dig, Please [PAX East] It's testament to the lasting popularity of Penny Arcade that we can write a headline like that. After all, how many of the site's readers would have expected to still be reading them in 2010? That's, like, flying cars/robot helpers territo [..] Read complete article
Subscribe to Author Notes: Writing YUI 2.8: Learning the Library, the New YUI 2 Book from Packt
Published 26-Feb-2009 by Luke Plunkett in Twisp & Catsby Books News Penny Arcade
Read 16 times. More hits in More articles  Penny Arcade Writing "Anniversary" Book, Out In 2010 [Twisp & Catsby] Images about  Penny Arcade Writing "Anniversary" Book, Out In 2010 [Twisp & Catsby]

Warning We are not responsible of information posted from external feeds. Use this website at your own risk. Notice: We will not be liable for any direct or indirect loss or damage arising under this disclaimer or in connection with our website, whether arising in tort, contract, or otherwise.


Your Site here Your Site here Your site here Your site here Your site here