Creating custom modules using YUI3
by Gonzalo Cordero on Apr 24, 2010
- 4,202 views
Presentation on how to create custom modules using YUI3 and how to submit them to the YUI Gallery.
Presentation on how to create custom modules using YUI3 and how to submit them to the YUI Gallery.
Accessibility
Categories
Tags
More...Upload Details
Uploaded via SlideShare as Apple Keynote
Usage Rights
© All Rights Reserved
Statistics
- Favorites
- 11
- Downloads
- 88
- Comments
- 0
- Embed Views
- Views on SlideShare
- 4,140
- Total Views
- 4,202
YUI is a function, not just an object bag ala YAHOO. It returns an instance, your sandbox.
The library API is added to the YUI instance, not YUI.
Facilitates having multiple sandboxes on a page w/o collision.
- As with Y.use(), YUI.add() provides an applied module pattern
- This gives you a truly private space to define vars and functions local to your module
- Code defined inside add() is held by the YUI infrastructure to execute at the proper time
- Module code is not executed until a YUI instance requests it via Y.use('my-module', function (Y) {...}); but it is executed at some point after its required modules and before the use callback.
- As with Y.use(), YUI.add() provides an applied module pattern
- This gives you a truly private space to define vars and functions local to your module
- Code defined inside add() is held by the YUI infrastructure to execute at the proper time
- Module code is not executed until a YUI instance requests it via Y.use('my-module', function (Y) {...}); but it is executed at some point after its required modules and before the use callback.
- As with Y.use(), YUI.add() provides an applied module pattern
- This gives you a truly private space to define vars and functions local to your module
- Code defined inside add() is held by the YUI infrastructure to execute at the proper time
- Module code is not executed until a YUI instance requests it via Y.use('my-module', function (Y) {...}); but it is executed at some point after its required modules and before the use callback.
- As with Y.use(), YUI.add() provides an applied module pattern
- This gives you a truly private space to define vars and functions local to your module
- Code defined inside add() is held by the YUI infrastructure to execute at the proper time
- Module code is not executed until a YUI instance requests it via Y.use('my-module', function (Y) {...}); but it is executed at some point after its required modules and before the use callback.
- 'version' allows you to define version information for your component
- 'requires' defines the dependancies for your component
- 'version' allows you to define version information for your component
- 'requires' defines the dependancies for your component
- 'version' allows you to define version information for your component
- 'requires' defines the dependancies for your component