Contributing to YUI
Philip S Tellis
Yahoo! Inc
A Brief History
flickr:xcaballe/365044685
- Javascript development was largely black magic
- Those who could, did
- Those who couldn't, copied
- Mostly from those who thought they could but really couldn't
- Lots of browser specific nonsense
Looking around, it looks like that's still the case
Javascript libraries
flickr:guspim/2911102867
- Javascript design patterns born out of browser stability
- Patterns accumulated into libraries
- Libraries built communities
- An ecological subsystem evolved
- Only the fittest survived
YUI - Yahoo! User Interface
flickr:bluesmoon/IMG
- Conceived in 2005
- Released to the world in February 2006
- BSD Licenced
- Companion design pattern library released under a CC-BY license
2Getting involved - Learn Javascript
flickr:charliebrewer/2897862701_6bd9db6ea0_b
- Learn Javascript the right way
- Read Crockford's Javascript the good parts
- Run jslint on all your code
- Really understand prototypal inheritance
- Read Stefanov's Object Oriented Javascript
2Getting involved - Learn Javascript
flickr:charliebrewer/2897862701_6bd9db6ea0_b
- Learn Javascript the right way
- Read Crockford's Javascript the good parts
- Run jslint on all your code
- Really understand prototypal inheritance
- Read Stefanov's Object Oriented Javascript
2Getting involved - Learn Javascript
flickr:charliebrewer/2897862701_6bd9db6ea0_b
- Learn Javascript the right way
- Read Crockford's Javascript the good parts
- Run jslint on all your code
- Really understand prototypal inheritance
- Read Stefanov's Object Oriented Javascript
2Getting involved - Learn Javascript
flickr:charliebrewer/2897862701_6bd9db6ea0_b
- Learn Javascript the right way
- Read Crockford's Javascript the good parts
- Run jslint on all your code
- Really understand prototypal inheritance
- Read Stefanov's Object Oriented Javascript
2Getting involved - Learn Javascript
flickr:charliebrewer/2897862701_6bd9db6ea0_b
- Learn Javascript the right way
- Read Crockford's Javascript the good parts
- Run jslint on all your code
- Really understand prototypal inheritance
- Read Stefanov's Object Oriented Javascript
What is this CLA?
flickr:coolmel/502576648_ddcd3936ec_o
- YUI's Contributor License Agreement
- Ensures that you have the authority to contribute the code that you do
- Protect users from dirty code
- Does not transfer copyright
What is this CLA?
flickr:coolmel/502576648_ddcd3936ec_o
- YUI's Contributor License Agreement
- Ensures that you have the authority to contribute the code that you do
- Protect users from dirty code
- Does not transfer copyright
What is this CLA?
flickr:coolmel/502576648_ddcd3936ec_o
- YUI's Contributor License Agreement
- Ensures that you have the authority to contribute the code that you do
- Protect users from dirty code
- Does not transfer copyright
What is this CLA?
flickr:coolmel/502576648_ddcd3936ec_o
- YUI's Contributor License Agreement
- Ensures that you have the authority to contribute the code that you do
- Protect users from dirty code
- Does not transfer copyright
When should you sign the CLA?
flickr:artolog/2519646167
- Any intellectual property requires a signed CLA, eg:
- Code, including any significant patch or feature addition
- Documentation, including any writing 500 words or longer
- Examples/demo code that becomes part of the YUI distribution
- Graphics or other visual creative work that becomes part of the YUI distribution
When should you sign the CLA?
flickr:artolog/2519646167
- Any intellectual property requires a signed CLA, eg:
- Code, including any significant patch or feature addition
- Documentation, including any writing 500 words or longer
- Examples/demo code that becomes part of the YUI distribution
- Graphics or other visual creative work that becomes part of the YUI distribution
When should you sign the CLA?
flickr:artolog/2519646167
- Any intellectual property requires a signed CLA, eg:
- Code, including any significant patch or feature addition
- Documentation, including any writing 500 words or longer
- Examples/demo code that becomes part of the YUI distribution
- Graphics or other visual creative work that becomes part of the YUI distribution
When should you sign the CLA?
flickr:artolog/2519646167
- Any intellectual property requires a signed CLA, eg:
- Code, including any significant patch or feature addition
- Documentation, including any writing 500 words or longer
- Examples/demo code that becomes part of the YUI distribution
- Graphics or other visual creative work that becomes part of the YUI distribution
When should you sign the CLA?
flickr:artolog/2519646167
- Any intellectual property requires a signed CLA, eg:
- Code, including any significant patch or feature addition
- Documentation, including any writing 500 words or longer
- Examples/demo code that becomes part of the YUI distribution
- Graphics or other visual creative work that becomes part of the YUI distribution
Public version control system
flickr:malias/261406666
- Any day now
- Final touches on a public Git repository
- No longer require a sponsor
- All commits can be viewed by anyone
Public version control system
flickr:malias/261406666
- Any day now
- Final touches on a public Git repository
- No longer require a sponsor
- All commits can be viewed by anyone
Public version control system
flickr:malias/261406666
- Any day now
- Final touches on a public Git repository
- No longer require a sponsor
- All commits can be viewed by anyone
Public version control system
flickr:malias/261406666
- Any day now
- Final touches on a public Git repository
- No longer require a sponsor
- All commits can be viewed by anyone
Code Patterns
flickr:bluesmoon/IMG
- Get familiar with YUI's code patterns
- Encapsulate and hide private data
- Private methods
- Extending v/s Augmenting
Code Patterns
flickr:bluesmoon/IMG
- Get familiar with YUI's code patterns
- Encapsulate and hide private data
- Private methods
- Extending v/s Augmenting
Code Patterns
flickr:bluesmoon/IMG
- Get familiar with YUI's code patterns
- Encapsulate and hide private data
- Private methods
- Extending v/s Augmenting
Code Patterns
flickr:bluesmoon/IMG
- Get familiar with YUI's code patterns
- Encapsulate and hide private data
- Private methods
- Extending v/s Augmenting
1aCode Patterns: Private variables visible
flickr:krisgriffon/26220260_7ae6f36f4c_b
YAHOO.util.Foo = function() {
this._foo = 10;
this._bar = "Hello, World";
return this;
};
var foo = new YAHOO.util.Foo();
foo._foo = 20;
1bCode Patterns: Private variables hidden
flickr:krisgriffon/26220260_7ae6f36f4c_b
(function() {
var U=YAHOO.util, E=YAHOO.util.Event;
var l_foo, l_bar;
U.Foo = function() {
l_foo = 10;
l_bar = "Hello, World";
return this;
};
}());
var foo = new YAHOO.util.Foo();
// No access to l_foo
2aCode Patterns: Private methods exposed
flickr:sovietuk/154340012_0445caa0bd_b
YAHOO.util.Foo = function() {
this._init();
return this;
};
YAHOO.util.Foo.prototype = {
_init: function() {
// private method
}
};
2bCode Patterns: Private methods hidden
flickr:sovietuk/154340012_0445caa0bd_b
(function() {
var _init = function() {
// private method
};
YAHOO.util.Foo = function() {
_init.call(this);
return this;
};
}());
3Code Patterns: Extending v/s Augmenting
flickr:thevince/2557418141_8145b77c15_b
YAHOO.lang.extend(derived, base, overrides);
YAHOO.lang.augment(object, mixin, overrides);
- Use extend for inheritance
- Use augment to add properties to an existing object
3Code Patterns: Extending v/s Augmenting
flickr:thevince/2557418141_8145b77c15_b
YAHOO.lang.extend(derived, base, overrides);
YAHOO.lang.augment(object, mixin, overrides);
- Use extend for inheritance
- Use augment to add properties to an existing object
YUI is brought to you by
flickr:equanimity/2126487011_773f18494e_b
- The YUI team:
- Thomas Sha, Eric Miraglia, Nate Koechley, Satyen Desai
- Jenny Donneley, Adam Moore, Tod Kloots, Luke Smith
- Matt Sweeney, Dav Glass, Doug Crockford
- Contributors:
- Gopal Venkatesan, Caridy Patiño, Satyam, Philip Tellis
YUI is brought to you by
flickr:equanimity/2126487011_773f18494e_b
- The YUI team:
- Thomas Sha, Eric Miraglia, Nate Koechley, Satyen Desai
- Jenny Donneley, Adam Moore, Tod Kloots, Luke Smith
- Matt Sweeney, Dav Glass, Doug Crockford
- Contributors:
- Gopal Venkatesan, Caridy Patiño, Satyam, Philip Tellis
Photo Credits
flickr:25602112@N07/2539754489_a20454a273_o
- All photos are under a CC-BY, CC-BY-NC, CC-BY-SA or CC-BY-NC-SA license
- http://flickr.com/photos/code_martial/1543735477/
- http://flickr.com/photos/xcaballe/365044685/
- http://flickr.com/photos/guspim/2911102867/
- http://flickr.com/photos/artolog/2258975829/
- http://flickr.com/photos/ntr23/730371240/
- http://flickr.com/photos/charliebrewer/2897862701/
- http://flickr.com/photos/lievensoete/2903489237/
- http://flickr.com/photos/bredgur/2925876954/
- http://flickr.com/photos/coolmel/502576648/
- http://flickr.com/photos/artolog/2519646167/
- http://flickr.com/photos/knowprose/131893050/
- http://flickr.com/photos/malias/261406666/
- http://flickr.com/photos/krisgriffon/26220260/
- http://flickr.com/photos/sovietuk/154340012/
- http://flickr.com/photos/thevince/2557418141/
- http://flickr.com/photos/equanimity/2126487011/
- http://flickr.com/photos/25602112@N07/2539754489/
- http://flickr.com/photos/encouragement/291094770/