<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-21029905</atom:id><lastBuildDate>Fri, 28 Dec 2018 08:29:18 +0000</lastBuildDate><category>Entrepreneurship</category><category>網頁前端技術</category><category>Tutorial</category><category>網路廣告</category><category>BuzzShare</category><category>Others</category><category>實用工具</category><category>YUI</category><category>作品集</category><category>新創網站</category><category>莒光週記</category><category>讀書心得</category><category>YUI 學習筆記</category><category>Yahoo</category><category>清大科管</category><category>Google App Engine</category><category>Google Chrome</category><category>投資理財</category><category>Facebook</category><category>Tech Talk</category><category>Travel</category><category>Android</category><category>Nodejs 學習筆記</category><category>nodejs</category><category>媒體報導</category><category>Mobile Web</category><title>clayliao.f2e</title><description></description><link>http://clayliao.blogspot.com/</link><managingEditor>noreply@blogger.com (Clay Liao)</managingEditor><generator>Blogger</generator><openSearch:totalResults>285</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-1555868310739740934</guid><pubDate>Sat, 21 Sep 2013 04:21:00 +0000</pubDate><atom:updated>2013-11-04T23:10:56.292+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Travel</category><title>[台灣。旅行] 黃色小鴨 X 高雄光榮碼頭</title><description>在新聞頻道照三餐瘋狂宣傳下，&lt;a href=&quot;http://rubberduck-kaohsiung.tw/main/index.asp&quot; target=&quot;_blank&quot;&gt;黃色小鴨&lt;/a&gt;將在台灣巡迴展覽的消息相信已經廣為人知。黃色小鴨的展覽規則之一就是，小鴨本體必須由當地團隊製作/策展。為此台灣的工匠們巧手打造了高18公尺，寬25公尺，體重1000公斤，亞洲第一大（全世界第二大）的小鴨。同時為了避免小鴨沈沒的憾事發生，表皮&lt;a href=&quot;http://www.youtube.com/watch?v=G6uQ__0x3XU&quot; target=&quot;_blank&quot;&gt;使用特殊材質製作&lt;/a&gt;，不僅美工刀割不破，即便是扁鑽也插不進去！（&quot;扁鑽&quot;的比喻出自愛之船導覽人員）&lt;br /&gt;&lt;h3&gt;高雄光榮碼頭&lt;/h3&gt;為了避開洶湧的人潮，我們選在9/19日開幕預演的時候搶拍小鴨。原先說好早上八點預演，但實際上小鴨進港時已經接近中午了(熱～)。 &lt;a href=&quot;http://www.flickr.com/photos/clayliao/9839769593/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨&quot;&gt;&lt;img alt=&quot;黃色小鴨&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5508/9839769593_c23da3a86b_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9839774575/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨&quot;&gt;&lt;img alt=&quot;黃色小鴨&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5511/9839774575_c8ff676845_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;跟著警告標語一起入鏡的小鴨，產生新的趣味 :) &lt;a href=&quot;http://www.flickr.com/photos/clayliao/9839690665/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨&quot;&gt;&lt;img alt=&quot;黃色小鴨&quot; height=&quot;427&quot; src=&quot;http://farm8.staticflickr.com/7290/9839690665_e9d71ab56a_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9839739696/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨&quot;&gt;&lt;img alt=&quot;黃色小鴨&quot; height=&quot;427&quot; src=&quot;http://farm8.staticflickr.com/7444/9839739696_798a285322_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9839533766/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨&quot;&gt;&lt;img alt=&quot;黃色小鴨&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3770/9839533766_accb01d9d4_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;拍照用小鴨背版 &lt;a href=&quot;http://www.flickr.com/photos/clayliao/9839812716/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨&quot;&gt;&lt;img alt=&quot;黃色小鴨&quot; height=&quot;427&quot; src=&quot;http://farm3.staticflickr.com/2867/9839812716_bae15d8b40_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;防曬準備工作不能少，千萬不能小看南臺灣的豔陽啊！ &lt;a href=&quot;http://www.flickr.com/photos/clayliao/9839559644/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨 in 光榮碼頭&quot;&gt;&lt;img alt=&quot;黃色小鴨 in 光榮碼頭&quot; height=&quot;500&quot; src=&quot;http://farm4.staticflickr.com/3824/9839559644_5d51121198.jpg&quot; width=&quot;333&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;街拍小鴨&lt;/h3&gt;高雄市成為黃色小鴨落腳台灣的首站可是當地的大事，為了迎接小鴨以及遊客們，街上處處可見黃色小壓的裝飾，形成另一道風景： &lt;a href=&quot;http://www.flickr.com/photos/clayliao/9847233956/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2957&quot;&gt;&lt;img alt=&quot;IMG_2957&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3699/9847233956_8e86169162_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9847210856/&quot; title=&quot;Flickr 上 clayliao 的 黃色小鴨&quot;&gt;&lt;img alt=&quot;黃色小鴨&quot; height=&quot;500&quot; src=&quot;http://farm4.staticflickr.com/3706/9847210856_0187f070e5.jpg&quot; width=&quot;333&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9847168285/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2978&quot;&gt;&lt;img alt=&quot;IMG_2978&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5498/9847168285_2fa8c99050_z.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;由於颱風來襲，才展出一天的黃色小鴨就已經&lt;a href=&quot;http://tw.news.yahoo.com/%E5%B0%8F%E9%B4%A8%E9%98%B2%E9%A2%B1-%E4%BA%BA%E5%8A%9B%E6%B6%88%E9%A2%A8%E8%AE%8A%E6%89%81-%E5%B0%8F%E9%B4%A8%E8%AE%8A%E5%B8%83%E4%B8%81-095000533.html&quot;&gt;泄氣進港避風雨&lt;/a&gt;。想親臨現場感受黃色小鴨魅力可得再等等囉！</description><link>http://clayliao.blogspot.com/2013/09/rubberduck-kaohsiung.html</link><author>noreply@blogger.com (Clay Liao)</author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-7334017180862175003</guid><pubDate>Fri, 13 Sep 2013 05:04:00 +0000</pubDate><atom:updated>2013-09-14T15:24:03.269+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Travel</category><title>[九州。旅行] 渡遊柳川河</title><description>柳川是九州著名的古都水鄉，著名的是觀光特色是搭乘人力遊船與吃鰻魚飯。從鬧區天神三越搭乘西鐵電車大牟田線到「西鐵柳川站」約40分鐘。西鐵有賣售柳川/天滿宮電車+遊船+鰻魚飯(選購)各種組合的套票，價格比分開購買來得划算一些。&lt;br&gt;剛出西鐵柳川站閘門，馬上就有接待人員趨前詢問手持套票的旅客是否參加游船行程，確認後很快地來了一台接駁小巴。由於這天不是假日，車上並沒有其他旅客。約莫五分鐘到達目的地「川下り松月乗船場」，此時船夫已經在岸邊等待了。 &lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9047324905/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2707&quot;&gt;&lt;img alt=&quot;IMG_2707&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3726/9047324905_ea53c90ee5_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;接下來是更加尊榮的包船行程。可以選擇走完整條水道再搭車回西鐵柳川車站，或是遊船至中途點折返，為了節省時間我們選擇後者。&lt;br&gt;船夫是位開朗的大叔，一路上都用單口相聲的風格介紹沿岸風景人文，偶爾夾雜幾首當地的民謠，十足的日式風情。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049520476/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2716&quot;&gt;&lt;img alt=&quot;IMG_2716&quot; height=&quot;500&quot; src=&quot;http://farm6.staticflickr.com/5494/9049520476_e10ae96795.jpg&quot; width=&quot;333&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;h3&gt;沿岸風光&lt;/h3&gt;才剛坐穩，迎面而來的是史蹟&lt;a href=&quot;http://www.crossroadfukuoka.jp/tw/event/?mode=detail&amp;amp;id=400000006053&quot; target=&quot;_blank&quot;&gt;柳川城崛水門&lt;/a&gt;，水門寬度剛好可以容納一艘船，而我們正在航行的河道正是古代的護城河。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9047386337/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2734&quot;&gt;&lt;img alt=&quot;IMG_2734&quot; height=&quot;427&quot; src=&quot;http://farm3.staticflickr.com/2807/9047386337_30a30d7e83_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9047497605/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2739&quot;&gt;&lt;img alt=&quot;IMG_2739&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5456/9047497605_42b9398bf4_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;沿河會遇到很多像這樣很低的橋，乘客必須矮著身子才能安全通過。船夫先生表示，之前有遊客光顧著拍照，結果不小心掉下水裡。幸好河的水位很低，大約在胸部到小腿這樣的高度而已。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049877226/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2762&quot;&gt;&lt;img alt=&quot;IMG_2762&quot; height=&quot;427&quot; src=&quot;http://farm3.staticflickr.com/2813/9049877226_83eaaa12df_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;柳川沿岸的風景十分恬靜。此時正值六月天，是繡球花的季節。氣候非常舒適，穿著短袖感覺涼涼的很舒服。如果是夏天來的話，可得租斗笠防曬，冬天船上則是會提供被爐禦寒。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049815798/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2781&quot;&gt;&lt;img alt=&quot;IMG_2781&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5510/9049815798_5c03d6dc95_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049784860/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2787&quot;&gt;&lt;img alt=&quot;IMG_2787&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3665/9049784860_4baeb0a101_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9047962659/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2796&quot;&gt;&lt;img alt=&quot;IMG_2796&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5517/9047962659_a4492457cf_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049623474/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2733&quot;&gt;&lt;img alt=&quot;IMG_2733&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3691/9049623474_8a4166169c_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;這排紅磚建築是古蹟「並倉」，很多海報或宣傳品上都有印。可惜聽不懂日語，無法理解船夫先生的介紹，只好先按快門再說。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9047856101/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2841&quot;&gt;&lt;img alt=&quot;IMG_2841&quot; height=&quot;427&quot; src=&quot;http://farm3.staticflickr.com/2858/9047856101_ff29ec398b_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049648488/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2725&quot;&gt;&lt;img alt=&quot;IMG_2725&quot; height=&quot;427&quot; src=&quot;http://farm3.staticflickr.com/2849/9049648488_4aeebaf37d_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;水路四通八達的柳川盛行河童傳說。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9047822773/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2869&quot;&gt;&lt;img alt=&quot;IMG_2869&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5466/9047822773_e581f28e4d_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9050014266/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2892&quot;&gt;&lt;img alt=&quot;IMG_2892&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3699/9050014266_21ab4743f5_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049683314/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2755&quot;&gt;&lt;img alt=&quot;IMG_2755&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5528/9049683314_87b1aa151e_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;這幾隻小水鴨會跟在船旁邊游泳，累了就徑自上岸休息。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9050160688/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2812&quot;&gt;&lt;img alt=&quot;IMG_2812&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5456/9050160688_643d7d5d27_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;h3&gt;水上市場&lt;/h3&gt;&lt;div&gt;船行至中繼站，沿岸出現了幾間商店，不過今天只有一家營業，船夫先生徵得我們同意後將船稍微靠岸。買了店家海報上廣告的抹茶冰淇淋與 &lt;a href=&quot;http://www.asahibeer.com/brands/beer/superdry/&quot; target=&quot;_blank&quot;&gt;Asahi Super Dry&lt;/a&gt; 啤酒，價格稍貴但尚可接受。隨後店家遞上一瓶茶飲給船夫（不曉得是不是因為客人消費才有的）。&lt;br&gt;微風徐徐，大口喝下一口啤酒，伴著船夫爽朗的歌聲，這似乎才是柳川完整的面貌呢！&lt;/div&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9050154478/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2814&quot;&gt;&lt;img alt=&quot;IMG_2814&quot; height=&quot;427&quot; src=&quot;http://farm8.staticflickr.com/7426/9050154478_902c89dbfd_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9050182544/&quot; title=&quot;Flickr 上 clayliao 的 IMG_2801&quot;&gt;&lt;img alt=&quot;IMG_2801&quot; height=&quot;427&quot; src=&quot;http://farm8.staticflickr.com/7420/9050182544_704217b82c_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2013/09/blog-post.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2013/09/blog-post.html</link><author>noreply@blogger.com (Clay Liao)</author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-7222478008208595897</guid><pubDate>Sun, 01 Sep 2013 13:32:00 +0000</pubDate><atom:updated>2013-09-13T13:05:04.457+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Travel</category><title>[九州。旅行] 福岡雅虎巨蛋日職初體驗 - 軟銀鷹 V.S. 阪神虎</title><description>台灣職棒在2013年經典賽後變得十分火熱，久聞日本人也很熱愛棒球，這次九洲旅行特別查了福岡巨蛋的賽程表，體驗日本道地的職棒應援文化。&lt;br&gt;&lt;a href=&quot;http://www.softbankhawks.co.jp/stadium/&quot; target=&quot;_blank&quot;&gt;福岡巨蛋&lt;/a&gt;是日本第二座巨蛋球場，也是唯一的開閉式球場，主場球隊為福岡軟體銀行鷹隊。搭乘福岡地鐵空港線到唐人町站下車，徒步 15-20 分鐘就可以看到氣派的福岡雅虎巨蛋。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9050318668/&quot; title=&quot;Yahoo! Dome 福岡雅虎巨蛋&quot;&gt;&lt;img alt=&quot;P1060503&quot; height=&quot;427&quot; src=&quot;http://farm8.staticflickr.com/7294/9050318668_01eb8bfcb9_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;聽說非假日的球票並不難買，於是我們就不事先預約，隨性地到了現場才買票。這天是軟銀鷹對戰阪神虎系列賽的最後一場，特殊比賽票價比照假日，最便宜的外野指定席1,800日圓。&lt;br&gt;在購買的過程中，售票阿姨會（用日語）詢問支持的球隊。我用帶日文腔的英文說了幾次 &amp;quot;SoftBank Hawks&amp;quot; 後終於過關，在不懂日文的情況下成功買到票。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/8943490484/&quot; title=&quot;Flickr 上 clayliao 的 Yahoo! Dome 福岡雅虎巨蛋&quot;&gt;&lt;img alt=&quot;Yahoo! Dome 福岡雅虎巨蛋&quot; height=&quot;480&quot; src=&quot;http://farm4.staticflickr.com/3761/8943490484_f7de6085d9_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;h3&gt;球場周邊&lt;/h3&gt;傳奇球員王貞治是前日本職棒福岡軟體銀行鷹隊監督（總教練）兼球團副社長、總經理。2010年7月&lt;a href=&quot;http://yokanavi.com/tw/theme/detail/452&quot; target=&quot;_blank&quot;&gt;王貞治棒球紀念館&lt;/a&gt;在福岡巨蛋開館（需另外購票參觀），王貞治的巨幅照片隨處可見。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9048051295/&quot; title=&quot;Flickr 上 clayliao 的 P1060520&quot;&gt;&lt;img alt=&quot;P1060520&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3833/9048051295_b08bfd1668_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;握手廣場有很多名人的等比例手部模型，讓民眾可以近距離體驗跟名人握手的感覺。很多名人的手都比想像的要小很多。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9050308548/&quot; title=&quot;Flickr 上 clayliao 的 Yahoo! Dome 福岡雅虎巨蛋&quot;&gt;&lt;img alt=&quot;Yahoo! Dome 福岡雅虎巨蛋&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3808/9050308548_e652e4ab40_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9050304454/&quot; title=&quot;Flickr 上 clayliao 的 P1060511&quot;&gt;&lt;img alt=&quot;P1060511&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3794/9050304454_06f95f2b7c_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;大部份的球迷都會帶著球隊專屬的加油道具來看球，像下圖這樣全副武裝的球迷其實還蠻多的。迫於社會壓力，我們也入境隨俗地在旁邊的賣場裡買了軟銀鷹的加油棒 :)&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9051747412/&quot; title=&quot;Flickr 上 clayliao 的 Yahoo! Dome 福岡雅虎巨蛋&quot;&gt;&lt;img alt=&quot;Yahoo! Dome 福岡雅虎巨蛋&quot; height=&quot;640&quot; src=&quot;http://farm4.staticflickr.com/3831/9051747412_b3ede0c4cb_z.jpg&quot; width=&quot;427&quot;&gt;&lt;/a&gt;&lt;br&gt;入場時需要檢查包包，不過當驗票人員發現我們聽不懂日文後就直接放行了。福岡巨蛋是禁帶外食的，裡面的食物售價也偏高，如果時間充裕的話，建議可以在旁邊的 Shopping mall &lt;a href=&quot;http://yokanavi.com/tw/landmark/keyword/186&quot; target=&quot;_blank&quot;&gt;海鷹城&lt;/a&gt;先用餐，不僅價格親民，選擇性也比較豐富。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049502451/&quot; title=&quot;Flickr 上 clayliao 的 Yahoo! Dome 福岡雅虎巨蛋&quot;&gt;&lt;img alt=&quot;Yahoo! Dome 福岡雅虎巨蛋&quot; height=&quot;427&quot; src=&quot;http://farm6.staticflickr.com/5472/9049502451_d0fae5760f_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;h3&gt;軟銀鷹 V.S. 阪神虎&lt;/h3&gt;比賽開打前有介紹球員以及啦啦隊表演等活動炒熱開場氣氛。&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9049431355/&quot; title=&quot;Flickr 上 clayliao 的 Yahoo! Dome 福岡雅虎巨蛋&quot;&gt;&lt;img alt=&quot;Yahoo! Dome 福岡雅虎巨蛋&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3767/9049431355_f0b0351617_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9051609016/&quot; title=&quot;Flickr 上 clayliao 的 Yahoo! Dome 福岡雅虎巨蛋&quot;&gt;&lt;img alt=&quot;Yahoo! Dome 福岡雅虎巨蛋&quot; height=&quot;427&quot; src=&quot;http://farm4.staticflickr.com/3720/9051609016_ba32fd3f45_z.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2013/09/Fukuoka-Yahoo-Dome-2013-6-3.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2013/09/Fukuoka-Yahoo-Dome-2013-6-3.html</link><author>noreply@blogger.com (Clay Liao)</author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-4000738761799093341</guid><pubDate>Sat, 13 Jul 2013 17:47:00 +0000</pubDate><atom:updated>2013-07-20T17:27:25.612+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] Grunt 學習筆記(2) - 打造更順暢的開發流程</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;前文&amp;nbsp;&lt;a href=&quot;http://clayliao.blogspot.tw/2013/06/introducing-grunt.html&quot; target=&quot;_blank&quot;&gt;[教學] Grunt 學習筆記(1) - Getting Started&lt;/a&gt;&amp;nbsp;帶大家認識 Grunt 的基本用法，這裡我們要進一步使用 Grunt 簡化 Web 前端開發流程。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;多數前端專案都會引入一些工具如 Node.js, SASS/Less/Stylus, JSHint 以提升專案品質或是可維護性，但這些工具同時也會提高開發流程的複雜度。例如一個&amp;nbsp;&lt;a href=&quot;http://learnboost.github.io/stylus/&quot; target=&quot;_blank&quot;&gt;Stylus&lt;/a&gt;&amp;nbsp;專案的開發流程分解動作如下：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;第一動：修改 &lt;a href=&quot;https://github.com/clayliao/hello-grunt/blob/master/lib/example.styl&quot; target=&quot;_blank&quot;&gt;example.styl&lt;/a&gt;&amp;nbsp;檔案並儲存檔案&lt;/li&gt;&lt;li&gt;第二動：執行 stylus 指令以產生 CSS 檔案：&amp;nbsp;&lt;code&gt;stylus [options] [command] [&amp;lt; in [&amp;gt; out]] [file|dir ...]&lt;/code&gt;&lt;/li&gt;&lt;li&gt;第三動：切換至瀏覽器視窗，重新整理畫面確認結果&lt;/li&gt;&lt;li&gt;第四動：切換至編輯器視窗，繼續編輯檔案&lt;/li&gt;&lt;li&gt;重複第一動&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;/ol&gt;重新審視這個流程後，我們發現除了編輯/存檔以外的動作其實都能交給 Grunt 自動化處理。有了 Grunt 以後，開發者就可以專心寫程式，省下不斷地切換視窗重新整理的時間與力氣。&lt;br /&gt;&lt;h3&gt;範例專案 hello-grunt&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;範例專案&amp;nbsp;&lt;a href=&quot;https://github.com/clayliao/hello-grunt&quot; target=&quot;_blank&quot;&gt;hello-grunt&lt;/a&gt;&amp;nbsp;公開在 Github 上，本文將重點放在解釋如何讓專案跑起來，對細節有興趣的人歡迎自行參考 &lt;a href=&quot;https://github.com/clayliao/hello-grunt/blob/master/Gruntfile.js&quot; target=&quot;_blank&quot;&gt;Gruntfile.js&lt;/a&gt; 的寫法。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;1. 下載範例專案&amp;nbsp;&lt;a href=&quot;https://github.com/clayliao/hello-grunt&quot; target=&quot;_blank&quot;&gt;hello-grunt&lt;/a&gt;：&lt;/div&gt;&lt;code&gt;$ git clone&amp;nbsp;git@github.com:clayliao/hello-grunt.git&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2. 將專案放到本地端開發目錄下，確保能使用 &lt;code&gt;http://localhost/hello-grunt/&lt;/code&gt; 開啓 index.html 檔。例如在 Mac 下可以使用 Symbolic link：&lt;br /&gt;&lt;code&gt;$ cd /Library/WebServer/Documents/&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$ sudo ln -s ~/hello-grunt hello-grunt&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;3. 回到專案目錄下，安裝 Node.js 相依檔案：&lt;br /&gt;&lt;code&gt;$ cd hello-grunt&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$ npm install&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;4. 執行 Grunt，此時 Grunt 會監控 &lt;code&gt;lib/*.styl&lt;/code&gt; 檔案與 &lt;code&gt;*.html&lt;/code&gt; 檔案，一旦這些檔案被修改過就會作出相對應的動作（例如執行 stylus command）並且通知瀏覽器重新整理。&lt;br /&gt;&lt;code&gt;$ grunt&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-T8xQJ8k3oE4/UeFy2XrErxI/AAAAAAAAAjE/_JVZLAdZTBo/s1600/Screen+Shot+2013-07-13+at+11.31.19+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;http://2.bp.blogspot.com/-T8xQJ8k3oE4/UeFy2XrErxI/AAAAAAAAAjE/_JVZLAdZTBo/s640/Screen+Shot+2013-07-13+at+11.31.19+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h3&gt;安裝 Livereload 瀏覽器外掛&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://livereload.com/&quot; target=&quot;_blank&quot;&gt;Livereload&lt;/a&gt;&amp;nbsp;的主要功能是通知瀏覽器重新整理畫面 ，這個方便的功能已經被整合在&amp;nbsp;&lt;a href=&quot;https://npmjs.org/package/grunt-contrib-watch&quot; target=&quot;_blank&quot;&gt;grunt-contrib-watch&lt;/a&gt;&amp;nbsp;plugin 中。&lt;/div&gt;&lt;a href=&quot;http://feedback.livereload.com/knowledgebase/articles/86242-how-do-i-install-and-use-the-browser-extensions-&quot; target=&quot;_blank&quot;&gt;Livereload&lt;/a&gt;&amp;nbsp;支援多數主流瀏覽器。以 Chrome 瀏覽器為例，下載並安裝完成後右上角會出現 Livereload 的小圖示，滑鼠點擊小圖示即可啓動 Livereload（請再次確認&amp;nbsp;&lt;code&gt;$ grunt&lt;/code&gt;&amp;nbsp;正在執行 中，否則會出現錯誤訊息）&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-VWr-3LZfBVA/UeFkzHWXQ0I/AAAAAAAAAiw/ZKIc8NwMCRg/s1600/Screen+Shot+2013-07-13+at+10.30.40+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;244&quot; src=&quot;http://1.bp.blogspot.com/-VWr-3LZfBVA/UeFkzHWXQ0I/AAAAAAAAAiw/ZKIc8NwMCRg/s640/Screen+Shot+2013-07-13+at+10.30.40+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;體驗全新的開發流程&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;準備工作就緒後，就讓我們來親身體驗 Grunt 帶來的好處。首先使用編輯器開啓 &lt;code&gt;example.styl&lt;/code&gt;&amp;nbsp;並且試著改變網頁中&amp;nbsp;&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; 標題的顏色。起初&amp;nbsp;&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;&amp;nbsp;標題預設是黑色的：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Z5etuHc6y5s/UeFjPmCWrKI/AAAAAAAAAiM/k70ZcxO8UfY/s1600/Screen+Shot+2013-07-13+at+10.10.17+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;http://1.bp.blogspot.com/-Z5etuHc6y5s/UeFjPmCWrKI/AAAAAAAAAiM/k70ZcxO8UfY/s640/Screen+Shot+2013-07-13+at+10.10.17+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;接下來我們試著將顏色改為紅色（存檔後請務必讓雙手離開鍵盤，用心感受一下這個 moment）。此時 Grunt 偵測到了 &lt;code&gt;lib/example.styl&lt;/code&gt; 檔案被修改過，於是自動執行 stylus command 編譯新的 CSS 檔案：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-2Bn6J2lipOM/UeFjPwfKsaI/AAAAAAAAAiU/xZcV9TstMC8/s1600/Screen+Shot+2013-07-13+at+10.11.11+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;http://2.bp.blogspot.com/-2Bn6J2lipOM/UeFjPwfKsaI/AAAAAAAAAiU/xZcV9TstMC8/s640/Screen+Shot+2013-07-13+at+10.11.11+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;編譯成功後，瀏覽器馬上自動重新整理，並且 &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; 標題也被改成紅色了！另外也可以修改 &lt;code&gt;index.html&lt;/code&gt; 的文字內容，您會發現瀏覽器幾乎能夠同步更新內容：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-I8ffd3w9VSg/UeFjPnWfvsI/AAAAAAAAAiQ/aj7QVrj98NQ/s1600/Screen+Shot+2013-07-13+at+10.10.39+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;518&quot; src=&quot;http://4.bp.blogspot.com/-I8ffd3w9VSg/UeFjPnWfvsI/AAAAAAAAAiQ/aj7QVrj98NQ/s640/Screen+Shot+2013-07-13+at+10.10.39+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;小結&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;專案&amp;nbsp;&lt;a href=&quot;https://github.com/clayliao/hello-grunt&quot; target=&quot;_blank&quot;&gt;hello-grunt&lt;/a&gt;&amp;nbsp;是簡化過的範例，目的是要展示如何使用 Grunt 將重複的動作自動化，讓開發流程變得更流暢。您可以視需求將 Stylus 換成 SASS/Less，也可以發掘更多的&amp;nbsp;&lt;a href=&quot;http://gruntjs.com/plugins&quot; target=&quot;_blank&quot;&gt;Grunt 外掛&lt;/a&gt;讓自己更上一層樓。&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2013/07/introducing-grunt-livereload.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-T8xQJ8k3oE4/UeFy2XrErxI/AAAAAAAAAjE/_JVZLAdZTBo/s72-c/Screen+Shot+2013-07-13+at+11.31.19+PM.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-6266113731305657217</guid><pubDate>Sat, 06 Jul 2013 03:11:00 +0000</pubDate><atom:updated>2013-07-17T17:03:59.051+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Travel</category><title>[教學] 分享照片到 Yahoo! 氣象 App</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://blog.flickr.net/zh/2013/06/19/2013-apple-design-award/&quot; target=&quot;_blank&quot;&gt;榮獲2013年蘋果設計獎（Apple Design Awards）&lt;/a&gt;的 Yahoo! 氣象 App (&lt;a href=&quot;https://itunes.apple.com/en/app/yahoo!-weather/id628677149?mt=8&quot; target=&quot;_blank&quot;&gt;iOS&lt;/a&gt; / &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.yahoo.mobile.client.android.weather&quot; target=&quot;_blank&quot;&gt;Android&lt;/a&gt;) 是我最常用的天氣應用程式。除了豐富的氣象訊息外，其漂亮的動態氣象背景圖也是一大特色，查詢氣象資訊之餘還能順便欣賞世界各地的照片。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;這些高品質的天氣照片都是 &lt;a href=&quot;http://flickr.com/&quot; target=&quot;_blank&quot;&gt;Flickr&lt;/a&gt; 用戶提供的。也就是說，每個人都有機會讓自己的照片登上 Yahoo! 氣象 App。只要將您的 &lt;a href=&quot;http://www.flickr.com/groups/projectweather/discuss/72157631833494907/#q4&quot; target=&quot;_blank&quot;&gt;Flickr 天氣照片&lt;/a&gt;加上地理資訊後提交至 &lt;a href=&quot;http://www.flickr.com/groups/projectweather/&quot; target=&quot;_blank&quot;&gt;Project Weather 社團&lt;/a&gt;，經審核通過就可以在天氣 App 上讓大家都看到囉！（&lt;a href=&quot;http://www.flickr.com/groups/projectweather/discuss/72157631833494907/&quot; target=&quot;_blank&quot;&gt;詳見官方說明&lt;/a&gt;）&lt;/div&gt;經過一段時間的募集後，現在 Flickr &lt;a href=&quot;http://www.flickr.com/groups/projectweather/pool&quot; target=&quot;_blank&quot;&gt;Project Weather&lt;/a&gt; 上&lt;span id=&quot;goog_718050384&quot;&gt;&lt;/span&gt;熱門城市的照片&lt;span id=&quot;goog_718050385&quot;&gt;&lt;/span&gt;水準都已經高不可攀。專業攝影水準的人當然可以正面對決，但是普通鄉民想登上Yahoo! 氣象 App 的話，就只能靠「開發處女地戰略」了。這次我投稿的地點（日本的熊本市&lt;span style=&quot;background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 15px; line-height: 26px;&quot;&gt;、&lt;/span&gt;佐世保市以及&lt;span style=&quot;background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 15px; line-height: 26px;&quot;&gt;柳川市&lt;/span&gt;）都還在使用系統預設照片，猜想這些地點應該都還沒有人投稿。實際測試後，果然只要符合規定的照片都很有機會通過審核。&lt;br&gt;&lt;br&gt;照片登上氣象 App 後的畫面如下，其右下角會標示作者 Flickr id：&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-gzwHIlrSSo8/Uc5X8SMavaI/AAAAAAAAAhE/F9KvuwRXVaI/s1024/9144308246_38eed5f17c_b.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;http://4.bp.blogspot.com/-gzwHIlrSSo8/Uc5X8SMavaI/AAAAAAAAAhE/F9KvuwRXVaI/s640/9144308246_38eed5f17c_b.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-35zvZmhm4ZQ/Uc5X8LoyhqI/AAAAAAAAAhA/WeKvJJr1K5w/s1024/9142081619_7cc9467ba5_b.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://2.bp.blogspot.com/-35zvZmhm4ZQ/Uc5X8LoyhqI/AAAAAAAAAhA/WeKvJJr1K5w/s400/9142081619_7cc9467ba5_b.jpg&quot; width=&quot;225&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-FrvV89dBdCE/UeZd2hYpobI/AAAAAAAAAjg/dr7Km8k14kw/s1600/9304054109_079cea2a93_b.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;http://2.bp.blogspot.com/-FrvV89dBdCE/UeZd2hYpobI/AAAAAAAAAjg/dr7Km8k14kw/s640/9304054109_079cea2a93_b.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-TJMEwXYRiYY/UeZd2kMEClI/AAAAAAAAAjc/rnmtVOQFk2A/s1600/9306836666_86011fd8a1_b.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://3.bp.blogspot.com/-TJMEwXYRiYY/UeZd2kMEClI/AAAAAAAAAjc/rnmtVOQFk2A/s400/9306836666_86011fd8a1_b.jpg&quot; width=&quot;225&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;截至目前小弟共有四張照片上榜，拍攝地點都在日本九州：&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;熊本城/九州熊本縣（day/cloudy）&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9044906777/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;426&quot; src=&quot;http://2.bp.blogspot.com/-ZtKC-sZOFAw/UdbVxEAi6FI/AAAAAAAAAhc/J7Y8EawpDJA/s640/9044906777_ca4f585bb4_b.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;柳川/九州柳川市（day/clear）&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9047731289/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;426&quot; src=&quot;http://4.bp.blogspot.com/-XKMQHp_5VWI/UdbVyYHLhgI/AAAAAAAAAho/Jesu9RUthtU/s640/9047731289_25387b49dc_b.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;千陽號/九州佐世保市（day/cloudy）&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9048771712/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;426&quot; src=&quot;http://2.bp.blogspot.com/-YHBZN5rdr1I/UdbVyOaYFTI/AAAAAAAAAhk/GML1XxVrFIw/s640/9048771712_f3b6285a01_b.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;豪斯登堡/九州佐世保市（day/cloudy）&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/clayliao/9048799590/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;426&quot; src=&quot;http://3.bp.blogspot.com/-aeesNoiI0v0/UdbVy86zKHI/AAAAAAAAAh0/dP-fjF6_YXo/s640/9048799590_81cdde975f_b.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2013/07/flickr-project-weather.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2013/07/flickr-project-weather.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-gzwHIlrSSo8/Uc5X8SMavaI/AAAAAAAAAhE/F9KvuwRXVaI/s72-c/9144308246_38eed5f17c_b.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-3633348440887226263</guid><pubDate>Tue, 25 Jun 2013 16:42:00 +0000</pubDate><atom:updated>2014-01-09T10:33:12.882+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Nodejs 學習筆記</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] Grunt 學習筆記(1) - Getting Started</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;一般來說，網站上線前都要經過壓縮、測試、打包 package 等佈署動作，在 Linux/Unix 環境下，我們通常將這些指令 (shell script) 寫在 Makefile 裡方便自動化執行。不過很可惜地，這些指令並不具備跨平台的能力，也就是說，在 Windows 與 Linux/Unix 各有不同的寫法。 &lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;Grunt 是一套基於 NodeJS 的 JavaScript Task Runner 工具，它可以跨平台（Windows 系統也能用）、沿用 JavaScript 語法（免學 shell script），還有眾多的 &lt;a href=&quot;http://gruntjs.com/plugins&quot; target=&quot;_blank&quot;&gt;Plugins&lt;/a&gt; 支援 CoffeeScript、Handlebars、JSHint、Less、Sass、Compass 等常用工具。&lt;/div&gt;&lt;h3&gt;Getting Started&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;學習 Grunt 最快的方法就是建立一個可執行的範例 。本文的範例將會建立一個 Grunt Task ，完成後就可以讓 Grunt 利用 &lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-uglify&quot; target=&quot;_blank&quot;&gt;uglify&lt;/a&gt; 工具自動化壓縮 JavaScript 檔案，以後上線部署再也不用純手工壓縮了！&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;首先我們依照 &lt;a href=&quot;http://gruntjs.com/getting-started&quot; target=&quot;_blank&quot;&gt;Getting Started&lt;/a&gt; 教學新開了 Gruntfile.js 以及 package.json 兩個檔案，接著在專案目錄下執行命令 &lt;code&gt;grunt&lt;/code&gt; ，但是迎面而來的卻是令初學者傻眼的錯誤畫面：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-_3aKBNRC1yA/Ubw9K1qor0I/AAAAAAAAAf4/OX26yoZDBk4/s1600/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.02.50.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-_3aKBNRC1yA/Ubw9K1qor0I/AAAAAAAAAf4/OX26yoZDBk4/s640/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.02.50.png&quot; height=&quot;108&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;錯誤訊息回報 ugligy:build 這個 Task 出錯了。為了找出原因，我們回過頭來檢查 Gruntfile.js ，看看這個 Task 做了什麼事情。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;ugligy:build Task 會將 /src 目錄下的原始檔 helloworld.js （變數 pkg.name 即為範例中的 &amp;quot;my-project-name&amp;quot;，這裡我們將它改為 &amp;quot;helloworld&amp;quot; 方便說明）壓縮處理後，放到 /build 目錄下並且命名為 helloworld.min.js（&amp;quot;helloworld&amp;quot; 即變數 pkg.name ）。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Nj3Zq6RP5LQ/UcUSEUE07WI/AAAAAAAAAgw/rEEpmLtwsFY/s1600/Screen+Shot+2013-06-22+at+10.54.16+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-Nj3Zq6RP5LQ/UcUSEUE07WI/AAAAAAAAAgw/rEEpmLtwsFY/s640/Screen+Shot+2013-06-22+at+10.54.16+AM.png&quot; height=&quot;236&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;為了順利執行 grunt，我們在專案目錄下建立一個空的 src 目錄，並且在裡面新增一個名為 helloword.js 的 JavaScript 檔案，此外，再新建一個空的 build 目錄用來放置壓縮處理過的結果。完成後的目錄結構如下所示：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-7aA5lAqv-O8/Ubw9LKgQCvI/AAAAAAAAAgA/yCuSnng14P4/s1600/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.03.48.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-7aA5lAqv-O8/Ubw9LKgQCvI/AAAAAAAAAgA/yCuSnng14P4/s640/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.03.48.png&quot; height=&quot;298&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;回到專案目錄下重新執行指令 &lt;code&gt;grunt&lt;/code&gt;，此時取而代之的是是令人放心的成功訊息！（撒花）壓縮處理過的新檔案如預期地新增到 build 目錄下：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-mt7yzZrIPPU/Ubw9LH29QpI/AAAAAAAAAgE/ndse9ZVtcwg/s1600/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.04.16.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-mt7yzZrIPPU/Ubw9LH29QpI/AAAAAAAAAgE/ndse9ZVtcwg/s640/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.04.16.png&quot; height=&quot;140&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-vNnPCZEI3fw/Ubw9LWK5dEI/AAAAAAAAAgI/RWU7W0RqdxE/s1600/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.04.58.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-vNnPCZEI3fw/Ubw9LWK5dEI/AAAAAAAAAgI/RWU7W0RqdxE/s640/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.04.58.png&quot; height=&quot;316&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;h3&gt;更多 Grunt 功能&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;到這邊我們也算是略懂 Grunt 了，那麼除了 &lt;a href=&quot;https://github.com/gruntjs/grunt-contrib-uglify&quot; target=&quot;_blank&quot;&gt;uglify&lt;/a&gt; 外，Grunt 還能做些什麼呢？官方網站的 &lt;a href=&quot;http://gruntjs.com/plugins&quot; target=&quot;_blank&quot;&gt;Plugins&lt;/a&gt; 頁面列出了所有 Grunt 支援的功能，幾乎所有常見的開發工具都在列表中了。如果這些還不夠的話，Grunt Task 也支援 &lt;a href=&quot;https://npmjs.org/package/grunt-shell&quot; target=&quot;_blank&quot;&gt;Shell&lt;/a&gt; 指令，如此一來，幾乎沒有什麼是 Grunt 辦不到呢！&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;回到開發流程，我認為 Grunt 特別適用於混用 Node.js, Livereload, SASS 等工具的開發環境，這些工具都依賴特定的執行環境，此時專案需要並存 Makefile 以及 Rakefile (Ruby) 等，非常複雜且不易維護。使用 Grunt 可以整合這些 Task，讓開發/部署工作變得更單純，這也是除了跨平台外， Grunt 優於 Shell Script / Makefile 的一大優勢。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-ik5fMIqHYEg/Ubrfd4jltII/AAAAAAAAAfg/gx-To7rbMvA/s1600/Screen+Shot+2013-06-14+at+2.05.28+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-ik5fMIqHYEg/Ubrfd4jltII/AAAAAAAAAfg/gx-To7rbMvA/s640/Screen+Shot+2013-06-14+at+2.05.28+PM.png&quot; height=&quot;640&quot; width=&quot;624&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;下一篇：&lt;a href=&quot;http://clayliao.blogspot.tw/2013/07/introducing-grunt-livereload.html&quot; target=&quot;_blank&quot;&gt;[教學] Grunt 學習筆記(2) - 打造更順暢的開發流程&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2013/06/introducing-grunt.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2013/06/introducing-grunt.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-_3aKBNRC1yA/Ubw9K1qor0I/AAAAAAAAAf4/OX26yoZDBk4/s72-c/Screen+Shot+2013-06-15+at+%E4%B8%8B%E5%8D%886.02.50.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-8760529980467648038</guid><pubDate>Tue, 18 Jun 2013 11:13:00 +0000</pubDate><atom:updated>2013-06-24T23:02:26.476+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">YUI</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>Pure CSS -- 超輕量化 CSS Framework</title><description>&lt;script async=&quot;&quot; class=&quot;speakerdeck-embed&quot; data-id=&quot;fede1470ab80013094101e5291f98d85&quot; data-ratio=&quot;1.77777777777778&quot; src=&quot;//speakerdeck.com/assets/embed.js&quot;&gt;&lt;/script&gt; &lt;br /&gt;&lt;div&gt;&lt;a href=&quot;http://purecss.io/&quot; target=&quot;_blank&quot;&gt;Pure&lt;/a&gt; 是 YUI 團隊新推出的&lt;a href=&quot;https://github.com/yui/pure/&quot; target=&quot;_blank&quot;&gt;開源專案&lt;/a&gt;，才推出不久就在 &lt;a href=&quot;https://github.com/yui/pure/&quot; target=&quot;_blank&quot;&gt;Github&lt;/a&gt; 上累積了將近 3800 個 Star 。它是一套非常輕量化的 CSS framework，提供了常用的網頁 UI 元件樣式：&lt;a href=&quot;http://purecss.io/base/&quot; target=&quot;_blank&quot;&gt;Base&lt;/a&gt;&amp;nbsp;、&lt;a href=&quot;http://purecss.io/grids/&quot; target=&quot;_blank&quot;&gt;Grid&lt;/a&gt;、&lt;a href=&quot;http://purecss.io/forms/&quot; target=&quot;_blank&quot;&gt;Forms&lt;/a&gt;、&lt;a href=&quot;http://purecss.io/buttons/&quot; target=&quot;_blank&quot;&gt;Buttons&lt;/a&gt;、&lt;a href=&quot;http://purecss.io/tables/&quot; target=&quot;_blank&quot;&gt;Tables&lt;/a&gt;、&lt;a href=&quot;http://purecss.io/menus/&quot; target=&quot;_blank&quot;&gt;Menus&lt;/a&gt;，。&lt;a href=&quot;http://purecss.io/&quot; target=&quot;_blank&quot;&gt;Pure&lt;/a&gt;&amp;nbsp;的預設樣式正是正流行的 Flat Design ，開發者可以直接引用&amp;nbsp;&lt;a href=&quot;http://purecss.io/&quot; target=&quot;_blank&quot;&gt;Pure&lt;/a&gt;&amp;nbsp;打底 CSS，快速地建構出跨瀏覽器且具備 Responsive Design 的網站。&lt;br /&gt;&lt;br /&gt;相較於各種 CSS/Front-end framework （ex, &lt;a href=&quot;http://twitter.github.io/bootstrap/&quot; target=&quot;_blank&quot;&gt;Bootstrap&lt;/a&gt;）動輒 100KB 起跳的 CSS 檔案，&lt;a href=&quot;http://purecss.io/&quot; target=&quot;_blank&quot;&gt;Pure&lt;/a&gt;&amp;nbsp;走的是極簡輕量化路線，只提供最通用的 CSS 元件，全部的 CSS 加起來只有 18.7KB (v2.0)！&lt;/div&gt;&lt;h3&gt;範例Layouts&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;http://purecss.io/&quot; target=&quot;_blank&quot;&gt;Pure&lt;/a&gt;&amp;nbsp;檔案雖小，但卻也十分夠用。以下是 YUI 團隊提供的幾個範例模板：&lt;/div&gt;&lt;h4&gt;Landing Page&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://purecss.io/layouts/marketing/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;http://purecss.io/img/layouts/marketing@2x.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;h4&gt;Photo Gallery&lt;/h4&gt;&lt;a href=&quot;http://purecss.io/layouts/gallery/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;342&quot; src=&quot;http://purecss.io/img/layouts/gallery@2x.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h4&gt;Email&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;http://purecss.io/layouts/email/&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;342&quot; src=&quot;http://purecss.io/img/layouts/email@2x.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;整合工具&lt;/h3&gt;&lt;div&gt;熟悉 &lt;a href=&quot;http://clayliao.blogspot.tw/2012/12/introducion-yeoman.html&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 的開發者只要安裝 &lt;a href=&quot;https://github.com/sindresorhus/generator-pure&quot; target=&quot;_blank&quot;&gt;generate-pure 套件&lt;/a&gt;後，就可以使用&amp;nbsp;&lt;code&gt;yo pure&lt;/code&gt;&amp;nbsp;指令開始新的&amp;nbsp;&lt;a href=&quot;http://purecss.io/&quot; target=&quot;_blank&quot;&gt;Pure&lt;/a&gt;&amp;nbsp;專案。此外&amp;nbsp;&lt;a href=&quot;https://github.com/bevry/docpad&quot; target=&quot;_blank&quot;&gt;DocPad&lt;/a&gt;&amp;nbsp;的愛用者也有整合工具&amp;nbsp;&lt;a href=&quot;https://github.com/MassDistributionMedia/yui-purecss.docpad&quot; target=&quot;_blank&quot;&gt;yui-purecss.docpad&lt;/a&gt;。&lt;/div&gt;&lt;h3&gt;Skin Builder&lt;/h3&gt;&lt;div&gt;每個網站都希望保持自己的風格，YUI Skin Builder 是很方便的視覺工具，幫助我們快速地建構不同的樣式。舉凡圓角角度、配色色碼等，都可以客制化新樣式，不再需要跟大家一起穿制服了！&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-0VvwTHFUFr8/Ub8slSQ8oYI/AAAAAAAAAgg/4bX-q-QGEp4/s1600/Screen+Shot+2013-06-17+at+%E4%B8%8B%E5%8D%8811.33.53.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;494&quot; src=&quot;http://3.bp.blogspot.com/-0VvwTHFUFr8/Ub8slSQ8oYI/AAAAAAAAAgg/4bX-q-QGEp4/s640/Screen+Shot+2013-06-17+at+%E4%B8%8B%E5%8D%8811.33.53.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-0VvwTHFUFr8/Ub8slSQ8oYI/AAAAAAAAAgg/4bX-q-QGEp4/s1600/Screen+Shot+2013-06-17+at+%E4%B8%8B%E5%8D%8811.33.53.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2013/06/introducing-pure-css.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-0VvwTHFUFr8/Ub8slSQ8oYI/AAAAAAAAAgg/4bX-q-QGEp4/s72-c/Screen+Shot+2013-06-17+at+%E4%B8%8B%E5%8D%8811.33.53.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-4722940626926319803</guid><pubDate>Mon, 04 Mar 2013 03:37:00 +0000</pubDate><atom:updated>2013-07-12T17:33:35.769+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Others</category><title>淺談遊戲化產品設計</title><description>&lt;div&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Gamification&quot; target=&quot;_blank&quot;&gt;Gamification&lt;/a&gt; 指的是「遊戲化」，主要是在原本生硬的產品/服務加上一些好玩的元素，並且引導使用者在不知不覺中完成我們期望的行為。「&lt;a href=&quot;https://speakerdeck.com/clayliao/gamification-for-webapps&quot; target=&quot;_blank&quot;&gt;Gamification for Webapps&lt;/a&gt;」 投影片中介紹兩種遊戲驅動力：「約定」與「社會地位」，並使用幾個現實生活中常見的產品/網路服務/行銷活動作為範例，讓大家更了解遊戲化的強大威力。&lt;/div&gt;&lt;script async=&quot;&quot; class=&quot;speakerdeck-embed&quot; data-id=&quot;10b021005c6701300aa012313d244251&quot; data-ratio=&quot;1.33333333333333&quot; src=&quot;//speakerdeck.com/assets/embed.js&quot;&gt;&lt;/script&gt; &lt;br&gt;&lt;div&gt;對遊戲化主題有興趣的人，歡迎繼續閱讀下列兩份資料。投影片中遊戲驅動力的靈感正是來自於TED演講 &lt;a href=&quot;http://www.ted.com/talks/seth_priebatsch_the_game_layer_on_top_of_the_world.html&quot;&gt;The game layer on top of the world&lt;/a&gt; ： &lt;/div&gt;&lt;div&gt;1. [TED] Seth Priebatsch: The game layer on top of the world&lt;/div&gt;&lt;div&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;360&quot; mozallowfullscreen=&quot;&quot; scrolling=&quot;no&quot; src=&quot;http://embed.ted.com/talks/seth_priebatsch_the_game_layer_on_top_of_the_world.html&quot; webkitallowfullscreen=&quot;&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;2. Gamification 遊戲化是在 Play 蝦米 Game&lt;/div&gt;&lt;div&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;486&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; mozallowfullscreen=&quot;&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/16173142&quot; style=&quot;border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;&quot; webkitallowfullscreen=&quot;&quot; width=&quot;597&quot;&gt; &lt;/iframe&gt; &lt;br&gt;&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;&lt;strong&gt; &lt;a href=&quot;http://www.slideshare.net/bobchao/gamification-16173142&quot; target=&quot;_blank&quot; title=&quot;Gamification 遊戲化是在 Play 蝦米 Game&quot;&gt;Gamification 遊戲化是在 Play 蝦米 Game&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/bobchao&quot; target=&quot;_blank&quot;&gt;Bob Chao&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;3. &lt;a href=&quot;http://www.youtube.com/watch?v=bqMOdm1dhwM&quot; target=&quot;_blank&quot;&gt;獎金獵人 - Gamification vs. UX / 張芷芸 (花水木/hanamizuki)&lt;/a&gt;&lt;br&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/bqMOdm1dhwM&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt; &lt;br&gt;&lt;/div&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2013/03/gamification-for-webapps.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2013/03/gamification-for-webapps.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/bqMOdm1dhwM/default.jpg" height="72" width="72"/><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-5584812393203174070</guid><pubDate>Mon, 14 Jan 2013 10:30:00 +0000</pubDate><atom:updated>2013-07-08T10:42:16.505+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tech Talk</category><category domain="http://www.blogger.com/atom/ns#">Yahoo</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>超理性使用者介面設計 - Data-driven A/B Testing @ Webconf Taiwan 2013</title><description>&lt;div&gt;創下 NT$1,300 門票四分鐘完售紀錄的&amp;nbsp;&lt;a href=&quot;http://www.webconf.tw/program.html&quot; target=&quot;_blank&quot;&gt;Webconf Taiwan&lt;/a&gt;&amp;nbsp;圓滿落幕囉！這次的活動會場分為技術軌與設計師軌，今年很榮幸受邀在設計師軌分享「&lt;a href=&quot;http://www.slideshare.net/clayliao/data-driven-ab-testing&quot; target=&quot;_blank&quot;&gt;超理性使用者介面設計 - Data-driven A/B Testing&lt;/a&gt;」。&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/A/B_testing&quot; target=&quot;_blank&quot;&gt;A/B Testing&lt;/a&gt; 是大流量網站改善介面的秘訣。根據現場調查的結果，只有少數聽眾（目測約五位）執行過類似的實驗。&lt;a href=&quot;http://en.wikipedia.org/wiki/A/B_testing&quot; target=&quot;_blank&quot;&gt;A/B Testing&lt;/a&gt; 的理論根據是統計學的&lt;a href=&quot;http://en.wikipedia.org/wiki/Statistical_hypothesis_testing&quot; target=&quot;_blank&quot;&gt;假設檢定&lt;/a&gt;，有效的測試能夠以數字呈現出每個頁面上的像素、色碼、排版的使用者回饋，讓設計師不再只是憑感覺做設計，配合實驗的佐證才更專業！&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;486&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; mozallowfullscreen=&quot;mozallowfullscreen&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/15970596&quot; style=&quot;border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;&quot; webkitallowfullscreen=&quot;webkitallowfullscreen&quot; width=&quot;597&quot;&gt; &lt;/iframe&gt; &lt;br /&gt;&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;&lt;strong&gt; &lt;a href=&quot;http://www.slideshare.net/clayliao/data-driven-ab-testing&quot; target=&quot;_blank&quot; title=&quot;超理性使用者介面設計 - Data-driven A/B Testing&quot;&gt;超理性使用者介面設計 - Data-driven A/B Testing&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/clayliao&quot; target=&quot;_blank&quot;&gt;Clay Liao&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;script async=&quot;async&quot; class=&quot;speakerdeck-embed&quot; data-id=&quot;ec2e56e03f8a0130b9ec1231381f54b3&quot; data-ratio=&quot;1.33333333333333&quot; src=&quot;//speakerdeck.com/assets/embed.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;div&gt;&lt;iframe width=&quot;640&quot; height=&quot;360&quot; src=&quot;//www.youtube.com/embed/lEUkIZjpVac&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2013/01/data-driven-ab-testing.html</link><author>noreply@blogger.com (Clay Liao)</author><thr:total>2</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-5843624058957035425</guid><pubDate>Wed, 09 Jan 2013 05:33:00 +0000</pubDate><atom:updated>2013-06-22T11:05:57.402+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">實用工具</category><title>[分享] 網頁 UI 設計苦手的實用工具包</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;在許多中小企業或是個人工作室裡製作網站經常是一條龍式的「垂直整合」：工程師得身兼架設伺服器、資料庫甚至是... 介面設計。介面設計對許多缺乏美感的阿宅工程師來說這是一大挑戰，因為多數的情況下老闆/產品經理看不懂 Database schema ，但是卻能一眼看出網站漂不漂亮。以下分享一些個人常用到的工具/資源給有相同困擾的工程師。&lt;/div&gt;&lt;h3&gt;免費工具&lt;/h3&gt;&lt;h4&gt;Pencil Project&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://pencil.evolus.vn/&quot; target=&quot;_blank&quot;&gt;Pencil Project&lt;/a&gt;&amp;nbsp;是正港免費的 Wireframe 軟體，也是我目前使用的主力工具。它需要下載安裝，支援 Windows、Mac、Linux 平台，也提供 Firefox 外掛。使用草稿除了非常方便溝通外，使用&amp;nbsp;&lt;a href=&quot;http://pencil.evolus.vn/&quot; target=&quot;_blank&quot;&gt;Pencil Project&lt;/a&gt;&amp;nbsp;預先定義好的 UI 元件也能避免老闆/客戶/產品經理想出太前衛的介面。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-NGYdx-jNzuU/UOuHAqE1DdI/AAAAAAAAAYk/-U2F515UCFg/s1600/Screen+Shot+2013-01-08+at+10.39.47+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;396&quot; src=&quot;http://2.bp.blogspot.com/-NGYdx-jNzuU/UOuHAqE1DdI/AAAAAAAAAYk/-U2F515UCFg/s640/Screen+Shot+2013-01-08+at+10.39.47+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Cacoo&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;與&amp;nbsp;&lt;a href=&quot;http://pencil.evolus.vn/&quot; target=&quot;_blank&quot;&gt;Pencil Project&lt;/a&gt;&amp;nbsp;不同的是，&lt;a href=&quot;https://cacoo.com/&quot; target=&quot;_blank&quot;&gt;Cacoo&lt;/a&gt;&amp;nbsp;是一個「網站」工具，只要有瀏覽器就能使用。&lt;a href=&quot;https://cacoo.com/&quot; target=&quot;_blank&quot;&gt;Cacoo&lt;/a&gt;&amp;nbsp;提供&lt;a href=&quot;https://cacoo.com/lang/en/pricing&quot; target=&quot;_blank&quot;&gt;付費加值功能&lt;/a&gt;，如果是個人使用的話，免費版本也算很夠用了。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-QiLvyCb6brc/UOuLzUNffJI/AAAAAAAAAaA/gIko6uv_neI/s1600/Screen+Shot+2013-01-08+at+11.00.02+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;http://4.bp.blogspot.com/-QiLvyCb6brc/UOuLzUNffJI/AAAAAAAAAaA/gIko6uv_neI/s640/Screen+Shot+2013-01-08+at+11.00.02+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;付費工具&lt;/h3&gt;&lt;h4&gt;Balsamiq&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://www.balsamiq.com/&quot; target=&quot;_blank&quot;&gt;Balsamiq&lt;/a&gt;&amp;nbsp;可以做出高品質的手繪風格草稿設計圖，介面很容易上手。不考慮價格的話，&lt;a href=&quot;http://www.balsamiq.com/&quot; target=&quot;_blank&quot;&gt;Balsamiq&lt;/a&gt;&amp;nbsp;絕對是首選推薦軟體。註冊&amp;nbsp;&lt;a href=&quot;http://www.balsamiq.com/&quot; target=&quot;_blank&quot;&gt;Balsamiq&lt;/a&gt;&amp;nbsp;帳號可以獲得 30 天試用期，您一定要試試看！&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-W8f3ACxz4Xk/UOuJxVUPpgI/AAAAAAAAAZc/qmsijU_lWAI/s1600/Screen+Shot+2013-01-08+at+10.51.30+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;http://3.bp.blogspot.com/-W8f3ACxz4Xk/UOuJxVUPpgI/AAAAAAAAAZc/qmsijU_lWAI/s640/Screen+Shot+2013-01-08+at+10.51.30+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Mockingbird&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;https://gomockingbird.com/&quot; target=&quot;_blank&quot;&gt;Mockingbird&lt;/a&gt;&amp;nbsp;也是網站形式的工具，可以線上免費試用，如果要取得所有功能&lt;a href=&quot;https://gomockingbird.com/signup/&quot; target=&quot;_blank&quot;&gt;需要付費&lt;/a&gt;。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/--C9pwAkGTrU/UOuLA4PZ_1I/AAAAAAAAAZo/6mHSBxO3YLs/s1600/Screen+Shot+2013-01-08+at+10.56.52+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;http://1.bp.blogspot.com/--C9pwAkGTrU/UOuLA4PZ_1I/AAAAAAAAAZo/6mHSBxO3YLs/s640/Screen+Shot+2013-01-08+at+10.56.52+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;其他工具&lt;/h3&gt;&lt;h4&gt;Yahoo! Design Pattern Library&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;非專業的 UI 設計人員常常用錯 UI 元件，其實每個 UI 元件都有其背後隱含的意義，而這些細節往往是介面好壞的關鍵。如果沒有受過專業的 UI 設計訓練的話，請趕快上&amp;nbsp;&lt;a href=&quot;http://developer.yahoo.com/ypatterns/&quot; target=&quot;_blank&quot;&gt;Yahoo! Design Pattern Library&lt;/a&gt;&amp;nbsp;惡補一下。裡面有對介紹每個 UI 元素與建議用途，有了這些背景知識，設計出的介面絕對會更上一層樓！&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-3962g35v4kE/UOuPhB9L2II/AAAAAAAAAak/CzX7kctp-Xc/s1600/Screen+Shot+2013-01-08+at+11.13.38+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;http://3.bp.blogspot.com/-3962g35v4kE/UOuPhB9L2II/AAAAAAAAAak/CzX7kctp-Xc/s640/Screen+Shot+2013-01-08+at+11.13.38+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;Flickr&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;使用高品質的圖可以讓網站的質感大加分，不過臨時要用才出外景可能趕不上專案時程。&lt;a href=&quot;http://www.flickr.com/&quot; target=&quot;_blank&quot;&gt;Flickr&lt;/a&gt;&amp;nbsp;提供大量高品質的圖片，但是要特別注意照片的授權。如果是公開用途的話，在&amp;nbsp;&lt;a href=&quot;http://www.flickr.com/&quot; target=&quot;_blank&quot;&gt;Flickr&lt;/a&gt;&amp;nbsp;搜尋的時候別忘了將 &quot;Only search with Creative Common-licensed&amp;nbsp;content&quot; 選項打勾，以免不小心侵權喔！&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-sFTYJjhmN5M/UOuIJWCC9rI/AAAAAAAAAY8/S55343o4Pi0/s1600/Screen+Shot+2013-01-08+at+10.44.21+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;http://1.bp.blogspot.com/-sFTYJjhmN5M/UOuIJWCC9rI/AAAAAAAAAY8/S55343o4Pi0/s640/Screen+Shot+2013-01-08+at+10.44.21+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-IoaFwVAjglg/UOuIRSdhjxI/AAAAAAAAAZE/12e0qEFHs0I/s1600/Screen+Shot+2013-01-08+at+10.44.33+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;152&quot; src=&quot;http://1.bp.blogspot.com/-IoaFwVAjglg/UOuIRSdhjxI/AAAAAAAAAZE/12e0qEFHs0I/s400/Screen+Shot+2013-01-08+at+10.44.33+AM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;h4&gt;IconFinder&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;一些漂亮的小圖示可以達到畫龍點睛的效果。對於許多缺乏美感，無法使用 Photoshop 自製 Icon 的阿宅工程師來說，直接來&amp;nbsp;&lt;a href=&quot;http://www.iconfinder.com/&quot; target=&quot;_blank&quot;&gt;IconFinder&lt;/a&gt;&amp;nbsp;找素材是最快的了。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-CJXI1S2PLdA/UOuHe94ffnI/AAAAAAAAAY0/24RBeGOePPY/s1600/Screen+Shot+2013-01-08+at+10.41.51+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;404&quot; src=&quot;http://3.bp.blogspot.com/-CJXI1S2PLdA/UOuHe94ffnI/AAAAAAAAAY0/24RBeGOePPY/s640/Screen+Shot+2013-01-08+at+10.41.51+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h4&gt;UI Cloud&lt;/h4&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;有時候要做一個 UI 元件（如搜尋框、下載按鈕），但是又不曉得該如何設計樣式才會好看，此時&amp;nbsp;&lt;a href=&quot;http://ui-cloud.com/&quot; target=&quot;_blank&quot;&gt;UI Cloud&lt;/a&gt;&amp;nbsp;可以幫上忙。在&amp;nbsp;&lt;a href=&quot;http://ui-cloud.com/&quot; target=&quot;_blank&quot;&gt;UI Cloud&lt;/a&gt;&amp;nbsp;可以找到各種不同的 UI 元件設計，非常適合設計新手找靈感。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-oyKrTrOFavg/UOuHUpHeAuI/AAAAAAAAAYs/Xo2TfjeXVPM/s1600/Screen+Shot+2013-01-08+at+10.41.10+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;404&quot; src=&quot;http://2.bp.blogspot.com/-oyKrTrOFavg/UOuHUpHeAuI/AAAAAAAAAYs/Xo2TfjeXVPM/s640/Screen+Shot+2013-01-08+at+10.41.10+AM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h3&gt;Reference&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://www.inside.com.tw/2011/05/19/simple-free-wireframe&quot; target=&quot;_blank&quot;&gt;製作wireframe的免費工具&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2009/05/presentationzen.html&quot; target=&quot;_blank&quot;&gt;讓你的簡報脫胎換骨 ─ 《簡報藝術2.0》&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.tripwiremagazine.com/2012/03/user-interface-design-tools.html&quot; target=&quot;_blank&quot;&gt;60 User Interface Design Tools A Web Designer Must Have&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://itunes.apple.com/us/app/imockups-for-ipad/id364885913?mt=8&quot; target=&quot;_blank&quot;&gt;imockups for ipad&lt;/a&gt;&amp;nbsp;- $6.99&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://techorange.com/2012/10/29/web-design-trends-we-love/&quot; target=&quot;_blank&quot;&gt;網頁設計，怎樣最美？&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://dclick.cc/web-designer-tools/&quot; target=&quot;_blank&quot;&gt;網頁介面設計師的好用工具們&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/lis186/20130112webconf&quot; target=&quot;_blank&quot;&gt;[簡報] 用原型驅動設計@WebConf2013&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/adamp3wang/mockupwebconftw-2013&quot; target=&quot;_blank&quot;&gt;那些mockup沒告訴你的事@WebConf.tw 2013&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description><link>http://clayliao.blogspot.com/2013/01/mockup-tools.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-NGYdx-jNzuU/UOuHAqE1DdI/AAAAAAAAAYk/-U2F515UCFg/s72-c/Screen+Shot+2013-01-08+at+10.39.47+AM.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-4572043011838801548</guid><pubDate>Wed, 02 Jan 2013 07:34:00 +0000</pubDate><atom:updated>2013-01-02T15:42:00.082+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">實用工具</category><category domain="http://www.blogger.com/atom/ns#">網路廣告</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>誰在追蹤你的上網行為？讓 Mozilla Collusion 告訴你</title><description>&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;315&quot; mozallowfullscreen=&quot;mozallowfullscreen&quot; scrolling=&quot;no&quot; src=&quot;http://embed.ted.com/talks/lang/zh-tw/gary_kovacs_tracking_the_trackers.html&quot; webkitallowfullscreen=&quot;webkitallowfullscreen&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;&lt;div class=&quot;separator&quot;&gt;當我們上網時，許多公司也在背後忙著記錄所有的瀏覽/點擊行為，即便開啟私隱模式或不使用個人帳號登入也無法完全躲過各種追蹤技術。藉由這些訊息，網路公司可以分析並辨識出每個獨立的用戶。如今的網際網路不只知道你是一隻狗，還知道你喜歡吃哪一個牌子的狗食！想要在上網同時保有自己的隱私是愈來愈困難了。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br /&gt;&lt;/div&gt;好消息是，這些資訊能讓我們上網更有效率：它讓廣告更為精準，也讓網站得以提供個人化訊息；但是反過來說，它也可能遭到有心人利用甚至侵犯隱私。事實上這些追蹤蒐集而來的個人資訊已經成為一個龐大且成熟的產業，「&lt;a href=&quot;http://www.books.com.tw/exep/prod/booksfile.php?item=0010536017&quot; target=&quot;_blank&quot;&gt;搜尋引擎沒告訴你的事&lt;/a&gt; The Filter Bubble: What the Internet Is Hiding from You」這本書裡有更深入的探討。&lt;br /&gt;&lt;br /&gt;然而技術本身是中立的，端看使用資訊的人是誰。Gary Kovacs 的 TED 演說 &quot;Tracking the trackers&quot; 提醒我們，即便憑個人之力無力扭轉大局，但我們至少有權知道哪些網站正在追蹤自己的上網行為。&lt;br /&gt;&lt;br /&gt;要找出這些資訊並不難，事實上，它們都被記錄在瀏覽器中，只不過沒有相關技術的一般網民實在難以接觸。Firefox 的&amp;nbsp;&lt;a href=&quot;http://www.mozilla.org/en-US/collusion/&quot; target=&quot;_blank&quot;&gt;Mozilla Collusion&lt;/a&gt;&amp;nbsp;外掛可以協助我們分析解讀這些生硬的資料，並且以視覺化的方式即時地呈現出正在追蹤我們上網行為的網站。&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;使用 Mozilla Collusion&lt;/h3&gt;&lt;a href=&quot;http://mozilla%20collusion/&quot; target=&quot;_blank&quot;&gt;下載安裝 Mozilla Collusion&lt;/a&gt;&amp;nbsp;後啟動 Firefox 瀏覽器，在選單列中點選 &lt;b&gt;[Tools]&lt;/b&gt; -&amp;gt; &lt;b&gt;[Collusion Graph]&lt;/b&gt;&amp;nbsp;就可以啟動&amp;nbsp;&lt;a href=&quot;http://www.mozilla.org/en-US/collusion/&quot; target=&quot;_blank&quot;&gt;Mozilla Collusion&lt;/a&gt;：&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-fnmWojf2hsE/UOPCXADbxvI/AAAAAAAAAYQ/JsXWthSO_wo/s1600/Screen+Shot+2013-01-02+at+1.14.31+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;280&quot; src=&quot;http://3.bp.blogspot.com/-fnmWojf2hsE/UOPCXADbxvI/AAAAAAAAAYQ/JsXWthSO_wo/s640/Screen+Shot+2013-01-02+at+1.14.31+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://www.mozilla.org/en-US/collusion/&quot; target=&quot;_blank&quot;&gt;Mozilla Collusion&lt;/a&gt;&amp;nbsp;視窗呈現所有正在追蹤上網行為的網站與它們之間的關係，每開啟一個網站就會即時更新關係圖，如此我們就能清楚地看到上網背後複雜的追蹤行為：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-sWa_wasE6jM/UOPB0uSG8NI/AAAAAAAAAYI/AmXXnpUgXLw/s1600/Screen+Shot+2013-01-02+at+1.11.57+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;438&quot; src=&quot;http://4.bp.blogspot.com/-sWa_wasE6jM/UOPB0uSG8NI/AAAAAAAAAYI/AmXXnpUgXLw/s640/Screen+Shot+2013-01-02+at+1.11.57+PM.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;上圖是造訪了幾個較知名網站的結果，背後的追蹤網站已經有這麼長長一串。下次造訪一些不知名&amp;nbsp;&lt;strike&gt;論壇&amp;nbsp;&lt;/strike&gt;網站前可得留意背後那些虎視眈眈的眼睛喔！&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2013/01/track-tracker-mozilla-collusion.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-fnmWojf2hsE/UOPCXADbxvI/AAAAAAAAAYQ/JsXWthSO_wo/s72-c/Screen+Shot+2013-01-02+at+1.14.31+PM.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-5340149229020210887</guid><pubDate>Tue, 25 Dec 2012 07:04:00 +0000</pubDate><atom:updated>2012-12-25T16:49:58.552+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">nodejs</category><title>用 NodeJS 祝大家聖誕快樂！</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;正確地說是&amp;nbsp;&lt;a href=&quot;https://npmjs.org/&quot; target=&quot;_blank&quot;&gt;npm&lt;/a&gt;&amp;nbsp;的彩蛋。只要在命令列輸入以下指令就可以打開&amp;nbsp;&lt;a href=&quot;https://npmjs.org/&quot; target=&quot;_blank&quot;&gt;npm&lt;/a&gt;&amp;nbsp;的聖誕樹彩蛋囉！&lt;/div&gt;&lt;pre style=&quot;background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;&quot;&gt;npm xmas&lt;/pre&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-z_DjWAIR7hY/UNlNC1dRP8I/AAAAAAAAAX0/XUNIq1kOq8Y/s1600/Screen+Shot+2012-12-25+at+%E4%B8%8B%E5%8D%882.44.26.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;507&quot; src=&quot;http://2.bp.blogspot.com/-z_DjWAIR7hY/UNlNC1dRP8I/AAAAAAAAAX0/XUNIq1kOq8Y/s640/Screen+Shot+2012-12-25+at+%E4%B8%8B%E5%8D%882.44.26.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;</description><link>http://clayliao.blogspot.com/2012/12/merry-christmas-2012.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-z_DjWAIR7hY/UNlNC1dRP8I/AAAAAAAAAX0/XUNIq1kOq8Y/s72-c/Screen+Shot+2012-12-25+at+%E4%B8%8B%E5%8D%882.44.26.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-8942017610080752582</guid><pubDate>Mon, 17 Dec 2012 06:01:00 +0000</pubDate><atom:updated>2013-06-20T00:45:07.776+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><category domain="http://www.blogger.com/atom/ns#">實用工具</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] 使用 Yeoman 優化 WebApp 開發流程</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;a href=&quot;http://yeoman.io/&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;http://yeoman.io/assets/img/yeoman-logo.png&quot; width=&quot;200&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 是一個很有意思的開源專案，它整合了許多開發者&lt;a href=&quot;https://github.com/yeoman/yeoman/wiki/Tools-Used&quot; target=&quot;_blank&quot;&gt;常用的工具&lt;/a&gt;，包含 &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot; target=&quot;_blank&quot;&gt;Twitter Bootstrap&lt;/a&gt;、&lt;a href=&quot;http://compass-style.org/&quot; target=&quot;_blank&quot;&gt;Compass&lt;/a&gt;、&lt;a href=&quot;https://github.com/Modernizr/Modernizr/&quot; target=&quot;_blank&quot;&gt;Modernizr&lt;/a&gt;、&lt;a href=&quot;http://coffeescript.org/&quot; target=&quot;_blank&quot;&gt;CoffeeScript&lt;/a&gt;、&lt;a href=&quot;http://pivotal.github.com/jasmine/&quot; target=&quot;_blank&quot;&gt;Jasmine&lt;/a&gt;、&lt;a href=&quot;http://phantomjs.org/&quot; target=&quot;_blank&quot;&gt;PhantomJS&lt;/a&gt;、&lt;a href=&quot;http://gruntjs.com/&quot; target=&quot;_blank&quot;&gt;Grunt&lt;/a&gt; 等。使用 &lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 可以一鍵快速啟動新 WebApp 專案，並且讓開發流程變得更加流暢。&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;h3 style=&quot;clear: both;&quot;&gt;安裝 Yeoman&lt;/h3&gt;&lt;div&gt;為了使用上述列出的開發工具，&lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 在安裝步驟會指導開發者安裝這些工具。在命令列執行以下指令，它會列出安裝完成以及尚未安裝的工具，只要依照提示的指令依序安裝即可：&lt;/div&gt;&lt;pre style=&quot;background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Consolas, &amp;#39;Liberation Mono&amp;#39;, Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;&quot;&gt;curl -L get.yeoman.io | bash&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/--PSH1iff-pc/UMnQXSSJFHI/AAAAAAAAAWg/zLyS7U-jUsg/s1600/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.05.03.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;434&quot; src=&quot;http://3.bp.blogspot.com/--PSH1iff-pc/UMnQXSSJFHI/AAAAAAAAAWg/zLyS7U-jUsg/s640/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.05.03.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;安裝完成後，快速瀏覽一下 &lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 的基本指令：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Consolas, &amp;#39;Liberation Mono&amp;#39;, Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;&quot;&gt;yeoman init      &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Initialize and scaffold a new project using generator templates&lt;/span&gt;&lt;br&gt;yeoman build     &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Build an optimized version of your app, ready to deploy&lt;/span&gt;&lt;br&gt;yeoman server    &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Launch a preview server which will begin watching for changes&lt;/span&gt;&lt;br&gt;yeoman &lt;span class=&quot;nb&quot; style=&quot;border: 0px; color: #0086b3; margin: 0px; padding: 0px;&quot;&gt;test&lt;/span&gt;      &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Run a Mocha test harness in a headless PhantomJS&lt;/span&gt;&lt;br&gt;yeoman install   &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Install a package from the client-side package registry&lt;/span&gt;&lt;br&gt;yeoman uninstall &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Uninstall the package&lt;/span&gt;&lt;br&gt;yeoman update    &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Update a package to the latest version&lt;/span&gt;&lt;br&gt;yeoman list      &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# List the packages currently installed&lt;/span&gt;&lt;br&gt;yeoman search    &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Query the registry for matching package names&lt;/span&gt;&lt;br&gt;yeoman lookup    &lt;span class=&quot;c&quot; style=&quot;border: 0px; color: #999988; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;# Look up info on a particular package&lt;/span&gt;&lt;/pre&gt;&lt;h3 style=&quot;clear: both;&quot;&gt;開新專案&lt;/h3&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;在一個空的專案資料夾中，執行以下指令開啟一個全新的 WebApp 專案。過程中 &lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 會問一些像是要不要使用 &lt;a href=&quot;http://compass-style.org/&quot; target=&quot;_blank&quot;&gt;Compass&lt;/a&gt; 或是 &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot; target=&quot;_blank&quot;&gt;Twitter Bootstrap&lt;/a&gt; 之類的問題，請依照個人或專案需求選擇：&lt;/div&gt;&lt;pre style=&quot;background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Consolas, &amp;#39;Liberation Mono&amp;#39;, Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;&quot;&gt;yeoman init&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-BC_Q5ncq1vs/UMnQYPKaAOI/AAAAAAAAAWk/5rkfAcCIHkA/s1600/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.38.57.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;420&quot; src=&quot;http://3.bp.blogspot.com/-BC_Q5ncq1vs/UMnQYPKaAOI/AAAAAAAAAWk/5rkfAcCIHkA/s640/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.38.57.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;過程中可能需要下載一些檔案。專案建立完成後檢視一下目錄結構，跟網站相關的檔案都放在 &lt;b&gt;app&lt;/b&gt; 資料夾下：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-q4J_lIPoVas/UMnQb4l4aVI/AAAAAAAAAW4/mTsJ4rUkxBE/s1600/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.44.14.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;434&quot; src=&quot;http://4.bp.blogspot.com/-q4J_lIPoVas/UMnQb4l4aVI/AAAAAAAAAW4/mTsJ4rUkxBE/s640/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.44.14.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;h3 style=&quot;clear: both;&quot;&gt;檢視成果&lt;/h3&gt;&lt;div&gt;在專案目錄下執行以下指令即可啟動 Server。此外，&lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 還會揪甘心地自動開啟瀏覽器並顯示結果！&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Consolas, &amp;#39;Liberation Mono&amp;#39;, Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;&quot;&gt;yeoman server&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-z7dPRFnbunY/UMnQc7x3X_I/AAAAAAAAAW8/mMUt1xp8Abo/s1600/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.49.20.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;434&quot; src=&quot;http://2.bp.blogspot.com/-z7dPRFnbunY/UMnQc7x3X_I/AAAAAAAAAW8/mMUt1xp8Abo/s640/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.49.20.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-c5cZu2x-NpU/UMnQdpEnlUI/AAAAAAAAAXE/qjq2jvhkTnw/s1600/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.49.51.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;396&quot; src=&quot;http://2.bp.blogspot.com/-c5cZu2x-NpU/UMnQdpEnlUI/AAAAAAAAAXE/qjq2jvhkTnw/s640/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.49.51.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;h3 style=&quot;clear: both;&quot;&gt;體驗 Yeoman 神奇之處&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 內建了許多 Generator、Unit Test 、Package Management 等實用功能。除了整合許多工具外，很多細節上也都看得到 &lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 的用心。&lt;br&gt;舉例來說，使用 &lt;a href=&quot;http://compass-style.org/&quot; target=&quot;_blank&quot;&gt;Compass&lt;/a&gt; 寫 CSS 時，我們需要在編輯器寫 Code 、存檔、編譯 CSS、切換瀏覽器並且重新整理才能看到成果。在 &lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 的世界裡，這一連串的動作都是自動完成的。開發者只要在（下圖右上）編輯器寫 code 並存檔，&lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 會立馬在背景處理編譯等動作（下圖右下），然後就能在瀏覽器裡直接看到結果（下圖左），整個過程如行雲流水般一氣呵成，連[重新整理] (command/ctrl + R) 都省下來了！&lt;br&gt;&lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; 不僅是套實用的 web 開發工具，在使用的過程中，也讓我們深深體會到高手工程師將不必要/重複的動作自動化的好習慣。無論您最終是否選擇使用 &lt;a href=&quot;http://yeoman.io/&quot; target=&quot;_blank&quot;&gt;Yeoman&lt;/a&gt; ，這個觀念依舊是非常值得學習的。&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-F_epC7-Txj0/UMnQeSszKZI/AAAAAAAAAXQ/fjbLeLi0wHg/s1600/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.52.32.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;374&quot; src=&quot;http://1.bp.blogspot.com/-F_epC7-Txj0/UMnQeSszKZI/AAAAAAAAAXQ/fjbLeLi0wHg/s640/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.52.32.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/12/introducion-yeoman.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/12/introducion-yeoman.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/--PSH1iff-pc/UMnQXSSJFHI/AAAAAAAAAWg/zLyS7U-jUsg/s72-c/Screen+Shot+2012-12-13+at+%E4%B8%8B%E5%8D%888.05.03.png" height="72" width="72"/><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-1908239372243843272</guid><pubDate>Mon, 03 Dec 2012 05:37:00 +0000</pubDate><atom:updated>2012-12-03T13:47:25.458+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><category domain="http://www.blogger.com/atom/ns#">實用工具</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] 整合 Sublime Text 2 與 JSLint</title><description>&lt;a href=&quot;http://www.sublimetext.com/2&quot; target=&quot;_blank&quot;&gt;Sublime Text 2&lt;/a&gt; 擁有美觀的介面、正確的 Syntax highlight 功能、便利的搜尋工具以及各式各樣的外掛工具等，是最近上手且非常推薦的一款程式碼編輯器，同時支援 Windows、Mac以及Linux平台。這篇文章是寫給 JavaScript 開發者，介紹如何整合 &lt;a href=&quot;http://www.sublimetext.com/2&quot; target=&quot;_blank&quot;&gt;Sublime Text 2&lt;/a&gt; 編輯器與 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; ，設定完成後每次存檔都會自動執行 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; ，確保開發流程不被中斷且所有的 JavaScript 程式碼都能通過 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; 檢查！&lt;br&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-B0tsxapfR8I/ULtNA_F4EdI/AAAAAAAAAU4/jrYv2ldv_Hs/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.28.38.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;468&quot; src=&quot;http://1.bp.blogspot.com/-B0tsxapfR8I/ULtNA_F4EdI/AAAAAAAAAU4/jrYv2ldv_Hs/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.28.38.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;h3&gt;安裝 Sublime Package Control&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;http://wbond.net/sublime_packages/package_control/installation&quot; target=&quot;_blank&quot;&gt;Sublime Package Control&lt;/a&gt; 方便我們管理各種 Sublime 工具。依照以下步驟安裝&lt;/div&gt;&lt;div&gt;Step 1: 使用快速鍵 Ctrl + ` 開啟 console 介面。&lt;/div&gt;&lt;div&gt;Step 2: 複製以下指令並貼到最下方的命令列中，按下 enter 開始安裝 &lt;a href=&quot;http://wbond.net/sublime_packages/package_control/installation&quot; target=&quot;_blank&quot;&gt;Sublime Package Control&lt;/a&gt;：&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;lang-python&quot;&gt;import urllib2,os; pf=&amp;#39;Package Control.sublime-package&amp;#39;; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),&amp;#39;wb&amp;#39;).write(urllib2.urlopen(&amp;#39;http://sublime.wbond.net/&amp;#39;+pf.replace(&amp;#39; &amp;#39;,&amp;#39;%20&amp;#39;)).read()); print &amp;#39;Please restart Sublime Text to finish installation&amp;#39;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-NZTBlOe8rCI/ULtM-jVL20I/AAAAAAAAAUs/Atq8zTHSzVU/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.25.02.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;451&quot; src=&quot;http://3.bp.blogspot.com/-NZTBlOe8rCI/ULtM-jVL20I/AAAAAAAAAUs/Atq8zTHSzVU/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.25.02.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;看到安裝成功訊息後，重新啟動 &lt;a href=&quot;http://www.sublimetext.com/2&quot; target=&quot;_blank&quot;&gt;Sublime Text 2&lt;/a&gt; 完成安裝程序：&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-nKj0eVFzeVg/ULtM_lHFpgI/AAAAAAAAAU0/9QVypeQ8YsY/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.25.19.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;450&quot; src=&quot;http://3.bp.blogspot.com/-nKj0eVFzeVg/ULtM_lHFpgI/AAAAAAAAAU0/9QVypeQ8YsY/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.25.19.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;h3&gt;整合 JSLint&lt;/h3&gt;&lt;div&gt;接下來我們要使用 Package Control 安裝 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; 工具。在螢幕上方的工具列選擇 &lt;b&gt;[Sublime Text 2] -&amp;gt; [Preferences] -&amp;gt; [Package Control]&lt;/b&gt; ：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-Nn-aH9b8yK8/ULtNBs8OYRI/AAAAAAAAAVA/MoBdyNIwfak/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.29.58.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;436&quot; src=&quot;http://3.bp.blogspot.com/-Nn-aH9b8yK8/ULtNBs8OYRI/AAAAAAAAAVA/MoBdyNIwfak/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.29.58.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;在選單中選擇 &lt;b&gt;[Package Control: Install Package]&lt;/b&gt;：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-4EGPmqHL0r4/ULtNCqNmBlI/AAAAAAAAAVI/oHg2W1xRuYg/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.31.02.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;http://4.bp.blogspot.com/-4EGPmqHL0r4/ULtNCqNmBlI/AAAAAAAAAVI/oHg2W1xRuYg/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.31.02.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;這裡列出了許多可以安裝的 Package，在搜尋框中輸入 &amp;quot;jslint&amp;quot; 並選擇安裝 &lt;b&gt;sublime-jslint&lt;/b&gt; Package：&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-6SY2KR5vOAc/ULtNDAoUTnI/AAAAAAAAAVQ/S8AjOAdvUGM/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.31.41.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;364&quot; src=&quot;http://2.bp.blogspot.com/-6SY2KR5vOAc/ULtNDAoUTnI/AAAAAAAAAVQ/S8AjOAdvUGM/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.31.41.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;開啟新的檔案 &lt;b&gt;test.js&lt;/b&gt; ，這裡故意寫出可執行但不符合 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; 規則的 JavaScript 程式碼，由於已經安裝了 &lt;b&gt;sublime-jslint&lt;/b&gt; ，所以可以使用快速鍵 &lt;b&gt;ctrl + j&lt;/b&gt; 執行 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; 檢查，注意下方的對話框提醒我們&lt;b&gt;程式碼第一行的陣列應該使用 [] 取代 new Array()&lt;/b&gt;！相較於複製程式碼並貼上 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; 網站的傳統作法，這樣是不是方便許多呢？&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-mcCI3-YeGI8/ULtNELiZuGI/AAAAAAAAAVY/9RCcqcl-yE8/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.33.15.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;450&quot; src=&quot;http://1.bp.blogspot.com/-mcCI3-YeGI8/ULtNELiZuGI/AAAAAAAAAVY/9RCcqcl-yE8/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.33.15.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;h3&gt;儲存檔案後自動執行 JSLint&lt;/h3&gt;&lt;div&gt;雖然 &lt;b&gt;ctrl + j&lt;/b&gt; 的方式已經很方便了，不過畢竟還是需要開發者手動操作。這裡我們要使用一個小技巧，只要加上簡單的設定，就能在每次存檔都讓 Sublime Text 2 自動執行 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; !&lt;/div&gt;&lt;br&gt;&lt;div&gt;回到上方的工具列選擇：&lt;b&gt;[Sublime Text 2] -&amp;gt; [Preferences] -&amp;gt; [Package Settings] -&amp;gt; [JSLint] -&amp;gt; [Settings - User]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-oiuIYB7pidY/ULtNFIY38DI/AAAAAAAAAVg/ZNgMwKVbdP8/s1600/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.34.27.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;285&quot; src=&quot;http://2.bp.blogspot.com/-oiuIYB7pidY/ULtNFIY38DI/AAAAAAAAAVg/ZNgMwKVbdP8/s640/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.34.27.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;此時會開啟一個空白檔案 &lt;b&gt;sublime-jslint.sublime-settings&lt;/b&gt;，複製並貼上下方設定範例，其中 &amp;quot;jslint_options&amp;quot; 可依照個人習慣與專案需求更改：&lt;/div&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;lang-js&quot;&gt;{&lt;br&gt;    // jslint 參數&lt;br&gt;    &amp;quot;jslint_options&amp;quot;: &amp;quot;--browser --node --indent 4 --predef YUI&amp;quot;,&lt;br&gt;&lt;br&gt;    // 每次存檔時自動執行 jslint&lt;br&gt;    &amp;quot;run_on_save&amp;quot;: true,&lt;br&gt;&lt;br&gt;    // debug flag.&lt;br&gt;    &amp;quot;debug&amp;quot;: true&lt;br&gt;}&lt;/code&gt;&lt;br&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;完成後的檔案如下圖，以後每次撰寫 JavaScript 存檔時，編輯器都會自動執行並時時提醒我們通過 &lt;a href=&quot;http://www.jslint.com/&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; 檢查，如此一來就能避免許多不良的 JavaScript 語法，程式碼的品質也會大幅提高喔！&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-mI9gz8JM_ss/ULwcPkWTfNI/AAAAAAAAAWA/JxqpYMbXq4U/s1600/Screen+Shot+2012-12-03+at+11.27.19+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;226&quot; src=&quot;http://2.bp.blogspot.com/-mI9gz8JM_ss/ULwcPkWTfNI/AAAAAAAAAWA/JxqpYMbXq4U/s640/Screen+Shot+2012-12-03+at+11.27.19+AM.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/12/integrate-jslint-with-sublime-text-2.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/12/integrate-jslint-with-sublime-text-2.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-B0tsxapfR8I/ULtNA_F4EdI/AAAAAAAAAU4/jrYv2ldv_Hs/s72-c/Screen+Shot+2012-12-02+at+%E4%B8%8B%E5%8D%888.28.38.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-4682179810688942825</guid><pubDate>Wed, 07 Nov 2012 02:45:00 +0000</pubDate><atom:updated>2012-11-08T09:43:58.182+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><category domain="http://www.blogger.com/atom/ns#">YUI</category><category domain="http://www.blogger.com/atom/ns#">YUI 學習筆記</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] YUI 學習筆記 - 將 jQuery 變成 YUI 模組</title><description>儘管 YUI 提供了許多&lt;a href=&quot;http://yuilibrary.com/yui/docs/guides/&quot; target=&quot;_blank&quot;&gt;官方&lt;/a&gt;與&lt;a href=&quot;http://yuilibrary.com/gallery/&quot; target=&quot;_blank&quot;&gt;社群貢獻&lt;/a&gt;的模組，但難免無法涵蓋所有專案的需求。這裡我們要試著在以 YUI 的專案裡引用 jQuery UI 裡的日曆模組作為範例，讓 YUI 與其他函式庫並存在同一個專案中。這個方法不限於 jQuery ，您可以使用相同的方法引用各種 JavaScript 程式碼。&lt;br&gt;&lt;br&gt;&lt;h3&gt;直覺但不建議的作法&lt;/h3&gt;&lt;div&gt;jQuery UI 模組基本由三個部分組成：jQuery 核心 JavaScript、jQuery UI JavaScript 以及該特定模組的 CSS 樣式，直覺上多數開發者會使用 &amp;lt;script&amp;gt; 以及 &amp;lt;link&amp;gt; 直接引用這些檔案。雖然這樣也能正常運作，但是卻無法用到 YUI 的模組管理功能。在這個使用情境下，我們其實還能做得更好。&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Q1e1KdU0lAk/UJm_yAfuxrI/AAAAAAAAAUY/JALJcW2o47E/s1600/Screen+Shot+2012-11-06+at+5.55.53+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;114&quot; src=&quot;http://1.bp.blogspot.com/-Q1e1KdU0lAk/UJm_yAfuxrI/AAAAAAAAAUY/JALJcW2o47E/s640/Screen+Shot+2012-11-06+at+5.55.53+PM.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;h3&gt;&lt;/h3&gt;&lt;h3&gt;使用 YUI Loader 管理模組&lt;/h3&gt;&lt;div&gt;&lt;a href=&quot;http://yuilibrary.com/yui/docs/yui/loader.html&quot; target=&quot;_blank&quot;&gt;YUI Loader&lt;/a&gt; 不僅能用來管理 YUI 自己的模組，也能靠著簡單的設定將 jQuery （或任何 JavaScript）變成 YUI 模組來使用，其設定檔的寫法如下：&lt;/div&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;lang-js&quot;&gt;YUI({&lt;br&gt;    module: {&lt;br&gt;        // 在這裡設定模組名稱、檔案路徑與相依關係&lt;br&gt;        ...&lt;br&gt;    }&lt;br&gt;}).use(&amp;quot;模組名稱&amp;quot;, function (Y) {&lt;br&gt;    // 相依的模組都已經準備就緒&lt;br&gt;    // code here&lt;br&gt;});&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;在這個範例中，我們要提供的設定有 &lt;span style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;jquery&lt;/b&gt;&lt;/span&gt;、&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;jquery-ui&lt;/span&gt;&lt;/b&gt; 與 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;jquery-ui-css&lt;/span&gt;&lt;/b&gt; 三個模組，並且分別指定檔案路徑與相依關係（jQuery UI 模組需要 jQuery 以及 CSS 才能正常使用）：&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-Fdkggijl6d8/UJKH5m7wacI/AAAAAAAAAUE/0tS0zLg8md4/s1600/Screen+Shot+2012-11-01+at+7.31.43+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;351&quot; src=&quot;http://4.bp.blogspot.com/-Fdkggijl6d8/UJKH5m7wacI/AAAAAAAAAUE/0tS0zLg8md4/s640/Screen+Shot+2012-11-01+at+7.31.43+AM.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;在網頁的任何地方使用 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;YUI().use(&amp;quot;jquery-ui&amp;quot;)&lt;/span&gt;&lt;/b&gt; ，此時 YUI Loader 就會自動去下載 jquery-ui 以及相依的 jquery + jquery-ui-css 兩個模組，開發者不需要自己維護，甚至不需要考慮引用 JavaScript 檔案的前後順序，就像... YUI 原生的模組一樣！同時 jQuery 的程式碼也能無痛轉移，所有的程式碼都能正常地執行。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;h3&gt;進階群組設定&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;如果這些模組檔案都是在相同 domain 下的話，還可以更進一步使用 group 將它們群組起來方便管理。下一個範例在 YUI 的基礎上同時使用 YUI 以及 jQuery 的日曆模組，我們可以清楚地比較兩者之間的差異。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;完成後的範例（點選右上方的導航列可以看到每個部分的程式碼與執行結果）：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; src=&quot;http://jsfiddle.net/aQJG6/1/embedded/&quot; style=&quot;height: 650px; width: 100%;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/11/load-jquery-as-yui-module.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/11/load-jquery-as-yui-module.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-Q1e1KdU0lAk/UJm_yAfuxrI/AAAAAAAAAUY/JALJcW2o47E/s72-c/Screen+Shot+2012-11-06+at+5.55.53+PM.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-7920668424102279533</guid><pubDate>Mon, 15 Oct 2012 06:26:00 +0000</pubDate><atom:updated>2013-01-16T00:28:43.161+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>認識 TypeScript</title><description>&lt;div&gt;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;是微軟近期推出的&lt;a href=&quot;http://typescript.codeplex.com/SourceControl/changeset/view/fe3bc0bfce1f&quot; target=&quot;_blank&quot;&gt;開放原始碼專案&lt;/a&gt;，其專案負責人是 C#, TurboPascal 之父 &lt;a href=&quot;http://en.wikipedia.org/wiki/Anders_Hejlsberg&quot; target=&quot;_blank&quot;&gt;Anders Hejlsberg&lt;/a&gt;。&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;的主要目的是利用編譯的方式加強 JavaScript 不足的部份，幫助（有其他語言基礎的）開發者更容易撰寫 JavaScript。&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;TypeScript 的特色&lt;/h3&gt;&lt;div&gt;Compile JavaScript 以降低開發門檻並非&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;新創的觀念，概念上相似且較知名的專案還有&amp;nbsp;&lt;a href=&quot;http://coffeescript.org/&quot; target=&quot;_blank&quot;&gt;CoffeeScript&lt;/a&gt;&amp;nbsp;以及&amp;nbsp;&lt;a href=&quot;https://developers.google.com/web-toolkit/&quot; target=&quot;_blank&quot;&gt;Google Web Toolkit&lt;/a&gt;（GWT）&amp;nbsp;等。看過&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;的範例後，我認為與其他專案相較之下，&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;的特點有：&lt;/div&gt;&lt;ol&gt;&lt;li&gt;不需要學習新的語法，且完全相容於原生 JavaScript。&lt;/li&gt;&lt;li&gt;為 JavaScript 加入強型別的編譯期檢查與 &quot;class&quot; 物件導向語法。&lt;/li&gt;&lt;li&gt;可以編譯出可讀性高的 JavaScript 程式碼。&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;的設計哲學看來挺不錯的（特別是前兩點），接下來我們試著使用實際的範例來理解它。&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;動手玩 TypeScript&lt;/h3&gt;&lt;h4&gt;安裝 TypeScript&lt;/h4&gt;&lt;div&gt;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;承襲微軟容易安裝的產品特性。我們可以&lt;a href=&quot;http://www.microsoft.com/en-us/download/details.aspx?id=34790&quot; target=&quot;_blank&quot;&gt;使用 Visual Studio 2012 整合 TypeScript&lt;/a&gt;，或是使用 npm 安裝&amp;nbsp;&lt;a href=&quot;http://nodejs.org/&quot; target=&quot;_blank&quot;&gt;Node.js&lt;/a&gt;&amp;nbsp;版的&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;套件： &lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;lang-html&quot;&gt;$ npm install typescript -g&lt;/code&gt;    &lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4&gt;100% 相容 JavaScript 語法&lt;/h4&gt;&lt;div&gt;TypeScript 檔案的附檔名為 &lt;span style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;.ts&lt;/b&gt;&lt;/span&gt;，首先我們建立一個新檔案 &lt;span style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;greeter.ts&lt;/b&gt;&lt;/span&gt; 並填入以下 JavaScript 程式碼。 &lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-NBtR4nCFAXg/UHrPnsQwVZI/AAAAAAAAASQ/EUnN5KiaKGg/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8810.43.03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-NBtR4nCFAXg/UHrPnsQwVZI/AAAAAAAAASQ/EUnN5KiaKGg/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8810.43.03.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;使用命令列編譯 &lt;span style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;greeter.ts&lt;/b&gt;&lt;/span&gt;，編譯後產生新檔案 &lt;span style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;greeter.js&lt;/b&gt;&lt;/span&gt;（附檔名不同）:&lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;lang-html&quot;&gt;$ tsc greeter.ts&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;a href=&quot;http://www.typescriptlang.org/Playground/#ex2&quot;&gt;比較編譯前後的檔案&lt;/a&gt;。您沒看錯，兩個檔案內容確實是&lt;u&gt;一模一樣&lt;/u&gt;。&lt;br /&gt;&lt;br /&gt;這個範例貌似無聊，實際上卻非常重要。這意味著&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;能&quot;向下相容&quot;於現有以 JavaScript 撰寫的專案（不需要改寫就能移植到&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;！&amp;nbsp;），開發者也能延續既有的經驗，繼續使用 YUI、jQuery 等 Library。&lt;br /&gt;此外，相較於 CoffeeScript （自定語法）、GWT（ Java）經由編譯器輸出 JavaScript 的設計，我比較偏好 TypeScript 相容原生 JavaScript 的語法設計。主要原因是，當 JavaScript 愈來愈重要，開發者就更應該掌握實作細節，而非規避語法將它交給編譯器處理。若是 GWT 的編譯錯誤產生了 bug，或是需要進階調整 JavaScript 效能時，依賴編譯器的開發者除了立下宏願追編譯器原始碼找出根本原因，否則就真的束手無策了。&lt;/div&gt;&lt;h4&gt;加強 JavaScript - 靜態型別&lt;/h4&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;多數 Script 語言的型別錯誤只能在執行期被發現，JavaScript 也不例外。不過，在&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;的強化下，JavaScript 也加入了&lt;b&gt;靜態型別（static typing）&lt;/b&gt;語法，讓 JavaScript 也能像 Java 一樣，在編譯期檢查型別了！&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;以下範例的 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;Greeter()&lt;/span&gt;&lt;/b&gt;&amp;nbsp;函式只接受字串作為參數，這時候我們故意傳入錯誤的型別（陣列物件），看看&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;會如何反應：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-mlc_Elk34FI/UHrbgv8WZMI/AAAAAAAAATU/mqZ0mx0Axb4/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.31.23.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-mlc_Elk34FI/UHrbgv8WZMI/AAAAAAAAATU/mqZ0mx0Axb4/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.31.23.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;沒有意外地，&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;很正確地在編譯期間發現了型別錯誤並提示錯誤訊息：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-vfn1dvbX7s4/UHrbhWK3O7I/AAAAAAAAATc/FFvLeNNxi8E/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.33.03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-vfn1dvbX7s4/UHrbhWK3O7I/AAAAAAAAATc/FFvLeNNxi8E/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.33.03.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;回頭檢查輸出的結果，&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;編譯完成的程式碼彷彿出自 JavaScript 行家的手筆，可讀性非常高：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-8EssoA_IGkI/UHrYxSKCIcI/AAAAAAAAATA/t7PxLa7uNx4/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.22.15.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;217&quot; src=&quot;http://1.bp.blogspot.com/-8EssoA_IGkI/UHrYxSKCIcI/AAAAAAAAATA/t7PxLa7uNx4/s640/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.22.15.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h4&gt;加強 JavaScript -&amp;nbsp;Classes 物件導向&lt;/h4&gt;&lt;div&gt;JavaScript 也是物件導向語言（使用 Prototype 而非 Class），不過很少人會寫。&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;實作了尚未拍板定案&amp;nbsp;&lt;a href=&quot;http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes&quot; target=&quot;_blank&quot;&gt;ECMAScript 6&lt;/a&gt;，使得開發者能夠使用&amp;nbsp;&lt;strike&gt;順眼&lt;/strike&gt;&amp;nbsp;習慣的 Class 語法在 JavaScript 設計物件（下圖左）。下圖右則是經由&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;編譯後，正港的 JavaScript 物件導向寫法：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-m1anbZ63ELE/UHrYwoQvEKI/AAAAAAAAAS4/0wqmY5Ff7oI/s1600/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.21.59.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;220&quot; src=&quot;http://4.bp.blogspot.com/-m1anbZ63ELE/UHrYwoQvEKI/AAAAAAAAAS4/0wqmY5Ff7oI/s640/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8811.21.59.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h3&gt;小結&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;總體來說&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;確實是非常令人期待的專案。我非常喜歡&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;在語法上相容 JavaScript 的設計概念。它不新創自己的一套語法，而是加強 JavaScript 不足的部份，並幫助更多開發者學習/使用 JavaScript。值得注意的是，尚未定案的&amp;nbsp;&lt;a href=&quot;http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes&quot; target=&quot;_blank&quot;&gt;ECMAScript 6&lt;/a&gt;&amp;nbsp;經過多年反覆修改後，我們不能確定&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;的相容程度是否會因為某種程度的妥協導致大打折扣，且&amp;nbsp;&lt;a href=&quot;http://www.typescriptlang.org/&quot; target=&quot;_blank&quot;&gt;TypeScript&lt;/a&gt;&amp;nbsp;目前為預覽版，在正式版本推出前暫時不建議使用在正式專案中&amp;nbsp;。&lt;/div&gt;&lt;h3&gt;Reference&lt;/h3&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/b/ericsk/archive/2012/10/02/quick-look-on-typescript.aspx&quot; target=&quot;_blank&quot;&gt;快速瞭解 TypeScript 是什麼東西&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/b/somasegar/archive/2012/10/01/typescript-javascript-development-at-application-scale.aspx&quot; target=&quot;_blank&quot;&gt;TypeScript: JavaScript Development at Application Scale&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.nczonline.net/blog/2012/10/04/thoughts-on-typescript/&quot; target=&quot;_blank&quot;&gt;Thoughts on TypeScript&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS&quot; target=&quot;_blank&quot;&gt;List of languages that compile to JS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://blogs.msdn.com/b/interoperability/archive/2012/10/01/sublime-text-vi-emacs-typescript-enabled.aspx&quot; target=&quot;_blank&quot;&gt;Sublime Text, Vi, Emacs: TypeScript enabled!&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/WillHuangTW/typescript-html5-websocket&quot; target=&quot;_blank&quot;&gt;TypeScript 開發實戰：開發即時互動的 html5 websocket 聊天室應用程式&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2012/10/introduce-typescript.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-NBtR4nCFAXg/UHrPnsQwVZI/AAAAAAAAASQ/EUnN5KiaKGg/s72-c/Screen+Shot+2012-10-14+at+%E4%B8%8B%E5%8D%8810.43.03.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-1830764074521350371</guid><pubDate>Wed, 22 Aug 2012 14:45:00 +0000</pubDate><atom:updated>2013-06-23T11:06:08.965+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tech Talk</category><category domain="http://www.blogger.com/atom/ns#">Yahoo</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>Yahoo! 釀的酒 - 淺嚐 Cocktails @ 北京 HTML5 開發者論壇 </title><description>&lt;div class=&quot;separator&quot;&gt;繼去年參加&lt;a href=&quot;http://clayliao.blogspot.com/2011/07/yuitest-in-d2forum.html&quot; target=&quot;_blank&quot;&gt;淘寶主辦的D2前端技術論壇&lt;/a&gt;分享前端測試，今年很榮幸地再度到 &lt;a href=&quot;http://2012.html5dw.com/conf.html&quot; target=&quot;_blank&quot;&gt;HTML5 開發者論壇&lt;/a&gt;介紹 Yahoo! 的新一代 &lt;a href=&quot;http://developer.yahoo.com/cocktails/&quot; target=&quot;_blank&quot;&gt;Cocktails&lt;/a&gt; 技術。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2012.html5dw.com/conf.html&quot; target=&quot;_blank&quot;&gt;HTML5 開發者論壇&lt;/a&gt;是北京前端開發者的年度盛會，贊助商一字排開幾乎涵蓋了大陸所有主流的互聯網公司，與會的開發者超過一千人！上午的主題峰會由 Google、Opera、微軟、百度等公司分享其在 HTML5 領域的努力成果，現場人山人海，非常熱鬧。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/--tvPF4y-G_c/UDMxCIuRUGI/AAAAAAAAARs/4jUB5s41mRI/s1600/a1ff037fjw1dw374fv3o4j.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;426&quot; src=&quot;http://4.bp.blogspot.com/--tvPF4y-G_c/UDMxCIuRUGI/AAAAAAAAARs/4jUB5s41mRI/s640/a1ff037fjw1dw374fv3o4j.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;下午場次則分成&lt;a href=&quot;http://2012.html5dw.com/conf_explorer.html&quot; target=&quot;_blank&quot;&gt;瀏覽器&lt;/a&gt;、&lt;a href=&quot;http://2012.html5dw.com/conf_tv.html&quot; target=&quot;_blank&quot;&gt;TV&lt;/a&gt;、&lt;a href=&quot;http://2012.html5dw.com/conf_pays.html&quot; target=&quot;_blank&quot;&gt;安全與支付&lt;/a&gt;、&lt;a href=&quot;http://2012.html5dw.com/conf_connect.html&quot; target=&quot;_blank&quot;&gt;渠道與合作&lt;/a&gt;、&lt;a href=&quot;http://2012.html5dw.com/conf_develop.html&quot; target=&quot;_blank&quot;&gt;工具與應用&lt;/a&gt;等五大專場。我的場次在&lt;a href=&quot;http://2012.html5dw.com/conf_develop.html&quot; target=&quot;_blank&quot;&gt;工具與應用&lt;/a&gt;專場，分享《&lt;a href=&quot;http://www.slideshare.net/clayliao/yahoo-cocktails&quot; target=&quot;_blank&quot;&gt;Yahoo! 釀的酒 - 淺嚐 Cocktails&lt;/a&gt;》，內容著重在今年(2012)四月開放原始碼的 Node.js Framework-&amp;nbsp;&lt;a href=&quot;http://developer.yahoo.com/cocktails/mojito/&quot; target=&quot;_blank&quot;&gt;Mojito&lt;/a&gt;。演講投影片已上傳並空開，歡迎有興趣的同學參考：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-dXylBOH0kvE/UDMw7LzbjAI/AAAAAAAAARk/JHqgvcCNdzU/s1600/67fd8527jw1dw0z2ytrmqj.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;http://1.bp.blogspot.com/-dXylBOH0kvE/UDMw7LzbjAI/AAAAAAAAARk/JHqgvcCNdzU/s640/67fd8527jw1dw0z2ytrmqj.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot;&gt;&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;486&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://www.slideshare.net/slideshow/embed_code/14016593&quot; style=&quot;border-width: 1px 1px 0; border: 1px solid #CCC; margin-bottom: 5px;&quot; width=&quot;597&quot;&gt; &lt;/iframe&gt; &lt;/div&gt;&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;&lt;strong&gt; &lt;a href=&quot;http://www.slideshare.net/clayliao/yahoo-cocktails&quot; target=&quot;_blank&quot; title=&quot;Yahoo! 釀的酒 - 淺嚐 Cocktails&quot;&gt;Yahoo! 釀的酒 - 淺嚐 Cocktails&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/clayliao&quot; target=&quot;_blank&quot;&gt;Ying-Hsiang Liao&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;embed align=&quot;middle&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;sameDomain&quot; height=&quot;400&quot; quality=&quot;high&quot; src=&quot;http://player.youku.com/player.php/sid/XNDQyNDU1Mzk2/v.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;480&quot;&gt;&lt;/embed&gt;&lt;/div&gt;&lt;h3&gt;相關文章&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://jiongks.name/blog/html5dw-2012/&quot; target=&quot;_blank&quot;&gt;HTML5峰會歸來&lt;/a&gt;&lt;/li&gt;&lt;li&gt;新浪微博討論：&lt;a href=&quot;http://s.weibo.com/weibo/HTML5%E5%9C%A8%E8%B7%AF%E4%B8%8A&quot; target=&quot;_blank&quot;&gt;#HTML5在路上#&lt;/a&gt; &lt;a href=&quot;http://s.weibo.com/weibo/html5%E5%B3%B0%E4%BC%9A&quot; target=&quot;_blank&quot;&gt;#HTML5峰會#&lt;/a&gt;&lt;/li&gt;&lt;li&gt;優酷視頻：&amp;nbsp;&lt;a href=&quot;http://v.youku.com/v_show/id_XNDQyNDU1Mzk2.html&quot;&gt;http://v.youku.com/v_show/id_XNDQyNDU1Mzk2.html&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;</description><link>http://clayliao.blogspot.com/2012/08/yahoo-cocktails-html5.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/--tvPF4y-G_c/UDMxCIuRUGI/AAAAAAAAARs/4jUB5s41mRI/s72-c/a1ff037fjw1dw374fv3o4j.jpg" height="72" width="72"/><thr:total>2</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-7190402551441446248</guid><pubDate>Thu, 09 Aug 2012 13:08:00 +0000</pubDate><atom:updated>2012-08-09T21:12:52.765+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">YUI</category><category domain="http://www.blogger.com/atom/ns#">作品集</category><title>YUI Masonry - 快速打造 Pinterest 流布局</title><description>&lt;div class=&quot;separator&quot;&gt;自從&amp;nbsp;&lt;a href=&quot;http://pinterest.com/&quot; target=&quot;_blank&quot;&gt;Pinterest&lt;/a&gt;&amp;nbsp;成為近期內熱門的網站後，其強烈視覺風格的瀑布流版型在短時間內成為眾網站仿效的對象。不久前實作 &lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;Shopping+ 購物搜尋&lt;/a&gt;時意外發現 YUI 竟然沒有對應的外掛可以使用，於是便興起了打造&amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://yui-masonry.appspot.com/&quot; target=&quot;_blank&quot;&gt;YUI Masonry&lt;/a&gt;&amp;nbsp; 並&lt;a href=&quot;http://clayliao.blogspot.com/2012/07/how-to-be-yui-contributor.html&quot; target=&quot;_blank&quot;&gt;開源貢獻給社群&lt;/a&gt;的念頭。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;b&gt;專案名稱：YUI Masonry&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/&quot;&gt;http://yui-masonry.appspot.com/&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yuilibrary.com/gallery/show/masonry&quot;&gt;http://yuilibrary.com/gallery/show/masonry&lt;/a&gt;&lt;span id=&quot;goog_127599674&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_127599675&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://draft.blogger.com/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;快速上手&lt;/h3&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/&quot; target=&quot;_blank&quot;&gt;YUI Masonry&lt;/a&gt;&amp;nbsp;的使用方法很容易，只要短短幾行程式碼即可創造出類似 &lt;a href=&quot;http://pinterest.com/&quot; target=&quot;_blank&quot;&gt;Pinterest&lt;/a&gt;&amp;nbsp;的瀑布流佈局效果：&lt;br /&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;code class=&quot;lang-html&quot;&gt;&lt;br /&gt;&amp;lt;!--Include YUI seed on your page.--&amp;gt;&lt;br /&gt;&amp;lt;script src=&quot;http://yui.yahooapis.com/3.6.0/build/yui/yui-min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;YUI().use(&#39;gallery-masonry&#39;, function (Y) {&lt;br /&gt;    var masonry = new Y.Masonry({&lt;br /&gt;        node: &#39;#container&#39;,&lt;br /&gt;        itemSelector: &#39;.item&#39;&lt;br /&gt;    });&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;    &lt;br /&gt;&lt;/pre&gt;&lt;h3&gt;線上文件&lt;/h3&gt;在 &lt;a href=&quot;http://yui-masonry.appspot.com/&quot; target=&quot;_blank&quot;&gt;YUI Masonry&lt;/a&gt; 官方網站可以找到更多進階的用法與範例程式碼：&lt;br /&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;415&quot; src=&quot;http://1.bp.blogspot.com/-aY5dKPoNv2U/UCB3bSYS1xI/AAAAAAAAAQ8/VSzpL-6TZlY/s640/2012-08-06_184250.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/doc/tutorial.html&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;412&quot; src=&quot;http://4.bp.blogspot.com/-ARXgkCKc6Ro/UCB3b_CAMLI/AAAAAAAAARE/LGxASI6d9JA/s640/2012-08-06_184330.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/&quot; target=&quot;_blank&quot;&gt;YUI Masonry&lt;/a&gt; 使用&amp;nbsp;&lt;a href=&quot;http://yui.github.com/yuidoc/&quot; target=&quot;_blank&quot;&gt;YUIDoc&lt;/a&gt;&amp;nbsp;建立的&amp;nbsp;API 文件，方便開發者查詢 Masonry 物件裡的屬性與方法：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/yuidoc/index.html&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;419&quot; src=&quot;http://2.bp.blogspot.com/-Z6rJYpUwd2c/UCB3cCcubWI/AAAAAAAAARM/Q-vnq6GkfQo/s640/2012-08-07_093129.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;Open Source on YUI Gallery&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/&quot; target=&quot;_blank&quot;&gt;YUI Masonry&lt;/a&gt; 的原始碼是公開的，您可以在 &lt;a href=&quot;https://github.com/clayliao/yui3-gallery/tree/master/build/gallery-masonry&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt; 上找到原始碼。此外，&lt;a href=&quot;http://yui-masonry.appspot.com/&quot; target=&quot;_blank&quot;&gt;YUI Masonry&lt;/a&gt; 也貢獻給了 &lt;a href=&quot;http://yuilibrary.com/gallery/show/masonry&quot; target=&quot;_blank&quot;&gt;YUI Gallery&lt;/a&gt; 社群，所有的檔案都 Host 在 Yahoo! 的 CDN 服務上，開發者完全不需要自行 Host，也不需要擔心網路效能問題：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://yuilibrary.com/gallery/show/masonry&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;494&quot; src=&quot;http://3.bp.blogspot.com/-wA45-nFsXNM/UCB3a25f-gI/AAAAAAAAAQ0/IMBTJT1f7iI/s640/2012-08-06_184216.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt;Reference&lt;/h3&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://yui-masonry.appspot.com/&quot; target=&quot;_blank&quot;&gt;YUI Masonry 官方網站&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://yuilibrary.com/gallery/show/masonry&quot; target=&quot;_blank&quot;&gt;YUI Masonry on Gallery&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://yuilibrary.com/gallery/show/imagesloaded&quot; target=&quot;_blank&quot;&gt;ImagesLoaded on Gallery&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://masonry.desandro.com/&quot; target=&quot;_blank&quot;&gt;jQuey Masonry&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2012/08/yui-masonry.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-aY5dKPoNv2U/UCB3bSYS1xI/AAAAAAAAAQ8/VSzpL-6TZlY/s72-c/2012-08-06_184250.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-7843877459492973654</guid><pubDate>Tue, 31 Jul 2012 03:51:00 +0000</pubDate><atom:updated>2012-08-01T09:47:08.990+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">YUI</category><category domain="http://www.blogger.com/atom/ns#">YUI 學習筆記</category><title>[教學] YUI 學習筆記 - 成為 YUI Contributor</title><description>&lt;div class=&quot;separator&quot;&gt;除了 &lt;a href=&quot;http://yuilibrary.com/&quot; target=&quot;_blank&quot;&gt;YUI&lt;/a&gt; 核心團隊提供的功能外， &lt;a href=&quot;http://yuilibrary.com/&quot; target=&quot;_blank&quot;&gt;YUI&lt;/a&gt; 也非常歡迎社群貢獻程式碼與模組。開發者可以在 &lt;a href=&quot;http://yuilibrary.com/gallery/&quot; target=&quot;_blank&quot;&gt;YUI Gallery&lt;/a&gt; 找到各式各樣的模組，並且這些模組都是 host 在 Yahoo! 的 CDN 上，效能掛保證的喔!&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt;準備工作&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;：&lt;a href=&quot;http://yuilibrary.com/&quot; target=&quot;_blank&quot;&gt;YUI&lt;/a&gt; 以及 &lt;a href=&quot;http://yuilibrary.com/gallery/&quot; target=&quot;_blank&quot;&gt;YUI Gallery&lt;/a&gt; 都將原始碼公開在 &lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt; 平台上，首先必須要申請帳號並&lt;a href=&quot;https://help.github.com/articles/set-up-git&quot; target=&quot;_blank&quot;&gt;安裝設置好 Git 環境&lt;/a&gt;。更多 Git 操作方式詳見底下的 Reference。 &lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://yuilibrary.com/projects/builder/&quot; target=&quot;_blank&quot;&gt;YUI Builder&lt;/a&gt;：完成的 JavaScript 原始碼必須使用 &lt;a href=&quot;http://yuilibrary.com/projects/builder/&quot; target=&quot;_blank&quot;&gt;YUI Builder&lt;/a&gt; 編譯成統一格式的 YUI 模組。&lt;a href=&quot;http://yuilibrary.com/projects/builder/&quot; target=&quot;_blank&quot;&gt;YUI Builder&lt;/a&gt; 需要 &lt;a href=&quot;http://ant.apache.org/&quot; target=&quot;_blank&quot;&gt;Ant&lt;/a&gt; 以及 Java 環境(&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/index.html&quot; target=&quot;_blank&quot;&gt;JDK&lt;/a&gt; 或至少需要 &lt;a href=&quot;http://www.java.com/zh_TW/download/&quot; target=&quot;_blank&quot;&gt;JRE&lt;/a&gt;)才能運行。&lt;/li&gt;&lt;/ol&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt;簽署 YUI CLA&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;為了確保程式碼不會在日後因侵權或其他法律原因被下架，Contributor 在貢獻原始碼前必須簽署 &lt;a href=&quot;http://yuilibrary.com/contribute/cla/&quot; target=&quot;_blank&quot;&gt;YUI CLA&lt;/a&gt;，以確保該模組是由作者或是足以代表專案的人上傳的。&lt;a href=&quot;http://yuilibrary.com/contribute/cla/&quot; target=&quot;_blank&quot;&gt;YUI CLA&lt;/a&gt; 以前必須傳真簽名同意書，現在只要線上作業即可完成：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-mlpUznxV3kA/UBdDVF0BSII/AAAAAAAAAOg/hl4JzYvWb5I/s1600/2012-07-31_102925.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;580&quot; src=&quot;http://1.bp.blogspot.com/-mlpUznxV3kA/UBdDVF0BSII/AAAAAAAAAOg/hl4JzYvWb5I/s640/2012-07-31_102925.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt;提交程式碼&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;YUI 採用 Git 做版本控制，首先我們先 fork 一份完整的 &lt;a href=&quot;https://github.com/yui/yui3-gallery&quot; target=&quot;_blank&quot;&gt;yui3-gallery&lt;/a&gt; 專案到自己的目錄下：&lt;br&gt;&lt;a href=&quot;https://github.com/yui/yui3-gallery&quot;&gt;https://github.com/yui/yui3-gallery&lt;/a&gt;&lt;br&gt;&lt;br&gt;注意左上角的目錄名稱是 &lt;span id=&quot;goog_1717477784&quot;&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;yui / yui3-gallery&lt;/span&gt;&lt;/b&gt;，代表我們在專案的主目錄裡，點選右上方的 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;[Fork]&lt;/span&gt;&lt;/b&gt; 按鈕：&lt;span id=&quot;goog_1717477785&quot;&gt;&lt;/span&gt;&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-fMFKAT3CfOU/UBdJKt2PocI/AAAAAAAAAPA/ydpZD5KokQU/s1600/2012-07-31_105310.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;177&quot; src=&quot;http://3.bp.blogspot.com/-fMFKAT3CfOU/UBdJKt2PocI/AAAAAAAAAPA/ydpZD5KokQU/s640/2012-07-31_105310.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;回到自己的目錄中，我們發現自己的目錄下已經複製了一份 yui3-gallery。日後我們只要在自己的專案目錄下工作即可：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-Yy83lcyhrxc/UBdJbpFIm4I/AAAAAAAAAPI/W4QSlZofs_I/s1600/2012-07-31_105514.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;438&quot; src=&quot;http://2.bp.blogspot.com/-Yy83lcyhrxc/UBdJbpFIm4I/AAAAAAAAAPI/W4QSlZofs_I/s640/2012-07-31_105514.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;h3&gt;開啟新的專案&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;註冊成為 &lt;a href=&quot;http://yuilibrary.com/gallery/&quot; target=&quot;_blank&quot;&gt;YUI Gallery&lt;/a&gt; 會員後，我們可以在左側導行列中找到&lt;b&gt;新增模組&lt;/b&gt;連結。填寫模組的描述與範例程式碼後儲存，即可送交 YUI Team 審核。如果沒有意外的話，根據經驗隔天(時差因素，YUI Team 在美西時區上班)都會收到核准通知。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-JBi0kq3V7Go/UBdFZx1ptiI/AAAAAAAAAOo/u-S84UvEYrg/s1600/2012-07-31_103917.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;532&quot; src=&quot;http://1.bp.blogspot.com/-JBi0kq3V7Go/UBdFZx1ptiI/AAAAAAAAAOo/u-S84UvEYrg/s640/2012-07-31_103917.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;專案開好後，點選上方的 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;[Show Setup Info]&lt;/span&gt;&lt;/b&gt; 繼續接下來的步驟：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-EVDp4tPoXGA/UBdMywReHyI/AAAAAAAAAPY/7Ykx5nv-HfM/s1600/2012-07-31_110937.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; src=&quot;http://2.bp.blogspot.com/-EVDp4tPoXGA/UBdMywReHyI/AAAAAAAAAPY/7Ykx5nv-HfM/s640/2012-07-31_110937.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;這份 Setup Info 是依據健立專案實填的資訊產生的，也就是說，只要在 console 複製貼上指令就可以建立該有的 Git local 目錄並 Build 出所有的檔案囉！&lt;br&gt;&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-93SGLKhdBTQ/UBdRd-bHEBI/AAAAAAAAAQE/jlxgIoWUwZw/s1600/2012-07-31_113043.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;530&quot; src=&quot;http://3.bp.blogspot.com/-93SGLKhdBTQ/UBdRd-bHEBI/AAAAAAAAAQE/jlxgIoWUwZw/s640/2012-07-31_113043.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;經過 YUI Builder 產生的檔案結果如下，有原始碼、debug ，也有壓縮過的檔案：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-DRXO7Rk5VzY/UBdQ8XIBHwI/AAAAAAAAAP8/DztbN_efCWA/s1600/2012-07-31_112823.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;http://4.bp.blogspot.com/-DRXO7Rk5VzY/UBdQ8XIBHwI/AAAAAAAAAP8/DztbN_efCWA/s640/2012-07-31_112823.jpg&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;h3&gt;申請 CDN Request&lt;/h3&gt;&lt;div&gt;當一切都就續且完善測試過，我們就可以申請將程式碼部屬到 CDN 上。點選上方的 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;[Submit CDN Request]&lt;/span&gt;&lt;/b&gt; ，美西時間每周三下午 YUI Team 會做一次上傳。&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-H1PRSkIGozw/UBiKSon2RQI/AAAAAAAAAQg/Os8Z8pKaHDo/s1600/2012-07-26_094418.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-H1PRSkIGozw/UBiKSon2RQI/AAAAAAAAAQg/Os8Z8pKaHDo/s1600/2012-07-26_094418.jpg&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;br&gt;選擇這次變更的 Commit：&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-4MHjBq-drMs/UBEQIbloMFI/AAAAAAAAAOM/riFlJcOWMas/s1600/2012-07-26_094443.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-4MHjBq-drMs/UBEQIbloMFI/AAAAAAAAAOM/riFlJcOWMas/s1600/2012-07-26_094443.jpg&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;確認成功訊息！等到最近一次的 CDN push，我們的模組就可以在 CDN 上使用囉！&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-YOV6tvdY878/UBEQI0gAw3I/AAAAAAAAAOU/h2i4Z90cwpQ/s1600/2012-07-26_094615.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-YOV6tvdY878/UBEQI0gAw3I/AAAAAAAAAOU/h2i4Z90cwpQ/s1600/2012-07-26_094615.jpg&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;當 CDN 上傳成功後，使用者就能像使用官方模組一般使用我們所貢獻的代碼：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint&quot;&gt;YUI().use(&amp;#39;gallery-masonry&amp;#39;, function (Y) {&lt;br&gt;    // do something here&lt;br&gt;});&lt;br&gt;&lt;/pre&gt;&lt;h3&gt;&lt;/h3&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/07/how-to-be-yui-contributor.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/07/how-to-be-yui-contributor.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-mlpUznxV3kA/UBdDVF0BSII/AAAAAAAAAOg/hl4JzYvWb5I/s72-c/2012-07-31_102925.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-173665802539388161</guid><pubDate>Tue, 03 Jul 2012 12:54:00 +0000</pubDate><atom:updated>2012-07-03T20:55:03.875+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">YUI</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[分享] YUI is Sexy @ JSDC 2012</title><description>&lt;div&gt;啊嗚（&lt;a href=&quot;http://josephjiang.com/&quot; target=&quot;_blank&quot;&gt;josephj&lt;/a&gt;）是前 Yahoo! 前端工程師兼傳教士，&amp;quot;&lt;a href=&quot;http://josephjiang.com/entry.php?id=375&quot; target=&quot;_blank&quot;&gt;YUI is Sexy&lt;/a&gt;&amp;quot; 是他在 &lt;a href=&quot;http://jsdc.tw/2012/Sessions&quot; target=&quot;_blank&quot;&gt;JSDC 2012&lt;/a&gt; 分享的主題。以淺顯的語言說明 &lt;a href=&quot;http://yuilibrary.com/&quot; target=&quot;_blank&quot;&gt;YUI&lt;/a&gt; 的設計概念與優勢，包含 &lt;a href=&quot;http://yuilibrary.com/&quot; target=&quot;_blank&quot;&gt;YUI&lt;/a&gt; 的模組化、物件導向、動態加載，以及其任職的新創公司 &lt;a href=&quot;http://www.miiicasa.com/&quot; target=&quot;_blank&quot;&gt;miiiCasa&lt;/a&gt; 的實戰經驗分享。&lt;br&gt;這是個老少咸宜(?)的 Session，只要不到 30 分鐘的時間，就能帶您重新認識一個優質的 JavaScript Framework 喔！&lt;/div&gt;&lt;div id=&quot;__ss_12972992&quot; style=&quot;width: 510px;&quot;&gt;&lt;strong style=&quot;display: block; margin: 12px 0 4px;&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/josephj/yui-is-sexy-yui&quot; target=&quot;_blank&quot; title=&quot;YUI is Sexy - 使用 YUI 作為開發基礎&quot;&gt;YUI is Sexy - 使用 YUI 作為開發基礎&lt;/a&gt;&lt;/strong&gt; &lt;object height=&quot;426&quot; id=&quot;__sse12972992&quot; width=&quot;510&quot;&gt; &lt;param name=&quot;movie&quot; value=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=2012-jsdc-yui-120517123959-phpapp02&amp;stripped_title=yui-is-sexy-yui&amp;userName=josephj&quot;&gt; &lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt; &lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;&gt; &lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt; &lt;embed name=&quot;__sse12972992&quot; src=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=2012-jsdc-yui-120517123959-phpapp02&amp;stripped_title=yui-is-sexy-yui&amp;userName=josephj&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; wmode=&quot;transparent&quot; width=&quot;510&quot; height=&quot;426&quot;&gt; &lt;/object&gt; &lt;br&gt;&lt;div style=&quot;padding: 5px 0 12px;&quot;&gt;View more &lt;a href=&quot;http://www.slideshare.net/&quot; target=&quot;_blank&quot;&gt;presentations&lt;/a&gt; from &lt;a href=&quot;http://www.slideshare.net/josephj&quot; target=&quot;_blank&quot;&gt;Joseph Chiang&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/eoR9b9t3GT4&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/07/yui-is-sexy-jsdc-2012.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/07/yui-is-sexy-jsdc-2012.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/eoR9b9t3GT4/default.jpg" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-6174592026532437822</guid><pubDate>Mon, 04 Jun 2012 04:07:00 +0000</pubDate><atom:updated>2012-06-25T10:08:09.591+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google App Engine</category><category domain="http://www.blogger.com/atom/ns#">作品集</category><category domain="http://www.blogger.com/atom/ns#">實用工具</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>Shopping+ 購物搜尋 - Pinterest 流商品搜尋</title><description>&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-TK-M-kTYkJI/T8glTwUDmjI/AAAAAAAAAMs/r0GpO5t5MWY/s640/2012-05-28_182235.png&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://pinterest.com/&quot; target=&quot;_blank&quot;&gt;Pinterest&lt;/a&gt; 是近期最火紅的圖片收藏社群網站，它憑著創新的點子與令人眼睛一亮的介面在短時間內成為網路圈最火紅的焦點。此外，&lt;a href=&quot;http://pinterest.com/&quot; target=&quot;_blank&quot;&gt;Pinterest&lt;/a&gt; 漂亮的瀑布流版型也成為許多網站爭相仿效的範本。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;其實，只要使用現成的 &lt;a href=&quot;http://masonry.desandro.com/&quot; target=&quot;_blank&quot;&gt;jQuery Masonry&lt;/a&gt; 就能做到一模一樣的功能喔。我認為瀑布流的圖片呈現方式非常適合用來展示商品，這次的 &lt;a href=&quot;http://masonry.desandro.com/&quot; target=&quot;_blank&quot;&gt;jQuery Masonry&lt;/a&gt; 練習作品以 &lt;a href=&quot;http://buy.yahoo.com.tw/&quot; target=&quot;_blank&quot;&gt;Yahoo! 購物中心&lt;/a&gt; 做為對象，實做了 Pinterest 流的 &lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;Shopping+ 購物搜尋&lt;/a&gt;。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt;                  DEMO 功能展示&lt;/h3&gt;&lt;div&gt;&lt;div class=&quot;separator&quot;&gt;作品名稱：&lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;Shopping+ 購物搜尋&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://pupushopin.appspot.com/&quot;&gt;http://pupushopin.appspot.com/&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;                新介面 - Pinterest 流視覺化商品搜尋&lt;/h4&gt;&lt;div&gt;Before - 目前有兩種方法可以搜尋 Yahoo! 購物中心的商品 (重點在搜尋介面)：&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;1. 直接上 Yahoo! 購物中心搜尋：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://search.buy.yahoo.com.tw/search.php?p=%E6%B4%8B%E8%A3%9D&quot;&gt;http://search.buy.yahoo.com.tw/search.php?p=%E6%B4%8B%E8%A3%9D&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-SylHMbF3BxY/T8h6WVG9fqI/AAAAAAAAANY/6rVTKnBkUvY/s1600/2012-06-01_161546.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-SylHMbF3BxY/T8h6WVG9fqI/AAAAAAAAANY/6rVTKnBkUvY/s640/2012-06-01_161546.jpg&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;2. 使用 &lt;a href=&quot;http://tw.shopping.search.yahoo.com/&quot; target=&quot;_blank&quot;&gt;Yahoo! 購物搜尋&lt;/a&gt; ( &lt;a href=&quot;http://tw.shopping.search.yahoo.com/&quot;&gt;http://tw.shopping.search.yahoo.com/&lt;/a&gt; (可同時搜尋拍賣、超級商城與購物中心)：&lt;br&gt;&lt;a href=&quot;http://tw.shopping.search.yahoo.com/search?p=%E6%B4%8B%E8%A3%9D&quot;&gt;http://tw.shopping.search.yahoo.com/search?p=%E6%B4%8B%E8%A3%9D&lt;/a&gt;&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-yt_iwi7piQY/T8wa4clJQfI/AAAAAAAAANk/i8d5mwp3-Eg/s1600/2012-06-04_101709.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-yt_iwi7piQY/T8wa4clJQfI/AAAAAAAAANk/i8d5mwp3-Eg/s640/2012-06-04_101709.jpg&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;After - 視覺化大圖購物搜尋介面&lt;br&gt;&lt;a href=&quot;http://pupushopin.appspot.com/?q=%E6%B4%8B%E8%A3%9D&quot;&gt;http://pupushopin.appspot.com/?q=%E6%B4%8B%E8%A3%9D&lt;/a&gt;&lt;br&gt;上面兩個搜尋方式功能都非常完整，不過圖片略小。竊以為 &lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;Shopping+ 購物搜尋&lt;/a&gt; 以圖片為主的呈現，看起來非常賞心悅目：&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-iVuOnTexL-A/T8glYWyqgzI/AAAAAAAAANE/ZjgBvfEZXoE/s1600/2012-05-28_182444.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-iVuOnTexL-A/T8glYWyqgzI/AAAAAAAAANE/ZjgBvfEZXoE/s640/2012-05-28_182444.png&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h4&gt;                 搜尋建議 - 關鍵字自動補完 (Auto Complete)&lt;/h4&gt;&lt;div&gt;&amp;quot;搜尋建議&amp;quot; 是找商品不可或缺的功能，&lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;Shopping+ 購物搜尋&lt;/a&gt; 也把它整合進來囉！&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-2fb--MCHLPg/T8glZiFEnVI/AAAAAAAAANI/ijTu26-0A1g/s1600/2012-05-28_183846.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-2fb--MCHLPg/T8glZiFEnVI/AAAAAAAAANI/ijTu26-0A1g/s640/2012-05-28_183846.png&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h4&gt;               使用技術/API&lt;/h4&gt;&lt;div&gt;&lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;Shopping+ 購物搜尋&lt;/a&gt; 使用到的技術平台與 API 如下：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://masonry.desandro.com/&quot; target=&quot;_blank&quot;&gt;jQuery Masonry&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot; target=&quot;_blank&quot;&gt;jQuery UI - autocomplete&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://developers.google.com/appengine/&quot; target=&quot;_blank&quot;&gt;Google App Engine&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://tw.partner.buy.yahoo.com/&quot; target=&quot;_blank&quot;&gt;Yahoo! 大聯盟計畫&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt;            結論&lt;/h3&gt;實做產品是學習新技術最好也最有成就感的方式之一，&lt;a href=&quot;http://pupushopin.appspot.com/&quot; target=&quot;_blank&quot;&gt;Shopping+ 購物搜尋&lt;/a&gt; 就是我的 &lt;a href=&quot;http://masonry.desandro.com/&quot; target=&quot;_blank&quot;&gt;jQuery Masonry&lt;/a&gt; 練習小品。它的功能簡單(只是改良 &lt;a href=&quot;http://buy.yahoo.com.tw/&quot; target=&quot;_blank&quot;&gt;Yahoo! 購物中心&lt;/a&gt; 的搜尋介面)，不過卻很實用喔！&lt;br&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/06/shopping-plus-search.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/06/shopping-plus-search.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-TK-M-kTYkJI/T8glTwUDmjI/AAAAAAAAAMs/r0GpO5t5MWY/s72-c/2012-05-28_182235.png" height="72" width="72"/><thr:total>3</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-6045263817089372007</guid><pubDate>Wed, 30 May 2012 12:40:00 +0000</pubDate><atom:updated>2013-06-29T12:17:46.251+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Google App Engine</category><category domain="http://www.blogger.com/atom/ns#">Yahoo</category><category domain="http://www.blogger.com/atom/ns#">作品集</category><title>[Hackday] 真。雅虎無雙 猛將傳 - 社群人才管理系統</title><description>Hackday 是 Yahoo! 內部幾乎每年都會舉辦的活動，在 Hackday 這天，每個志願參加的 Engineer/PM 都可以放下手邊工作，沒有限制地把自己的 Idea 在短時間內實做出來，並且利用 90 秒的時間在所有同事面前 Demo。這次 Hackday 一如往常地吸引了上百位工程師共襄盛舉，有實力派也有 &lt;strike&gt;來亂的&lt;/strike&gt; 組別 :) 整體來說，同事們的創意/研發能量還是很強大的呀！&lt;br&gt;&lt;br&gt;看到強者 Eric 大大的 &lt;a href=&quot;http://cire.pixnet.net/blog/post/37511482&quot; target=&quot;_blank&quot;&gt;Hackday 活動紀實&lt;/a&gt;，小弟也來野人獻曝，介紹一下我的&lt;strike&gt;惡搞&lt;/strike&gt;作品囉！&lt;br&gt;&lt;br&gt;&lt;h3&gt; 真。雅虎無雙 猛將傳 - 社群人才管理系統&lt;/h3&gt;&lt;b&gt;真。雅虎無雙&lt;/b&gt;分析員工在 &lt;a href=&quot;https://www.linkedin.com/nhome/&quot; target=&quot;_blank&quot;&gt;Linkedin&lt;/a&gt; 上的活動資料，計算並預測該員工對於現任職位的穩定程度。在系統裡將這個計算出來的數值稱為「&lt;b&gt;忠誠度&lt;/b&gt;」。有了忠誠度資料後，老闆們就可以拿來穩定內政或是挖角人才。&lt;b&gt;真。雅虎無雙&lt;/b&gt;裡提供的兩項功能分別為「&lt;b&gt;安內&lt;/b&gt;」與「&lt;b&gt;攘外&lt;/b&gt;」：&lt;br&gt;&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-kwQEGB9Lh2A/T8XoKXMVPhI/AAAAAAAAAMQ/tvQiWr-lW30/s1600/2012-05-28_184525.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-kwQEGB9Lh2A/T8XoKXMVPhI/AAAAAAAAAMQ/tvQiWr-lW30/s640/2012-05-28_184525.png&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt; 1. 安內&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;這個功能列出的是任職於敝公司的員工 &lt;a href=&quot;https://www.linkedin.com/nhome/&quot; target=&quot;_blank&quot;&gt;Linkedin&lt;/a&gt; 帳號列表，並且依照「忠誠度」排序。不過 Demo 現場為了顧及個人隱私，所有員工都預設為&lt;b&gt;忠誠度 99。&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;如果老闆發現員工忠誠度降低的話，可以考慮賞賜金銀財寶或是到小房間聊一聊，把主管們寶貴的時間/金錢花在刀口上！&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-XtaJ0hObIi4/T8XoL5j-0TI/AAAAAAAAAMY/GiESKJp1hT4/s1600/2012-05-28_184536.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-XtaJ0hObIi4/T8XoL5j-0TI/AAAAAAAAAMY/GiESKJp1hT4/s640/2012-05-28_184536.png&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;/div&gt;&lt;h3&gt; 2. 攘外&lt;/h3&gt;&lt;div class=&quot;separator&quot;&gt;列出其他公司的員工 &lt;a href=&quot;https://www.linkedin.com/nhome/&quot; target=&quot;_blank&quot;&gt;Linkedin&lt;/a&gt; 帳號並依照忠誠度排序。如此一來，老闆/HR們就能夠找到特定公司忠誠度較低的員工聊聊天，如此一來可望有效地提高挖角成功機率！（有阿宅建議我實作「水鏡先生(付費版)」功能，玩三國志系列長大的宅宅們應該聽得懂 XD）&lt;/div&gt;&lt;br&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-7z7BMpgM0zw/T8XoN-Z9_JI/AAAAAAAAAMg/dRRbCYaQf1c/s1600/2012-05-28_184553.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-7z7BMpgM0zw/T8XoN-Z9_JI/AAAAAAAAAMg/dRRbCYaQf1c/s640/2012-05-28_184553.png&quot; width=&quot;600&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;對多數腳踏實地的 Engineer 來說，90 秒 Demo 往往是 Hackday 中最困難的部份，有些組別甚至過了 90 秒還沒進入 Demo 階段，非常可惜。&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;以&lt;b&gt;真。雅虎無雙 猛將傳&lt;/b&gt;為例，雖然這個 Hack 的重點是&lt;b&gt;計算個人對於現任職位穩定程度的方法&lt;/b&gt;，不過考慮到評審與觀眾聽了數十組的 Demo 後，如果再聽到「演算法」這類的字眼可能注意力會加速渙散。為了吸引大家的目光並加強娛樂效果，這次 Demo 時選用熱門的電玩「&lt;a href=&quot;http://www.gamecity.com.tw/smusou5/&quot; target=&quot;_blank&quot;&gt;真。三國無雙&lt;/a&gt;」與「忠誠度」這樣的字眼來包裝我的 Hack。雖然最後沒有獲得評審青睞中箭落馬，不過 Demo 現場效果卻是出奇地好，甚至過了幾天還是有不少人來詢問細節呢！&lt;/div&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/05/hackday-talents-musou.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/05/hackday-talents-musou.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-kwQEGB9Lh2A/T8XoKXMVPhI/AAAAAAAAAMQ/tvQiWr-lW30/s72-c/2012-05-28_184525.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-4303397057640887407</guid><pubDate>Tue, 17 Apr 2012 08:25:00 +0000</pubDate><atom:updated>2012-04-17T16:33:10.702+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><category domain="http://www.blogger.com/atom/ns#">YUI</category><category domain="http://www.blogger.com/atom/ns#">YUI 學習筆記</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] YUI 3 學習筆記 - From jQuery to YUI</title><description>在網頁前端工程領域中，&lt;a href=&quot;http://jquery.com/&quot; target=&quot;_blank&quot;&gt;jQuery&lt;/a&gt;&amp;nbsp;簡潔的語法語容易上手的特性，長年來一直都是最受歡迎的&amp;nbsp;JavaScript&amp;nbsp;函式庫。&lt;br /&gt;相較於 jQuery，許多初學者常常對著 &lt;a href=&quot;http://yuilibrary.com/&quot; target=&quot;_blank&quot;&gt;YUI 官方網站&lt;/a&gt;&amp;nbsp;而躊躇不知如何下手。其實，這兩個函式庫都各自擁有許多 JavaScript 大師投注心血開發，各有各的優點。&lt;br /&gt;許多開發者抱怨 YUI 的語法複雜，不如 jQuery 來得簡潔云云，小弟基於兩個函式庫都略有接觸，也在不同專案中交替著使用的經驗，以下是整理出來一些比較常用的 jQuery 與 YUI 3 語法對照，讀完後您會發現，原來 jQuery 與 YUI 3 的語法幾乎一模一樣!&lt;br /&gt;第一次閱讀時請快速瀏覽，往後有需要再回頭速查特定的語法即可。若您對 &lt;a href=&quot;http://yuilibrary.com/&quot; target=&quot;_blank&quot;&gt;YUI 3 &lt;/a&gt;有興趣，不妨也看看頗受好評的&amp;nbsp;&lt;a href=&quot;http://clayliao.blogspot.com/2010/02/yui-3.html&quot; target=&quot;_blank&quot; title=&quot;YUI 3 菜鳥救星&quot;&gt;YUI 3 菜鳥救星&lt;/a&gt;&amp;nbsp;與&amp;nbsp;&lt;a href=&quot;http://clayliao.blogspot.com/search/label/YUI%20%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98&quot;&gt;YUI 學習筆記&lt;/a&gt;&amp;nbsp;系列喔!&lt;br /&gt;&lt;div id=&quot;__ss_12566568&quot; style=&quot;width: 510px;&quot;&gt;&lt;strong style=&quot;display: block; margin: 12px 0 4px;&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/clayliao/handbook-from-jquery-to-yui-3&quot; target=&quot;_blank&quot; title=&quot;Handbook - From jQuery to YUI 3&quot;&gt;Handbook - From jQuery to YUI 3&lt;/a&gt;&lt;/strong&gt; &lt;object height=&quot;426&quot; id=&quot;__sse12566568&quot; width=&quot;510&quot;&gt; &lt;param name=&quot;movie&quot; value=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=handbook-fromjquerytoyui3-120416215337-phpapp02&amp;stripped_title=handbook-from-jquery-to-yui-3&amp;userName=clayliao&quot; /&gt;    &lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;/&gt;    &lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot;/&gt;    &lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;/&gt;    &lt;embed name=&quot;__sse12566568&quot; src=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=handbook-fromjquerytoyui3-120416215337-phpapp02&amp;stripped_title=handbook-from-jquery-to-yui-3&amp;userName=clayliao&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; wmode=&quot;transparent&quot; width=&quot;510&quot; height=&quot;426&quot;&gt;&lt;/embed&gt; &lt;/object&gt; &lt;br /&gt;&lt;div style=&quot;padding: 5px 0 12px;&quot;&gt;View more &lt;a href=&quot;http://www.slideshare.net/&quot; target=&quot;_blank&quot;&gt;presentations&lt;/a&gt; from &lt;a href=&quot;http://www.slideshare.net/clayliao&quot; target=&quot;_blank&quot;&gt;Ying-Hsiang Liao&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2012/04/yui-3-tutorial-from-yui-to-jquery.html</link><author>noreply@blogger.com (Clay Liao)</author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-7084138834953883943</guid><pubDate>Thu, 01 Mar 2012 14:09:00 +0000</pubDate><atom:updated>2012-04-17T15:56:12.145+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">nodejs</category><category domain="http://www.blogger.com/atom/ns#">Nodejs 學習筆記</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] Nodejs 學習筆記 (4) -- express framework</title><description>續前文：&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/build-nodejs-environment.html&quot; target=&quot;_blank&quot;&gt;[教學] Nodejs 學習筆記 (1) -- 建立開發環境&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/using-npm-manage-nodejs-pkg.html&quot; target=&quot;_blank&quot;&gt;[教學] Nodejs 學習筆記 (2) -- 使用 npm 管理套件&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/dom-manipulation-on-nodejs.html&quot; target=&quot;_blank&quot;&gt;[教學] Nodejs 學習筆記 (3) -- 操作 DOM 物件&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;                      express - Nodejs MVC Framework&lt;/h3&gt;MVC 是多數開發者很容易上手的架構，Node.js 上也有許多 Model-View-Control 架構的 Framework，這裡我們介紹最為普及的 &lt;a href=&quot;http://expressjs.com/&quot; target=&quot;_blank&quot;&gt;express&lt;/a&gt;。如果您需要別的網站來擔保的話， &lt;a href=&quot;http://expressjs.com/&quot; target=&quot;_blank&quot;&gt;express&lt;/a&gt; 官方網站也列出了幾個使用 express 的&lt;a href=&quot;http://expressjs.com/applications.html&quot; target=&quot;_blank&quot;&gt;成功案例&lt;/a&gt;，其中還包含小有名氣的新創網站 &lt;a href=&quot;http://storify.com/&quot; target=&quot;_blank&quot;&gt;Storify&lt;/a&gt;！&lt;br&gt;&lt;h3&gt;                           安裝 express &lt;/h3&gt;若您已按照先前的教學準備好了 &lt;a href=&quot;http://clayliao.blogspot.com/2011/08/using-npm-manage-nodejs-pkg.html&quot; target=&quot;_blank&quot;&gt;npm&lt;/a&gt;，安裝 &lt;a href=&quot;http://expressjs.com/&quot; target=&quot;_blank&quot;&gt;express&lt;/a&gt; 只需要一行指令（如果要 global scope 則需加上參數 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;-g&lt;/span&gt;&lt;/b&gt;）：&lt;br&gt;&lt;pre style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.589844) 1px 2px 2px; background-attachment: initial; background-clip: initial; background-color: rgba(0, 0, 0, 0.496094); background-image: initial; background-origin: initial; border-bottom-color: rgb(50, 50, 50); border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(50, 50, 50); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(50, 50, 50); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(50, 50, 50); border-top-left-radius: 5px; border-top-right-radius: 5px; border-top-style: solid; border-top-width: 1px; font-size: 14px; line-height: 21px; margin-bottom: 20px; margin-left: 10px; margin-right: 10px; margin-top: 20px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 25px; padding-left: 20px; padding-right: 20px; padding-top: 25px;&quot;&gt;&lt;code style=&quot;font-family: &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;Lucida Grande&amp;#39;, Arial; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;$ npm install express&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;                          建立新專案&lt;/h3&gt;安裝成功 &lt;a href=&quot;http://expressjs.com/&quot; target=&quot;_blank&quot;&gt;express&lt;/a&gt; 後，建立新專案也很容易，只要使用指令 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;express&lt;/span&gt;&lt;/b&gt; 並指定目錄位置，&lt;a href=&quot;http://expressjs.com/&quot; target=&quot;_blank&quot;&gt;express&lt;/a&gt; 會自動產生一個基本的網站結構（以下的目錄可以自由命名更改）。第二行指令則是安裝相依檔案：&lt;br&gt;&lt;pre style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.589844) 1px 2px 2px; background-attachment: initial; background-clip: initial; background-color: rgba(0, 0, 0, 0.496094); background-image: initial; background-origin: initial; border-bottom-color: rgb(50, 50, 50); border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(50, 50, 50); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(50, 50, 50); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(50, 50, 50); border-top-left-radius: 5px; border-top-right-radius: 5px; border-top-style: solid; border-top-width: 1px; font-size: 14px; line-height: 21px; margin-bottom: 20px; margin-left: 10px; margin-right: 10px; margin-top: 20px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 25px; padding-left: 20px; padding-right: 20px; padding-top: 25px;&quot;&gt;&lt;code style=&quot;font-family: &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;Lucida Grande&amp;#39;, Arial; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;$ express /tmp/foo &amp;amp;&amp;amp; cd /tmp/foo&lt;/code&gt;&lt;/pre&gt;&lt;pre style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.589844) 1px 2px 2px; background-attachment: initial; background-clip: initial; background-color: rgba(0, 0, 0, 0.496094); background-image: initial; background-origin: initial; border-bottom-color: rgb(50, 50, 50); border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(50, 50, 50); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(50, 50, 50); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(50, 50, 50); border-top-left-radius: 5px; border-top-right-radius: 5px; border-top-style: solid; border-top-width: 1px; margin-bottom: 20px; margin-left: 10px; margin-right: 10px; margin-top: 20px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 25px; padding-left: 20px; padding-right: 20px; padding-top: 25px;&quot;&gt;&lt;code style=&quot;font-size: 14px; line-height: 21px; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;&lt;span style=&quot;font-family: &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;Lucida Grande&amp;#39;, Arial;&quot;&gt;$ npm install -d&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;                         執行 express 新專案&lt;/h3&gt;回到剛剛建立的新專案目錄 /tmp/foo，在裡面有一個命名為 &lt;span style=&quot;color: blue;&quot;&gt;app.js&lt;/span&gt; 自動產生出來的檔案，這是 &lt;a href=&quot;http://expressjs.com/&quot; target=&quot;_blank&quot;&gt;express&lt;/a&gt; 專案的起點。我們先讓網站跑起來，待會兒再回頭研究它裡頭的細節。與其他 Node.js 執行的命令相同，使用 &lt;b&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;node&lt;/span&gt;&lt;/b&gt; 指令執行檔案 &lt;span style=&quot;color: blue;&quot;&gt;app.js&lt;/span&gt;：&lt;br&gt;&lt;pre style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.59375) 1px 2px 2px; background-attachment: initial; background-clip: initial; background-color: rgba(0, 0, 0, 0.496094); background-image: initial; background-origin: initial; border-bottom-color: rgb(50, 50, 50); border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(50, 50, 50); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(50, 50, 50); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(50, 50, 50); border-top-left-radius: 5px; border-top-right-radius: 5px; border-top-style: solid; border-top-width: 1px; font-size: 14px; line-height: 21px; margin-bottom: 20px; margin-left: 10px; margin-right: 10px; margin-top: 20px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 25px; padding-left: 20px; padding-right: 20px; padding-top: 25px;&quot;&gt;&lt;code style=&quot;font-family: &amp;#39;Helvetica Neue&amp;#39;, &amp;#39;Lucida Grande&amp;#39;, Arial; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;$ node app.js&lt;/code&gt;&lt;/pre&gt;接著使用瀏覽器開啟 &lt;a href=&quot;http://127.0.0.1:3000/&quot;&gt;http://127.0.0.1:3000&lt;/a&gt; ，如果一切正常的話，可以在瀏覽器裡看到新專案的長相（附註：3000 是 express 預設的 port）。為了一探 express 究竟產生了哪些內容，我們使用瀏覽器內建的開發者工具檢查 HTML 原始碼，並一步步找出 express 中對應的程式碼。&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-2XA28U9eHew/T09ZwcDkmJI/AAAAAAAAAHM/LuwHAdld0gA/s1600/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.07.07.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;449&quot; src=&quot;http://2.bp.blogspot.com/-2XA28U9eHew/T09ZwcDkmJI/AAAAAAAAAHM/LuwHAdld0gA/s640/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.07.07.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;h3&gt;              express 的運作方式&lt;/h3&gt;截至目前為止，我們雖然讓 express 新專案成功地跑了起來，但卻不知其所以然。現在就讓我們來看看剛剛的過程中 express 究竟做了哪些事。回到專案目錄後（本例為 &lt;span style=&quot;color: #274e13;&quot;&gt;&lt;b&gt;/tmp/foo&lt;/b&gt;&lt;/span&gt;）列出第一層檔案：&lt;br&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-7Z7yl5Tsb3I/T09Zw4GKKrI/AAAAAAAAAHQ/cD88W4gE6hE/s1600/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.08.24.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;http://3.bp.blogspot.com/-7Z7yl5Tsb3I/T09Zw4GKKrI/AAAAAAAAAHQ/cD88W4gE6hE/s640/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.08.24.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;使用文字編輯器打開剛剛執行的檔案 &lt;span style=&quot;color: blue;&quot;&gt;app.js&lt;/span&gt;。&lt;span style=&quot;color: blue;&quot;&gt;app.js&lt;/span&gt; 大致上可以拆成三個部分，首先是&lt;b&gt;載入相依的模組&lt;/b&gt;，並建立 server：&lt;br&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-FxTisuUUxOM/T09ZxoeetRI/AAAAAAAAAHc/MWjCvlDTkmg/s1600/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.09.52.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;http://2.bp.blogspot.com/-FxTisuUUxOM/T09ZxoeetRI/AAAAAAAAAHc/MWjCvlDTkmg/s640/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.09.52.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;span style=&quot;color: blue;&quot;&gt;app.js&lt;/span&gt; 第二個部分為&lt;b&gt;設定檔&lt;/b&gt;，詳細的設定語法與參數可以&lt;a href=&quot;http://expressjs.com/guide.html#configuration&quot; target=&quot;_blank&quot;&gt;參考官方文件&lt;/a&gt;。身為初學者，我們先將目光停留在兩個重點：1) Template  檔案放在&lt;b&gt; &lt;span style=&quot;color: #274e13;&quot;&gt;/views&lt;/span&gt;&lt;/b&gt; 目錄下，待會兒我們就要繼續追查這個目錄；2)  express 預設使用的 view engine 是一個名為 &lt;a href=&quot;http://jade-lang.com/&quot; target=&quot;_blank&quot;&gt;jade&lt;/a&gt; 的樣板引擎，如果不習慣 &lt;a href=&quot;http://jade-lang.com/&quot; target=&quot;_blank&quot;&gt;jade&lt;/a&gt; 的特殊語法，別忘了這是個&amp;quot;設定檔&amp;quot;，表示我們也可以將它改成使用其他樣板引擎。&lt;br&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-72xynqLZfCU/T09Zy_vqG9I/AAAAAAAAAHk/hZwQwgHdjQM/s1600/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.10.14.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;368&quot; src=&quot;http://3.bp.blogspot.com/-72xynqLZfCU/T09Zy_vqG9I/AAAAAAAAAHk/hZwQwgHdjQM/s640/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.10.14.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;span style=&quot;color: blue;&quot;&gt;app.js&lt;/span&gt; 最後一個部分是 &lt;b&gt;Routes&lt;/b&gt;，我們可以設定各種網址的 entry 並將它指定到不同的檔案。範例網站只有一頁，因此這裡就只看得到一個規則，將根目錄指到 &lt;span style=&quot;color: #274e13;&quot;&gt;views&lt;/span&gt; 目錄下的 &lt;span style=&quot;color: #274e13;&quot;&gt;index&lt;/span&gt; 檔案。&lt;br&gt;&lt;br&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-L4ys1-8R46o/T09Z1pTveII/AAAAAAAAAHs/YuucjeQh-4k/s1600/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.10.22.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;86&quot; src=&quot;http://2.bp.blogspot.com/-L4ys1-8R46o/T09Z1pTveII/AAAAAAAAAHs/YuucjeQh-4k/s640/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.10.22.png&quot; width=&quot;640&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2012/03/express-framework-on-nodejs.html#more&quot;&gt;閱讀更多 »&lt;/a&gt;</description><link>http://clayliao.blogspot.com/2012/03/express-framework-on-nodejs.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-2XA28U9eHew/T09ZwcDkmJI/AAAAAAAAAHM/LuwHAdld0gA/s72-c/Screen+shot+2012-03-01+at+%E4%B8%8B%E5%8D%887.07.07.png" height="72" width="72"/><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-21029905.post-7424374078333043723</guid><pubDate>Sun, 14 Aug 2011 06:38:00 +0000</pubDate><atom:updated>2012-11-04T13:18:25.240+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">nodejs</category><category domain="http://www.blogger.com/atom/ns#">Nodejs 學習筆記</category><category domain="http://www.blogger.com/atom/ns#">Tutorial</category><category domain="http://www.blogger.com/atom/ns#">YUI</category><category domain="http://www.blogger.com/atom/ns#">網頁前端技術</category><title>[教學] Nodejs 學習筆記 (3) -- 操作 DOM 物件</title><description>續前文：&lt;br /&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/build-nodejs-environment.html&quot;&gt;[教學] Nodejs 學習筆記 (1) -- 建立開發環境&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/using-npm-manage-nodejs-pkg.html&quot;&gt;[教學] Nodejs 學習筆記 (2) -- 使用 npm 管理套件&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;h3&gt;           在伺服器端操作 DOM 物件&lt;/h3&gt;&lt;div&gt;對於有過前端開發經驗的開發者來說，在瀏覽器裡使用 JavaScript 操作 DOM 物件是非常習慣也容易理解的，但是在 Node.js 的世界中，所有 JavaScript 操作都要轉移到伺服器端執行，DOM 物件的操作也包含在內。可是，究竟如何在沒有瀏覽器的幫忙下操作 DOM 物件呢？&lt;/div&gt;&lt;h4&gt;           在 Node.js 中使用 YUI 3 &lt;/h4&gt;&lt;div&gt;在前兩篇教學（&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/build-nodejs-environment.html&quot;&gt;1&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/using-npm-manage-nodejs-pkg.html&quot;&gt;2&lt;/a&gt;）中，我們已經安裝好了 Node.js 與 YUI 3 的開發環境，現在就直接開始撰寫程式碼。首先開啟新檔案（範例檔名為 &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;example_dom.js&lt;/span&gt;&lt;/b&gt;），由於開發環境以經就緒，我們可以在 Node.js 中使用 &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;require()&lt;/span&gt;&lt;/b&gt; 語法引用 &lt;b&gt;yui3&lt;/b&gt; 模組，並且使用眼熟的&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;YUI().use()&lt;/span&gt;&lt;/b&gt; 撰寫程式碼。熟悉 YUI 語法的開發者完全可以在 Node.js 上使用原本就很熟悉的技巧：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-inu7ZXTg-PE/TkdVof8O2TI/AAAAAAAAAF4/XWO1J-vqU3c/s1600/nodejs_yui_dom_1.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;337&quot; src=&quot;http://2.bp.blogspot.com/-inu7ZXTg-PE/TkdVof8O2TI/AAAAAAAAAF4/XWO1J-vqU3c/s640/nodejs_yui_dom_1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;blockquote&gt;小技巧：使用 &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;Y.log()&lt;/span&gt;&lt;/b&gt; 可以很清楚地知道執行成果，方便除錯。&lt;/blockquote&gt;&lt;h4&gt;   建立 DOM 物件&lt;/h4&gt;&lt;div&gt;在伺服器端沒有瀏覽器建立的 DOM 物件，我們只好自己建立： &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;code&gt;var document = Y.Browser.document;&lt;/code&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;然後就可以使用諸如 &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;createElement()&lt;/span&gt;&lt;/b&gt; 、&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;appendChild()&lt;/span&gt;&lt;/b&gt; 等語法操作 DOM 物件了！用起來的感覺跟以往沒什麼兩樣，真的是很快速方便上手啊！&lt;br /&gt;以下的程式碼建立了一個新的 &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/b&gt; 元素，並且添加一些文字內容，最後把它放回 &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/b&gt; 裡面，這是很常見的 DOM 操作：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-XxGrSfC3u4c/TkdVo-_G0GI/AAAAAAAAAF8/XdiSoNz-KZA/s1600/nodejs_yui_dom_2.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;632&quot; src=&quot;http://2.bp.blogspot.com/-XxGrSfC3u4c/TkdVo-_G0GI/AAAAAAAAAF8/XdiSoNz-KZA/s640/nodejs_yui_dom_2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;執行 &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;example_dom.js&lt;/span&gt;&lt;/b&gt; 程式，確認&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;Y.log()&lt;/span&gt;&lt;/b&gt;&amp;nbsp;印出來的執行結果符合預期：&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$ node example_dom.js&lt;/code&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-37ZtN429gLQ/TkdVpWKMZ-I/AAAAAAAAAGA/BNsLWj3IqSo/s1600/nodejs_yui_dom_3.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; src=&quot;http://2.bp.blogspot.com/-37ZtN429gLQ/TkdVpWKMZ-I/AAAAAAAAAGA/BNsLWj3IqSo/s640/nodejs_yui_dom_3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;   輸出結果至瀏覽器&lt;/h3&gt;&lt;div&gt;現在我們已經能夠自在地操作 DOM 物件了，不過可能有人希望不只是在 log 裡看到結果，而是要能顯示在瀏覽器中，畢竟這才是一般我們在開發網站常見的作法。&lt;br /&gt;在&lt;a href=&quot;http://clayliao.blogspot.com/2011/08/build-nodejs-environment.html&quot;&gt;[教學] Nodejs 學習筆記 (1) -- 建立開發環境&lt;/a&gt;中示範了使用 Node.js 建立 http 伺服器的方法，只要把這兩個範例結合在一起，就能從瀏覽器裡看到結果囉：&lt;/div&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-aXrz99A3k44/TkdVuuHzzFI/AAAAAAAAAGE/N57KjeTsCrA/s1600/nodejs_yui_dom_4.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;534&quot; src=&quot;http://2.bp.blogspot.com/-aXrz99A3k44/TkdVuuHzzFI/AAAAAAAAAGE/N57KjeTsCrA/s640/nodejs_yui_dom_4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;使用瀏覽器連線至：&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #274e13;&quot;&gt;http://localhost:8124&lt;/span&gt;&lt;/b&gt;，出現了剛剛 Node.js 執行的結果。開啟開發者工具進一步確認回傳的內容與剛才在 log 裡看到的確實是一模一樣的：&lt;br /&gt;&lt;div class=&quot;separator&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-Q7GTrhOGODk/TkdVvEXaw8I/AAAAAAAAAGI/7MPfG_3PUzM/s1600/nodejs_yui_dom_5.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;518&quot; src=&quot;http://2.bp.blogspot.com/-Q7GTrhOGODk/TkdVvEXaw8I/AAAAAAAAAGI/7MPfG_3PUzM/s640/nodejs_yui_dom_5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;</description><link>http://clayliao.blogspot.com/2011/08/dom-manipulation-on-nodejs.html</link><author>noreply@blogger.com (Clay Liao)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-inu7ZXTg-PE/TkdVof8O2TI/AAAAAAAAAF4/XWO1J-vqU3c/s72-c/nodejs_yui_dom_1.png" height="72" width="72"/><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1"/><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD"/></item></channel></rss>