The language of the material is friendly and low-key -- this is great.
For students who don't even yet know HTML or CSS, I like your general approach a lot:
# YUI 3 Cookbook Table of Contents | |
## YUI BASICS | |
### Put YUI on the Page | |
* Load YUI | |
* Load debug builds | |
* Load locally hosted builds | |
* Load a YUI 2 widget |
goer@lowerbicycle-lm /tmp/yeti $ git init | |
Initialized empty Git repository in /private/tmp/yeti/.git/ | |
goer@lowerbicycle-lm /tmp/yeti $ git pull git://github.com/reid/yeti | |
remote: Counting objects: 1399, done. | |
remote: Compressing objects: 100% (643/643), done. | |
remote: Total 1399 (delta 813), reused 1253 (delta 720) | |
Receiving objects: 100% (1399/1399), 279.36 KiB | 208 KiB/s, done. | |
Resolving deltas: 100% (813/813), done. | |
From git://github.com/reid/yeti | |
* branch HEAD -> FETCH_HEAD |
<!DOCTYPE html> | |
<title>My App</title> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/combo?3.4.0/build/cssreset/cssreset-min.css& | |
3.4.0/build/cssfonts/cssfonts-min.css&3.4.0/build/cssgrids/cssgrids-min.css"> | |
<link rel="stylesheet" href="styles.css"> | |
<script src="http://yui.yahooapis.com/3.4.0/build/yui/yui-min.js"></script> | |
<script> | |
YUI().use("event-base", function (Y) { | |
// specify "node-base", "event-base", or whichever modules your app requires |
/* What do we really care about when creating a Base-derived object? | |
1. the object we are deriving from | |
2. string name | |
3. properties and methods | |
4. attributes | |
Goals: simpler method with fewer args & less nesting. Simplify | |
adding attributes. No need for empty [] hack as with Y.Base.create() */ | |
Y.Example = Y.Model.derive('example-model', { | |
// prototype methods and properties here | |
hello: function () { |
<?php | |
header('Content-type: application/json'); | |
$response = array(); | |
if (isset($_GET['library']) && $_GET['library'] === 'YUI') { | |
$response['advice'] = 'YES'; | |
$response['reason'] = "YUI doesn't eat your soul from the inside."; | |
} | |
else { | |
$response['advice'] = 'NO'; |
"yui3-u"
node: http://www.yuiblog.com/blog/?s=open+hoursWelcome to the YUI library! This tutorial contains everything you need to get up and running quickly with YUI. If you've never used YUI before, but you perhaps have a little experience with plain JavaScript or JavaScript frameworks, read onward.
Note that if you have experience with jQuery, it is a great idea to read or at least skim through the JS Rosetta Stone, which demonstrates how common jQuery and YUI idioms map to each other. The good news is that in the areas where YUI and jQuery overlap, you'll find that it is not too difficult to translate back and forth between the two.
The easiest way to get started with YUI is to use SimpleYUI, a convenient package for working with DOM nodes, events, UI effects, and AJAX.
I wrote this for a colleague at work, but I thought I'd share it here for those that are confused as to the role of a build tool. To those that have not spent years working with various build tools, it may be tempting to find one that is written in the language you are using (i.e. Phing, Ant, Rake, and Grunt come to mind) or perhaps you are easily persuaded by things that have a lot of features (Gradle immediately comes to mind).
To be honest, build tools are just glorified shell script wrappers. Some more complex than others. At the end of the day, a build tool should do four things to be useful and not get in the way: