<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://www.okuryu.com/</id>
<title>Ryuichi Okumura</title>
<updated>2013-05-06T07:05:18-07:00</updated>
<link href="http://www.okuryu.com/" />
<link href="http://www.okuryu.com/atom.xml" rel="self" />
<author>
<name>Ryuichi Okumura</name>
<email>okuryu@okuryu.com</email>
</author>

<entry>
<id>http://www.okuryu.com/2013/04/30/iyql-0-3-0.html</id>
<title>iYQL 0.3.0, supported HTTPS endpoint</title>
<link href="http://www.okuryu.com/2013/04/30/iyql-0-3-0.html" />
<updated>2013-04-30T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;I have been updated Node.js version iYQL which I made last year. It added
&quot;--ssl&quot; option to command line in the update of this time.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ iyql -h
Usage: iyql [options]

Options:
  -p, --endpoint set YQL endpoint URL
                 default: http://query.yahooapis.com/v1/public/yql
  -e, --env      set YQL env URL
  -h, --help     print help
  -s, --ssl      use HTTPS endpoint
  -v, --version  print version
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This was formerly the default the HTTP YQL endpoint, but you can change it
to use at the time of the request the HTTPS YQL endpoint by specifying this
option.&lt;/p&gt;

&lt;p&gt;Because YQL tables can usually be used via HTTP, but some tables have become
mandatory request via HTTPS, that would be a good place to use this option
when such.&lt;/p&gt;

&lt;p&gt;You can be installed via npm command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ npm install -g iyql
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Because I think the ability add more, please check the GitHub repository if
desired or bug.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/okuryu/node-iyql&quot;&gt;node-iyql on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
</entry>

<entry>
<id>http://www.okuryu.com/2013/03/29/promises-aplus-at-yui.html</id>
<title>Promises/A+ at YUI</title>
<link href="http://www.okuryu.com/2013/03/29/promises-aplus-at-yui.html" />
<updated>2013-03-29T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;Added a module that compatible with the &lt;a href=&quot;http://promises-aplus.github.com/promises-spec/&quot;&gt;Promises/A+&lt;/a&gt; in
&lt;a href=&quot;http://www.yuiblog.com/blog/2013/03/13/announcing-yui-3-9-0/&quot;&gt;YUI 3.9.0&lt;/a&gt;, which was released recently. Promises/A+ is a
specification that further improve the specification of
&lt;a href=&quot;http://wiki.commonjs.org/wiki/Promises/A&quot;&gt;Promises/A&lt;/a&gt; of CommonJS. Such as specifications and test cases
that have been published on GitHub. Today, I would like to introduce the
sample code for that module.&lt;/p&gt;

&lt;h3&gt;Load promise module&lt;/h3&gt;

&lt;p&gt;First, you need to load &lt;code&gt;promise&lt;/code&gt; module, and you can use &lt;code&gt;Y.Promise&lt;/code&gt; within
YUI sandbox.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;YUI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;promise&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;c1&quot;&gt;// You can use Y.Promise&lt;/span&gt;

&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;&quot;Y.Promise&quot; and &quot;then&quot; function&lt;/h3&gt;

&lt;p&gt;Basic usage is something similar to the following.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;promise&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// value: 10&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The callback function of &lt;code&gt;Y.Promise&lt;/code&gt; accept a second function for rejected.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;promise&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// value: 20&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;A instance of &lt;code&gt;Y.Promise&lt;/code&gt; is chainable.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;promise&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;OK 1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;OK 2&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;OK 3&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This result just below.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;OK 1
OK 2
OK 3
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&quot;Y.when&quot; function and &quot;Y.batch&quot; function&lt;/h3&gt;

&lt;p&gt;The promise module provide 2 advance functions for YUI instance.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Y.when&lt;/code&gt; function is abstraction API allowing you to interact with promises
or raw values as if they were promises.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;when&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}),&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// value: 10&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;code&gt;Y.batch&lt;/code&gt; function returns a new promise that will be resolved when all
operations have completed.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;fulfill&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;batch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;20&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fn&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// [10, 20, 30]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So please try using it now.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2013/02/13/using-yconnect-with-nodejs-and-yql.html</id>
<title>Using YConnect with Node.js and YQL</title>
<link href="http://www.okuryu.com/2013/02/13/using-yconnect-with-nodejs-and-yql.html" />
<updated>2013-02-13T00:00:00-08:00</updated>
<content type="html">&lt;p&gt;Last November, Yahoo! JAPAN released a product called &lt;a href=&quot;http://developer.yahoo.co.jp/yconnect/&quot;&gt;YConnect&lt;/a&gt;.
This is a new authorization system that is compatible with OAuth 2.0 and
OpenID Connect. In OAuth 2.0, the flow is simplified compared to OAuth 1.0,
so it is easy for developers to implement. Furthermore, YConnect anticipates
client-side applications such as native applications and can support many
cases of use. This time, I would like to introduce examples that uses
&lt;a href=&quot;http://developer.yahoo.co.jp/yconnect/userinfo.html&quot;&gt;UserInfo API&lt;/a&gt;, supplied by YConnect, from Node.js and YQL.&lt;/p&gt;

&lt;h3&gt;YConnect with Node.js&lt;/h3&gt;

&lt;p&gt;First, with Node.js, I have created a npm package for YConnect. You can
install the package via npm command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ npm install yconnect
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;By passing the access token to access the API, you can retrieve the data.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;YConnect&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;yconnect&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;YConnect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;yc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;YConnect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;access_token&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;&amp;lt;access token&amp;gt;&amp;#39;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;yc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;getUserInfo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;schema&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;openid&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The result just below.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{ user_id: '43M63NAGMHBAYMXRMY3WODOWS4',
  name: 'OkumuraRyuichi',
  given_name: 'Ryuichi',
  'given_name#ja-Kana-JP': '',
  'given_name#ja-Hani-JP': 'Ryuichi',
  family_name: 'Okumura',
  'family_name#ja-Kana-JP': '',
  'family_name#ja-Hani-JP': 'Okumura',
  locale: 'ja-JP',
  email: 'okuryu@gmail.com',
  email_verified: true,
  address:
   { country: 'jp',
     postal_code: '1060032',
     region: 'Tokyo',
     locality: 'Minato-ku' },
  birthday: '1984',
  gender: 'male' }
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;YConnect with YQL&lt;/h3&gt;

&lt;p&gt;Next is YQL. In the same way, I have created a table for YConnect. YQL can be
tested easily from the YQL Console too, but this time I will show an example
of executing with the iyql command that &lt;a href=&quot;/2012/07/31/iyql-on-nodejs.html&quot;&gt;I made last time&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ npm install iyql
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The result just below.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ iyql
iyql&amp;gt; select * from yahoojp.yconnect.userinfo where access_token=&quot;&amp;lt;access token&amp;gt;&quot; and schema=&quot;openid&quot;
{
    &quot;user_id&quot;: &quot;43M63NAGMHBAYMXRMY3WODOWS4&quot;,
    &quot;name&quot;: &quot;OkumuraRyuichi&quot;,
    &quot;given_name&quot;: &quot;Ryuichi&quot;,
    &quot;given_name_ja-Kana-JP&quot;: &quot;&quot;,
    &quot;given_name_ja-Hani-JP&quot;: &quot;Ryuichi&quot;,
    &quot;family_name&quot;: &quot;Okumura&quot;,
    &quot;family_name_ja-Kana-JP&quot;: &quot;&quot;,
    &quot;family_name_ja-Hani-JP&quot;: &quot;Okumura&quot;,
    &quot;locale&quot;: &quot;ja-JP&quot;,
    &quot;email&quot;: &quot;okuryu@gmail.com&quot;,
    &quot;email_verified&quot;: &quot;true&quot;,
    &quot;address&quot;: {
     &quot;country&quot;: &quot;jp&quot;,
     &quot;postal_code&quot;: &quot;1060032&quot;,
     &quot;region&quot;: &quot;Tokyo&quot;,
     &quot;locality&quot;: &quot;Minato-ku&quot;
    },
    &quot;birthday&quot;: &quot;1984&quot;,
    &quot;gender&quot;: &quot;male&quot;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;YConnect can be used immediately once an application ID is issued, so please
try using it.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2013/01/31/faster-function-that-happen-async-with-yui.html</id>
<title>Faster function that happen async with YUI</title>
<link href="http://www.okuryu.com/2013/01/31/faster-function-that-happen-async-with-yui.html" />
<updated>2013-01-31T00:00:00-08:00</updated>
<content type="html">&lt;p&gt;From next version of YUI, &lt;code&gt;timers&lt;/code&gt; module will add into YUI core module. You can
use &lt;code&gt;Y.soon&lt;/code&gt; function by this module.&lt;/p&gt;

&lt;p&gt;This function is similar to &lt;code&gt;Y.later&lt;/code&gt;, used when there is something that you
want to process asynchronously. Recently, we have come out that can be used to
implement a function called &lt;code&gt;setImmediate&lt;/code&gt; in IE10 and Node.js 0.9. &lt;code&gt;Y.soon&lt;/code&gt; can
also consider such implementation, asynchronous processing is performed faster
than &lt;code&gt;Y.later&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Just show you an example.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;http://yui.yahooapis.com/3.9.0pr2/build/yui/yui-min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
YUI().use('timers', function (Y) {
  Y.log('hello timers');
  var asyncTask = Y.soon(myTask);
  Y.log('end timers');
  function myTask() {
    Y.log('called myTask()');
  }
});
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It results in the following.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;hello timers
end timers
called myTask()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;YUI also supports Node.js, so that the same logic also works on the browser,
even on Node.js.&lt;/p&gt;

&lt;p&gt;In addition, there is a function called to &lt;code&gt;cancel&lt;/code&gt; in object that &lt;code&gt;Y.soon&lt;/code&gt;
returns. You can then call this function to cancel the action to be performed.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;http://yui.yahooapis.com/3.9.0pr2/build/yui/yui-min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
YUI().use('timers', function (Y) {
  Y.log('hello timers');
  var asyncTask = Y.soon(myTask);
  Y.log('end timers');
  asyncTask.cancel();
  function myTask() {
    Y.log('called myTask()');
  }
});
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you call &lt;code&gt;cancel&lt;/code&gt; and you will not be executed.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;hello timers
end timers
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This feature is available from YUI 3.9.0, its Preview Release 2 is currently.
The GA is planned in the near future. There is a possibility that &lt;code&gt;Y.later&lt;/code&gt; is
obsolete in the future, it would be good to remember that the &lt;code&gt;Y.soon&lt;/code&gt;.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/12/31/looking-back-on-2012.html</id>
<title>Looking back on 2012</title>
<link href="http://www.okuryu.com/2012/12/31/looking-back-on-2012.html" />
<updated>2012-12-31T00:00:00-08:00</updated>
<content type="html">&lt;p&gt;As the my goal of the year, I have listed three things. They haven't decided
the concrete contents in advance. Determine goals and only roughly, more I have
to be any good thing to be associated with that goal.&lt;/p&gt;

&lt;h3&gt;Contribute to the internet&lt;/h3&gt;

&lt;p&gt;I sent a total of 50 patches near several OSS. I think most of them are small,
but, whether it is the contribution for each community was able to more than a
little than nothing. Then, I had to write a blog in English this year. As write
once a month, I was somehow continued one year. If I feel tired that I have
every week, as my pace is so good about this. I began to increase little by
little opportunity to use English on Twitter, G+, even such as Google Reader.&lt;/p&gt;

&lt;h3&gt;Take photos&lt;/h3&gt;

&lt;p&gt;Number to take pictures this year has been reduced considerably. I think I
should take a lot to take because it isn't a goal, indifferently in the future.
After that, I entered the dark room for the first time this year in college.
Because I want to go again in the near future, I may continue for some time
as well.&lt;/p&gt;

&lt;h3&gt;Go trips&lt;/h3&gt;

&lt;p&gt;I didn't go anywhere, unfortunately. Since there is no most likely outcome of
the three, I want to go somewhere next year.&lt;/p&gt;

&lt;p&gt;I won't change the three things for the next year. Have a good year.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/11/28/how-to-run-yeti-with-qunit-testing.html</id>
<title>How to run Yeti with QUnit testing</title>
<link href="http://www.okuryu.com/2012/11/28/how-to-run-yeti-with-qunit-testing.html" />
<updated>2012-11-28T00:00:00-08:00</updated>
<content type="html">&lt;p&gt;&lt;a href=&quot;http://qunitjs.com/&quot;&gt;QUnit&lt;/a&gt; is a JavaScript Unit Testing framework by jQuery project. I
would like to introduce to the way to run &lt;a href=&quot;http://yeti.cx/&quot;&gt;Yeti&lt;/a&gt; with QUnit testing
since latest Yeti Supporting QUnit test cases.&lt;/p&gt;

&lt;p&gt;At first, setup minimum QUnit test case.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset=&quot;utf-8&quot;&amp;gt;
  &amp;lt;title&amp;gt;QUnit Example&amp;lt;/title&amp;gt;
  &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;/resources/qunit.css&quot;&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;div id=&quot;qunit&quot;&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;script src=&quot;/resources/qunit.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script src=&quot;/resources/tests.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And, create test.js just like this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;test( &quot;hello test&quot;, function() {
  ok( 1 == &quot;1&quot;, &quot;Passed!&quot; );
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install Yeti via npm command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ npm install -g yeti
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Start Yeti as server mode. Yeti Hub waits to execute testing.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ yeti -s
Yeti Hub started. LAN: http://10.0.1.10:9000
                  Local: http://localhost:9000
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And, open the http://localhost:9000/ in some web browsers that you like.
Next open new Shell and run test via Yeti command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ yeti tests.html
  Agent connected: Chrome (23.0.1271.91) / Mac OS
✓ Testing started on Chrome (23.0.1271.91) / Mac OS
✓ Agent completed: Chrome (23.0.1271.91) / Mac OS
✓ 1 tests passed! (0.21 seconds)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That's all. If there is some browsers you want to test, you simply open the
Yeti Hub URL. You can be a very large number of tests on actual browsers via
one command. And Yeti also supports more other testing frameworks such as
&lt;a href=&quot;http://visionmedia.github.com/mocha/&quot;&gt;Mocha&lt;/a&gt;, &lt;a href=&quot;http://pivotal.github.com/jasmine/&quot;&gt;Jasmine&lt;/a&gt;, &lt;a href=&quot;http://yuilibrary.com/yui/docs/test/&quot;&gt;YUI Test&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Yeti is a open source project that has very active releases, please check it.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/10/30/nodejs-in-yui.html</id>
<title>Node.js in YUI</title>
<link href="http://www.okuryu.com/2012/10/30/nodejs-in-yui.html" />
<updated>2012-10-30T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;&lt;a href=&quot;http://www.yuiblog.com/blog/2010/04/05/running-yui-3-server-side-with-node-js/&quot;&gt;Article about Node.js&lt;/a&gt; that was released for the first time
in &lt;a href=&quot;http://yuiblog.com/&quot;&gt;YUI Blog&lt;/a&gt; was that of 2010. Although more than two years has
passed since then, a set of tools around YUI is that it works on all Node.js
finally. I think this time I would like to summarize that also serves as an
introduction to each tool.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;https://github.com/yui/yuglify&quot;&gt;yUglify&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;A tool that has been wrapped for YUI based on the &lt;a href=&quot;https://github.com/mishoo/UglifyJS&quot;&gt;UglifyJS&lt;/a&gt; and
&lt;a href=&quot;https://github.com/jbleuzen/node-cssmin&quot;&gt;cssmin&lt;/a&gt;. YUI Compressor that has been used until now will be
obsolete in the future We will use this as a successor.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;https://github.com/yui/yuitest&quot;&gt;YUI Test&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;A JavaScript unit testing framework. It has supported Node.js at a
relatively early stage. Have tested using YUI Test is also YUI core code.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://yeti.cx/&quot;&gt;Yeti&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;A tool for cross-browser testing. This is a tool that allows you to run a
test with a single command to test on multiple browsers and devices. You can
implement the proprietary protocols, Yeti is inside is an interesting tool
that can be very good. Easy to understand and I would watch the
&lt;a href=&quot;http://www.youtube.com/watch?v=tpGBlJ7DBks&quot;&gt;Reid's video&lt;/a&gt; and &lt;a href=&quot;http://www.youtube.com/watch?v=85Q06z7_B0w&quot;&gt;Dav's video&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;https://github.com/davglass/grover&quot;&gt;Grover&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;It is a tool to run on a headless browser tests of YUI Test using
&lt;a href=&quot;http://phantomjs.org/&quot;&gt;PhantomJS&lt;/a&gt;. Please take a look at last month, so I introduced
in &lt;a href=&quot;http://www.okuryu.com/2012/09/30/testing-javascript-with-phantomjs-and-yui-test.html&quot;&gt;my blog post&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;https://github.com/yui/yuidoc&quot;&gt;YUI Doc&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;It is a tool that generates API documentation from the code of JavaScript.
Previously, it had been implemented in Python, Node.js has now become well.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;https://github.com/yui/shifter&quot;&gt;Shifter&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;It is a tool used to build YUI module corresponding to the successor of YUI
Builder. YUI Builder was Java(Ant), Shifter is Node.js base. Please take a
look because this is also introduced in &lt;a href=&quot;http://www.okuryu.com/2012/08/28/building-yui-module-with-shifter.html&quot;&gt;the previous blog&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;https://github.com/yui/yogi&quot;&gt;Yogi&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;This has not been officially announced or still under development, it is
still without much documentation. It seems to be something like a support
tool for the development of gallery modules and YUI.&lt;/p&gt;

&lt;p&gt;Because they are all published on &lt;a href=&quot;https://github.com/yui&quot;&gt;GitHub&lt;/a&gt;, you can contribute
the code if anyone has signed the &lt;a href=&quot;http://yuilibrary.com/contribute/cla/&quot;&gt;CLA of YUI&lt;/a&gt; everyone.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/09/30/testing-javascript-with-phantomjs-and-yui-test.html</id>
<title>Testing JavaScript with PhantomJS and YUI Test</title>
<link href="http://www.okuryu.com/2012/09/30/testing-javascript-with-phantomjs-and-yui-test.html" />
<updated>2012-09-30T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;There are a variety of what is called a JavaScript test framework,
&lt;a href=&quot;http://yuilibrary.com/yui/docs/test/&quot;&gt;YUI Test&lt;/a&gt; is one of them. Also, &lt;a href=&quot;http://phantomjs.org/&quot;&gt;PhantomJS&lt;/a&gt; is famous as
headless browser, the JavaScript code by using the PhantomJS you can be run
from the command line. If you install PhantomJS the application of this becomes
possible to test JavaScript code on the server. &lt;a href=&quot;https://github.com/davglass/grover&quot;&gt;Grover&lt;/a&gt; is a tool to
run test cases of YUI Test on PhantomJS.&lt;/p&gt;

&lt;h3&gt;Install Grover&lt;/h3&gt;

&lt;p&gt;You can easily install it via npm command since Grover are a matched package
npm.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;npm install -g grover
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Must be installed PhantomJS. &lt;a href=&quot;http://phantomjs.org/download.html&quot;&gt;Download it&lt;/a&gt;, they are
provided for binary Mac OS X and Windows, Linux.&lt;/p&gt;

&lt;h3&gt;Create test case for YUI Test&lt;/h3&gt;

&lt;p&gt;YUI Test supports many features, write a simple test case as test.html.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script src=&quot;http://yui.yahooapis.com/3.7.2/build/yui/yui-min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
YUI().use('test', function (Y) {
  var testCase = new Y.Test.Case({
    name: 'My Test Case',
    test1: function () {
      Y.Assert.areEqual(10, 10);
    },
    test2: function () {
      Y.Assert.isArray([1, 2, 3]);
    }
  });
  Y.Test.Runner.add(testCase);
  Y.Test.Runner.run();
});
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Run Grover&lt;/h3&gt;

&lt;p&gt;The test is performed on PhantomjS, results will be display simply by running Grover.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ grover test.html
Starting Grover on 1 files with PhantomJS@1.7.0
  Running 15 concurrent tests at a time.
✔ [testSuite_yui_3_7_2_1_1348986046983_9]: Passed: 2 Failed: 0 Total: 2 (ignored 0)
----------------------------------------------------------------
✔ [Total]: Passed: 2 Failed: 0 Total: 2 (ignored 0)
  [Timer] 3.265 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;More advantage&lt;/h3&gt;

&lt;p&gt;This is the simplest example of YUI Test and Grover. Since there are many more
features, please look at the document.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/davglass/grover&quot;&gt;Grover&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://yuilibrary.com/yui/docs/test/&quot;&gt;YUI Test&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://phantomjs.org/&quot;&gt;PhantomJS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/08/28/building-yui-module-with-shifter.html</id>
<title>Building YUI module with shifter</title>
<link href="http://www.okuryu.com/2012/08/28/building-yui-module-with-shifter.html" />
<updated>2012-08-28T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;YUI Builder tool that has been used to build the module for YUI until now.
This is a tool that can be used as well as YUI core module, in the same
manner if you have own YUI module or YUI Gallery module. YUI Builder works
with Ant (Java), and it can define the information and settings to build
each module. In addition, a convenient macro has been defined by default in
YUI Builder, and through JSLint, and compressed with YUI Compressor, and
build JavaScript code for debugging, you can build them by one command
(&quot;ant all&quot;). It is useful Ant because flexibly combine various settings,
but there are no very fast in practice (it took about 10 minutes when I try
to build all YUI core modules on my Mac). It has been increasing more and
more core modules of YUI, YUI was one of the challenges of the time it
takes to build.&lt;/p&gt;

&lt;p&gt;Currently, Dav from YUI team working on a new tool called shifter for build
YUI module. Node.js based command line tools, shifter is the future of the
YUI module is likely to use the shifter (the transition to the shifter has
already begun even YUI core modules). I would like to introduce to shifter
can be migrated easily from YUI Builder existing modules.&lt;/p&gt;

&lt;p&gt;shifter is since the npm package, you can install that via npm command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ npm install -g shifter
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I think the case of an existing YUI module, YUI Builder and configuration
files are named &quot;*.properties&quot;. If this file exists, shifter will switch
to the new build system to generate a &quot;build.json&quot; from this file
automatically. If there is a &quot;build.json&quot;, shifter referring to prioritize
the &quot;build.json&quot;. In other words, it is you only need to remove the
&quot;build.json&quot; if you want to re-create the &quot;build.json&quot; from &quot;*.properties&quot;.&lt;/p&gt;

&lt;p&gt;Future, if you create a new YUI module looks like this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir -p my-module/src/module-foo/js
$ cd my-module/src/module-foo
$ touch my-module/src/module-foo/js/foo.js
$ touch my-module/src/module-foo/build.json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&quot;build.json&quot; smallest is as follows.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{
  &quot;name&quot;: &quot;module-foo&quot;,
  &quot;builds&quot;: {
    &quot;foo&quot;: {
      &quot;jsfiles&quot;: [
        &quot;js/foo.js&quot;
      ]
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Run shifter command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ shifter
shifter [info] revving up
shifter [info] looking for build.json file
shifter [info] found build.json file, shifting
shifter [info] putting the hammer down, let's build this thing!
shifter [info] putting the hammer down
shifter [info] shifting into gear for my-module
shifter [info] using preferred jslint setting
shifter [queu] writing RAW file
shifter [queu] compressing
shifter [queu] writing -min file
shifter [info] shifting for coverage
shifter [queu] coverage file read, starting coverage
shifter [queu] writing coverage file
shifter [info] done racing, the gears are toast
shifter [info] finished in 1.259 seconds, pretty fast huh?
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This completes the build is successful when you run shifter command.
JavaScript file is being output to the directory for the build if build
is successful.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ls -l ../../build/my-module
total 32
-rw-r--r--  1 okuryu  staff  1330 Aug 27 23:12 my-module-coverage.js
-rw-r--r--  1 okuryu  staff    84 Aug 27 23:12 my-module-debug.js
-rw-r--r--  1 okuryu  staff    52 Aug 27 23:12 my-module-min.js
-rw-r--r--  1 okuryu  staff    84 Aug 27 23:12 my-module.js
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In addition to the features of the YUI Builder, shifter has some useful
features. That is what is on and that the lint feature by default, through
JSLint against JavaScript files in the build process of the shifter. It is
divided into modules that actual yui-lint. They will monitor changes in the
file and run the shifter with a &quot;--watch&quot; option also, it will be me also
through lint build runs automatically every time you save the file.&lt;/p&gt;

&lt;p&gt;For more infomation about shifter, look &lt;a href=&quot;http://www.yuiblog.com/blog/2012/08/27/shifter-fast-yui-module-building/&quot;&gt;Dav's post on YUI Blog&lt;/a&gt;
and &lt;a href=&quot;http://davglass.github.com/shifter/&quot;&gt;shifter user guide&lt;/a&gt;. I think the shifter will still be
improved in the future, please try to file a ticket on &lt;a href=&quot;https://github.com/davglass/shifter&quot;&gt;GitHub&lt;/a&gt; if there is
a bug and requests.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/07/31/iyql-on-nodejs.html</id>
<title>iYQL on Node.js</title>
<link href="http://www.okuryu.com/2012/07/31/iyql-on-nodejs.html" />
<updated>2012-07-31T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;In the past, Diego Souza implemented &lt;a href=&quot;https://github.com/dgvncsz0f/iyql&quot;&gt;iYQL&lt;/a&gt;. This is command line based
simple &lt;a href=&quot;http://developer.yahoo.com/yql/&quot;&gt;YQL&lt;/a&gt; client. I liked this approach, but its not easy to install
on my machine for me (need install Haskell) and I met a few strange bugs on
my environment for some reason.&lt;/p&gt;

&lt;p&gt;Since I just published &quot;iyql&quot; npm module that has features similar to that
one on npmjs.org. And, its open sourced on &lt;a href=&quot;https://github.com/okuryu/node-iyql&quot;&gt;my GitHub repository&lt;/a&gt;.
Please read just below if you are familiar with Node.js.&lt;/p&gt;

&lt;h3&gt;Installation&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;$ npm install -g iyql
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Note: Currently, depend on Node.js 0.8.x.&lt;/p&gt;

&lt;h3&gt;Usage&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;$ iyql -h
Usage: iyql [options]

Options:
  -p, --endpoint set YQL endpoint URL
                 default: http://query.yahooapis.com/v1/public/yql
  -e, --env      set YQL env URL
  -h, --help     print help
  -v, --version  print version
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can pass YQL statements into iyql REPL prompt.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ iyql
iyql&amp;gt; desc weather.forecast
{
  &quot;query&quot;: {
    &quot;count&quot;: 1,
    &quot;created&quot;: &quot;2012-07-30T14:45:14Z&quot;,
    &quot;lang&quot;: &quot;en-US&quot;,
    &quot;diagnostics&quot;: {
      &quot;publiclyCallable&quot;: &quot;true&quot;,
      &quot;url&quot;: {
        &quot;execution-start-time&quot;: &quot;0&quot;,
        &quot;execution-stop-time&quot;: &quot;575&quot;,
        &quot;execution-time&quot;: &quot;575&quot;,
        &quot;id&quot;: &quot;4a00f6a7-0c5d-4d86-877a-c211fa3e88bb&quot;,
        &quot;proxy&quot;: &quot;DEFAULT&quot;,
        &quot;content&quot;: &quot;http://www.datatables.org/alltables.env&quot;
      },
      &quot;user-time&quot;: &quot;626&quot;,
      &quot;service-time&quot;: &quot;588&quot;,
      &quot;build-version&quot;: &quot;29152&quot;
    },
    &quot;results&quot;: {
      &quot;table&quot;: {
        &quot;hash&quot;: &quot;aae78b1462a6a8fbc748aec4cf292767&quot;,
        &quot;name&quot;: &quot;weather.forecast&quot;,
        &quot;security&quot;: &quot;ANY&quot;,
        &quot;meta&quot;: {
          &quot;author&quot;: &quot;Yahoo! Inc&quot;,
          &quot;description&quot;: &quot;Weather forecast table&quot;,
          &quot;documentationURL&quot;: &quot;http://developer.yahoo.com/weather/&quot;,
          &quot;sampleQuery&quot;:
            &quot;select * from weather.forecast where woeid=2502265&quot;
        },
        &quot;request&quot;: {
          &quot;select&quot;: [
            {
              &quot;key&quot;: [
                {
                  &quot;name&quot;: &quot;location&quot;,
                  &quot;required&quot;: &quot;true&quot;,
                  &quot;type&quot;: &quot;xs:string&quot;
                },
                {
                  &quot;name&quot;: &quot;u&quot;,
                  &quot;type&quot;: &quot;xs:string&quot;
                }
              ]
            },
            {
              &quot;key&quot;: [
                {
                  &quot;name&quot;: &quot;woeid&quot;,
                  &quot;required&quot;: &quot;true&quot;,
                  &quot;type&quot;: &quot;xs:string&quot;
                },
                {
                  &quot;name&quot;: &quot;u&quot;,
                  &quot;type&quot;: &quot;xs:string&quot;
                }
              ]
            }
          ]
        }
      }
    }
  }
}
iyql&amp;gt; select * from geo.places where text=&quot;hikarigaoka&quot;|truncate(count=1)
{
  &quot;query&quot;: {
    &quot;count&quot;: 1,
    &quot;created&quot;: &quot;2012-07-30T14:51:20Z&quot;,
    &quot;lang&quot;: &quot;en-US&quot;,
    &quot;diagnostics&quot;: {
      &quot;publiclyCallable&quot;: &quot;true&quot;,
      &quot;url&quot;: [
        {
          &quot;execution-start-time&quot;: &quot;0&quot;,
          &quot;execution-stop-time&quot;: &quot;577&quot;,
          &quot;execution-time&quot;: &quot;577&quot;,
          &quot;id&quot;: &quot;313d9c69-0140-4b3c-970d-3f5ce33cd66e&quot;,
          &quot;proxy&quot;: &quot;DEFAULT&quot;,
          &quot;content&quot;: &quot;http://www.datatables.org/alltables.env&quot;
        },
        {
          &quot;execution-start-time&quot;: &quot;625&quot;,
          &quot;execution-stop-time&quot;: &quot;655&quot;,
          &quot;execution-time&quot;: &quot;30&quot;,
          &quot;content&quot;:
            &quot;http://where.yahooapis.com/v1/places.q(hikarigaoka);
            start=0;count=10&quot;
        }
      ],
      &quot;user-time&quot;: &quot;656&quot;,
      &quot;service-time&quot;: &quot;618&quot;,
      &quot;build-version&quot;: &quot;29152&quot;
    },
    &quot;results&quot;: {
      &quot;place&quot;: {
        &quot;lang&quot;: &quot;en-US&quot;,
        &quot;uri&quot;: &quot;http://where.yahooapis.com/v1/place/28414615&quot;,
        &quot;woeid&quot;: &quot;28414615&quot;,
        &quot;placeTypeName&quot;: {
          &quot;code&quot;: &quot;10&quot;,
          &quot;content&quot;: &quot;Local Administrative Area&quot;
        },
        &quot;name&quot;: &quot;Hikarigaoka&quot;,
        &quot;country&quot;: {
          &quot;code&quot;: &quot;JP&quot;,
          &quot;type&quot;: &quot;Country&quot;,
          &quot;content&quot;: &quot;Japan&quot;
        },
        &quot;admin1&quot;: {
          &quot;code&quot;: &quot;JP-13&quot;,
          &quot;type&quot;: &quot;Prefecture&quot;,
          &quot;content&quot;: &quot;Tokyo Prefecture&quot;
        },
        &quot;admin2&quot;: {
          &quot;code&quot;: &quot;&quot;,
          &quot;type&quot;: &quot;Gun/Ku&quot;,
          &quot;content&quot;: &quot;Nerima-ku&quot;
        },
        &quot;admin3&quot;: null,
        &quot;locality1&quot;: {
          &quot;type&quot;: &quot;Town&quot;,
          &quot;content&quot;: &quot;Tokyo&quot;
        },
        &quot;locality2&quot;: null,
        &quot;postal&quot;: null,
        &quot;centroid&quot;: {
          &quot;latitude&quot;: &quot;35.761822&quot;,
          &quot;longitude&quot;: &quot;139.631378&quot;
        },
        &quot;boundingBox&quot;: {
          &quot;southWest&quot;: {
            &quot;latitude&quot;: &quot;35.753571&quot;,
            &quot;longitude&quot;: &quot;139.621826&quot;
          },
          &quot;northEast&quot;: {
            &quot;latitude&quot;: &quot;35.770081&quot;,
            &quot;longitude&quot;: &quot;139.640945&quot;
          }
        },
        &quot;areaRank&quot;: &quot;1&quot;,
        &quot;popRank&quot;: &quot;0&quot;
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This is my experiment implements yet. I would like to enhance more useful
features. So please watch my repository, file a issue on GitHub if you
are interested in this one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/okuryu/node-iyql&quot;&gt;node-iyql on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/06/27/phantomjs-1-6-changes.html</id>
<title>PhantomJS 1.6 Changes</title>
<link href="http://www.okuryu.com/2012/06/27/phantomjs-1-6-changes.html" />
<updated>2012-06-27T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;Recently, PhantomJS 1.6 has released. PhantomJS has a flower name for each releases,
this version has &quot;Lavender&quot;. This version is minor update, but it's has some new
features in view of the release note, I tried a few points.&lt;/p&gt;

&lt;h3&gt;Support for passing arguments to WebPage's evaluate&lt;/h3&gt;

&lt;p&gt;You can now pass the variable to the callback function of page.evaluate.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var prefix = 'Title:',
  result;

result = page.evaluate(function (p) {
  return p + document.title;
}, prefix);

console.log(result);
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Callbacks for JavaScript onConfirm and onPrompt&lt;/h3&gt;

&lt;p&gt;onConfirm, onPrompt of JavaScript callbacks has been added.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var result;

page.onConfirm = function(msg) {
  console.log(msg);
};

result = page.evaluate(function() {
  return window.confirm('Hello Confirm!');
});
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Support for Cookies handling&lt;/h3&gt;

&lt;p&gt;Cookie data has been supported. Until now was not only pass in the options of
the command of PhantomJS, but you can now be specified in the page object.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;page.cookies = [{
  'name': 'Cookie-Name',
  'value': 'Cookie-Value',
  'domain': 'localhost'
}];
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;'os' object to the system module&lt;/h3&gt;

&lt;p&gt;The 'os' object has been added into system module.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var os = require('system').os;

for (var p in os) {
  console.log(p + ': ' + os[p]);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The result is like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;architecture: 32bit
name: mac
version: 10.7 (Lion)
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Support for asynchronous evaluation&lt;/h3&gt;

&lt;p&gt;You can now asynchronously evaluation of the page. This is useful if you don't
need the results of evaluation.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;page.evaluateAsync(function () {
  // do something
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Complete changes to &lt;a href=&quot;http://code.google.com/p/phantomjs/wiki/ReleaseNotes&quot;&gt;release note&lt;/a&gt; since it is written, please check it out.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/05/24/introduce-jscomplete-vim.html</id>
<title>Introduce jscomplete-vim</title>
<link href="http://www.okuryu.com/2012/05/24/introduce-jscomplete-vim.html" />
<updated>2012-05-24T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;&lt;a href=&quot;https://github.com/teramako/jscomplete-vim&quot;&gt;jscomplete-vim&lt;/a&gt; is the modern complement Vim plugin for JavaScript guys.&lt;/p&gt;

&lt;h3&gt;Using as omnifunc&lt;/h3&gt;

&lt;p&gt;Set &lt;code&gt;jscomplete#CompleteJS&lt;/code&gt; to &lt;code&gt;omnifunc&lt;/code&gt; in your &lt;code&gt;.vimrc&lt;/code&gt; like this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;autocmd FileType javascript setlocal omnifunc=jscomplete#CompleteJS
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then available auto complement properties after &lt;code&gt;.&lt;/code&gt;, &lt;code&gt;[&lt;/code&gt; keywords.&lt;/p&gt;

&lt;h3&gt;Using as neocomplcache plugin&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/Shougo/neocomplcache&quot;&gt;neocomplcache&lt;/a&gt; is the Vim plugin to keyword completion. No more is necessary to basically using.&lt;/p&gt;

&lt;h3&gt;Optional extensions&lt;/h3&gt;

&lt;p&gt;Extension scripts under the &lt;code&gt;autoload/js/&lt;/code&gt; will be loaded with set list to &lt;code&gt;g:jscomplete_use&lt;/code&gt; or &lt;code&gt;b:jscomplete_use&lt;/code&gt; in your &lt;code&gt;.vimrc&lt;/code&gt; like this.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;let g:jscomplete_use = ['dom', 'moz']
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dom&lt;/code&gt;: Adding DOM keywords completion.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;moz&lt;/code&gt;: Adding Mozilla JavaScript keywords completion.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dom&lt;/code&gt;: Adding Mozilla XPCOM component keywords completion.&lt;/li&gt;
&lt;/ul&gt;

</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/04/28/idiomatic-javaScript-in-ja.html</id>
<title>Idiomatic JavaScript in Japanese</title>
<link href="http://www.okuryu.com/2012/04/28/idiomatic-javaScript-in-ja.html" />
<updated>2012-04-28T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;Recently, I just &lt;a href=&quot;https://github.com/rwldrn/idiomatic.js/tree/master/translations/ja_JP&quot;&gt;translated into Japanese&lt;/a&gt; a document
called &lt;a href=&quot;https://github.com/rwldrn/idiomatic.js&quot;&gt;Idiomatic JavaScript&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I don't see any reason that you should have to be particular about relating to
this document, but if you need to write new JavaScript code now, this is very
useful for you. If you are already have any rules in your team or projects, you
should follow it.&lt;/p&gt;

&lt;p&gt;Please remember that the code that wrote has a possibility to modified
frequently, used for a long time, or taken over by someone else.&lt;/p&gt;

&lt;p&gt;Your code won't belong only to you anyone. We always need to understand the
engineering and keep to write right code.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/03/23/time-to-yui3.html</id>
<title>Time to YUI 3</title>
<link href="http://www.okuryu.com/2012/03/23/time-to-yui3.html" />
<updated>2012-03-23T00:00:00-07:00</updated>
<content type="html">&lt;p&gt;What should we when to move to YUI 3 from YUI 2? That is yesterday!&lt;/p&gt;

&lt;p&gt;YUI 2 is still available via Yahoo! CDN, but YUI team already announced that
they will not fix any issues on YUI 2. And, any features will be probably not
added to YUI 2. YUI team's all resources already moved to YUI 3.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.yuiblog.com/blog/2010/12/17/yui-2-9-0-release-update/&quot;&gt;YUI 2.9.0 Release Update &amp;raquo; Yahoo! User Interface Blog (YUIBlog)&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Next week the YUI team will begin planning for release 2.9.0 to be shipped
in the second half of Q1 2011. YUI 2.9.0 will be the last major dot-release
of the 2.x codeline, and the team will be aggressively reviewing all open
tickets against the YUI 2 project and either assigning them to be a part of
the 2.9.0 release, closing them as “WON’T FIX”, or moving them to the YUI 3
project.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;For the migration, incompatible APIs could be a potential setback, but Node
module already has &lt;a href=&quot;http://yuilibrary.com/yui/docs/node/#node-migration&quot;&gt;migration table&lt;/a&gt; as core API of YUI 3.
Additionally, the migration might take many times with scale of your
applications, but I think to it may not be so difficult, because YUI 3's
documents is enhanced to offer useful information on
&lt;a href=&quot;http://yuilibrary.com/&quot;&gt;yuilibrary.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Only one important point with you using YUI 3. That is, YUI 3 is oriented
module. YUI 3's module is sheared into fragments (look
&lt;a href=&quot;https://github.com/yui/yui3/tree/master/build&quot;&gt;build directory&lt;/a&gt;). You should specify module names that you want
use into use() function. Actually, you can use these module within callback
function, it is called YUI sandbox.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;YUI().use('node-base', function (Y) {

    var h1 = Y.one('h1');

});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Please read &lt;a href=&quot;http://yuilibrary.com/yui/docs/yui/&quot;&gt;explanation of YUI Global Object&lt;/a&gt; for more
understanding YUI global object, sandbox, loading module.&lt;/p&gt;

&lt;p&gt;If you must need to use YUI 2, YUI 3 has the feature to loading YUI 2 module.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;YUI().use('yui2-treeview', function (Y) {

    var YAHOO = Y.YUI2;
    var tree = new YAHOO.widget.TreeView('tree');

});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But I am not recommend to using this feature, because the fact remains that you
still using YUI 2. This is used as tentative.&lt;/p&gt;

&lt;p&gt;If you develop problems with migration, you can try to file a ticket on
yuilibrary.com, and if you can provide patch for YUI, you can send
&quot;Pull Request&quot; on GitHub.&lt;/p&gt;

&lt;p&gt;And, see also &lt;a href=&quot;http://yuilibrary.com/forum/viewtopic.php?f=18&amp;amp;t=9374&quot;&gt;the discussion about migration&lt;/a&gt; on
yuilibrary.com.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/02/18/html5boilerplate-v3-ja.html</id>
<title>HTML5 Boilerplate 3.0 in Japanese</title>
<link href="http://www.okuryu.com/2012/02/18/html5boilerplate-v3-ja.html" />
<updated>2012-02-18T00:00:00-08:00</updated>
<content type="html">&lt;p&gt;&lt;img src=&quot;/img/20120218-jp.html5boilerplate.com.jpg&quot; width=&quot;600&quot; height=&quot;417&quot; alt=&quot;&quot;&gt;&lt;/p&gt;

&lt;p&gt;I just completed to translate &lt;a href=&quot;http://jp.html5boilerplate.com/&quot;&gt;HTML5 Boilerplate 3.0 in Japanese&lt;/a&gt;.
&lt;a href=&quot;http://html5boilerplate.com/&quot;&gt;HTML5 Boilerplate&lt;/a&gt; is the template sets that uses Web technologies
such as HTML5 and CSS3. You may not have a chance to use them as a whole, but I think
the techniques and know-hows one individual is going to be very helpful.&lt;/p&gt;

&lt;p&gt;And, please let me know or send to &quot;Pull Request&quot; to &lt;a href=&quot;https://github.com/h5bp/html5boilerplate.com&quot;&gt;GitHub repository&lt;/a&gt;
if you found wrong translation.&lt;/p&gt;
</content>
</entry>

<entry>
<id>http://www.okuryu.com/2012/01/22/move-to-jekyll.html</id>
<title>Move to Jekyll</title>
<link href="http://www.okuryu.com/2012/01/22/move-to-jekyll.html" />
<updated>2012-01-22T00:00:00-08:00</updated>
<content type="html">&lt;p&gt;In the past, I have used static files by manual operations, or a CMS tools like Movable Type for
manage web site. From now on, I had decided to use &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt;. Jekyll is simple tool to
manage static files. Currently, &lt;a href=&quot;http://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt; is introducing Jekyll and it being
able to easy hosting files that manage by Jekyll. In addition, if you configure DNS, it will be
possible hosting with a domain that you like. If there are any wrong on this site, you can send
&quot;pull request&quot; to &lt;a href=&quot;https://github.com/okuryu/okuryu.github.com&quot;&gt;my repository&lt;/a&gt; on GitHub.&lt;/p&gt;

&lt;p&gt;About languages which using on this site. I can read, write, listen, speak only Japanese. It may
be easy for me, but English is able to convey my things to more many people. From now on, I'll use
English and Japanese as it may chance on this site. If you can't read it, you can use a translate
service like &lt;a href=&quot;http://translate.google.com/&quot;&gt;Google Translate&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In addition, I moved off FeedBurner. The new feed URL is
&lt;a href=&quot;http://www.okuryu.com/atom.xml&quot;&gt;http://www.okuryu.com/atom.xml&lt;/a&gt;. Please update your feed reader, If you want to continue
to subscribe my update.&lt;/p&gt;
</content>
</entry>

</feed>
