ååããã¼ã«ã«ã¢ããªã±ã¼ã·ã§ã³ãã£ãã·ã¥æ©è½ã使ã£ã¦ãXmarksに替わる、オレ専用のブックマークWebアプリを作る - ふにゃるんãä½ã£ã訳ã§ããã
ããããæ´ã«èª¿åã«ä¹ã£ã¦ããªã¬ãªã¬å°ç¨ã®ã¯ã¦ã¶Webã¢ããªãä½ã£ã¦ã¿ã¾ããã
ä½ã§ä½ããã¨æã£ãã
iPodã¨ãããiPhoneã«ã¯ãå ã ã¯ã¦ã¶ã¢ããªããããã§ãããåºæ¥ãã®ã¯ããã¯ãã¼ã¯ãWebãã©ã¦ã¸ã³ã°ã®ã¿ã
iPodã®ã¯ã¦ã¶ã¢ããªã§ãããã¯ãã¼ã¯ãããã¨ããã¨ã以ä¸ã®åé¡ã«çªãå½ããã¾ãã
- ç¡ç·LANã¨ããã©ããã½ã³ã³ã§Webãã©ã¦ãºããæ¹ãè¦èªæ§ãè¯ããéãã
(ç¾å¨ã®æãiPodã®Webãã©ã¦ãºã¯è£å©çã«ä½¿ã£ã¦ããç¶æ ãæªã ã«ã¡ã¤ã³ã¯ãã½ã³ã³ãªãã§ãã) - ããã¯ãã¼ã¯ããéãã¿ã°ãiPodã§æã¡è¾¼ãã®ã¯ãæãããè¦è¡ãªãã
(ãã©ã¤ã³ãã¿ããã«æ £ãã¦ããã®ã§ãæèã¨å ¥åãä¸è´ããªãã®ã¯ãæãããä¸ä¾¿) - ãã½ã³ã³ã§ã¯ããªã¬å°ç¨ã®ããã¯ãã¼ã¯ã¢ããªã使ã£ã¦æ¥½ãã¦ããããããã£ã¡ã§ä½¿ãããã
(P4Dで、はてレジ(はてなブックマークを登録するツール)を作ってみました - ふにゃるんã®ãã¨ã§ã) - iPhoneãªã常æãããæ¥ç¶ã ããiPodãªã®ã§ã常æãããæ¥ç¶ãããªãã®ã§ããªãã©ã¤ã³éè¦ãããªãã¨å°ãã
(ãªãã©ã¤ã³ãµãã¼ããã¦ããªããã¥ã¼ã¹ç³»ã¢ããªã¯å³è¡åé¤è¡ãã ã£ããã:-P)
以ä¸ã®çç±ã¨ãæã«ããæè¡ã§éãã§ã¿ããã¨ããå¼·ã欲æ±ããããªã¬ãªã¬å°ç¨ãª ã¯ã¦ã¶Webã¢ããªãä½ã£ã¦ã¿ã次第ã§ãã
åèã«ããWebãµã¤ã
ä»ååèã«ããWebãµã¤ãã¯ã以ä¸ã®éãã§ãã
- jQuery æ¥æ¬èªãªãã¡ã¬ã³ã¹
http://semooh.jp/jquery/ - jQuery Mobile | jQuery Mobile
http://jquerymobile.com/ - [jQuery Mobile] - ãã«ãºã£ã¨
http://d.hatena.ne.jp/sy-2010/searchdiary?word=%2A%5BjQuery%20Mobile%5D - Web Storage ã®æ®å®¹éã調ã¹ã¦ã¿ã - latest log
http://d.hatena.ne.jp/uupaa/20100106/1262781846 - localStorageã®æåã¨ç°¡åãªã©ããã¼ - but hopeful
http://d.hatena.ne.jp/Jxck/20100821/1282412125 - JavaScript: å¤é¨RSSèªã¿è¾¼ã¿ by âGoogle Ajax Feeds APIâ | t.p.fields - web+tech info
http://tpfields.xrea.jp/javascript/load-external-rss-by-javascript-google-ajax-feeds-api.html - JavaScriptã§mailtoãèµ·åããå ´å « for WEBå±
http://www.4web8.com/224.html - (v)sprintf | jQuery Plugins
http://plugins.jquery.com/project/printf
使ã£ã¦ããæè¡
åèã«ããWebãµã¤ãã§ããããéããä»å使ç¨ããæè¡ã¯ã大ä½ãããªæãã§ãã
- jQuery Mobile
- åå㯠jQtouchã§ããããä»åã¯jQuery Mobileã§ãã
æ¡ç¨ã«ç¹ã«æå³ã¯ç¡ããä¸å¿æ¬å½ã¨è¨ããã¦ããã®ã§ 試ãã¦ã¿ãããªã£ãã ãã§ãã - Google Ajax Feeds API
- ä»åãå¤é¨ãã¡ã¤ã³ã®RSSãã¼ã¿ãåå¾ããå¿
è¦ãããã¾ãã¦ãæ®éã¯CGIãä½ãç½®ãã¦ãCGIããå¤é¨ãã¡ã¤ã³ã®RSSãã¼ã¿ãåå¾ãããããã®ãã»ãªãªã¼ã£ã½ãã£ããã§ããã
ã¾ããããã§ãè¯ãããªãã¨ã - HTML5ã®ãã¼ã«ã«ã¹ãã¬ã¼ã¸
- ãã¼ã«ã«ã«æ°¸ç¶çã«ãã¼ã¿ãæ ¼ç´ã§ããæè¡ã¨ãã¦ããã¼ã«ã«ã¹ãã¬ã¼ã¸æè¡ã¨SQLãç¨ããæè¡ããããããªãã§ãããä»åã¯æ¥½ã£ã½ã(ãã¼ããªã¥ã¼ã§OKãªãã§ããã)ãã¼ã«ã«ã¹ãã¬ã¼ã¸ã«ãã¾ããã
ã½ã¼ã¹ã³ã¼ã
ã¦ãã¨ã¼ã§ã¯ããã¾ãããã½ã¼ã¹ã³ã¼ããæãã¾ãã
<!DOCTYPE html> <html manifest="test_hatebu.manifest"> <meta charset="UTF-8" /> <title>ã¯ã¦ã¶ãããã¨ã³ããªããã§ã</title> <link rel="stylesheet" href="lib/jquery.mobile-1.0a3.min.css" /> <script src="lib/jquery-1.5.min.js"></script> <script src="lib/js_sprintf.js"></script> <script src="https://www.google.com/jsapi?key=$ããã«åå¾ãããã¼ãå ¥ãã¦" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> function make_entry(feed){ console.log("make_entry=%d", feed.entries.length); var ary = jQuery.map(feed.entries, function(n, i){ var s = $.sprintf( "<div class='ui-bar ui-bar-b'> \ %(no)d: %(title)s \ </div> \ <div> \ <div data-role='controlgroup' data-inline='true' align='right' data-type='horizontal'> \ <input type='checkbox' name='chk' id='chk-%(no)d' value='%(url)s'/> \ <label for='chk-%(no)d' data-icon='start'>å¾ã§</label> \ <span> </span> \ <a href='%(url)s' data-role='button' data-icon='arrow-r' target='_blank'>URL</a> \ </div> \ <p>%(content)s</p> \ </div>", { no: i+1, url: n.link, title: n.title, content: n.contentSnippet, detail: n.content }); return s; }); $("#rss").append(ary.join()); } function load_entry() { console.log("load_entry"); var feed_url = "http://b.hatena.ne.jp/hotentry.rss"; var feed_content = null; try{ console.log("no local storage[%s]", feed_url); var feed = new google.feeds.Feed(feed_url); feed.setNumEntries(100) feed.load(function(result) { feed_content = JSON.stringify(result.feed); localStorage[feed_url] = feed_content; }); console.log("set local storage!!"); }catch(e){ console.log("sorry fail fetch:" + feed_url); } if(feed_content == null){ feed_content = localStorage[feed_url]; } var feed = JSON.parse(feed_content); make_entry(feed); } try{ google.load("feeds", "1"); }catch(e){ console.log("fail google.load"); } //google.setOnLoadCallback(load_entry); </script> <script type="text/javascript" charset="utf-8"> console.log("custom script code!!"); // è¨å®ã®çºã®åæå $(document).bind("mobileinit", function(){ console.log("mobileinit"); }); // æ®éã®åæå $(function(){ console.log("function!!"); var clickTrigger = ($.support.touch)? "tap": "click"; $("#call-mail").bind(clickTrigger, function(){ //$("[name='select']:checked").each(function(){ var chks = $(":checked").map(function(){ return this.value; }).get(); //alert("checkbox:" + chks.join(",")); if(chks.length > 0){ s = "subject=" + "after_check!!" + "&body=" + chks.join("\n"); location.href = "mailto:$ã¡ã¢ããå ¥ãã¦?" + encodeURI(s); } return false; }); }); $('#main').live('pagebeforecreate',function(event){ console.log("pagebeforecreate"); // ãã¼ã¸ãä½æããåã«ãã¯ã¦ã¶ã¨ã³ããªã¼ãçæãã // ã§ãªãã¨ãã¹ãã¼ããã©ã³ãªå¤è¦³ã«ãªããªããã load_entry(); }); $('#main').live('pagecreate',function(event){ console.log("pagecreate"); }); console.log("end of script tag"); </script> <script src="lib/jquery.mobile-1.0a3.min.js"></script> </head> <body> <!-- Start of first page --> <div data-role="page" id="main"> <div data-role="header" data-theme='d'> <h1>ã¯ã¦ã¶ãããã¨ã³ããª</h1> <a id="call-mail" href="#" class='ui-btn-right'>to ã¡ã¼ã«</a> </div> <div data-role="content"> <div id="rss"></div> </div> <div data-role="footer" data-theme='a' align='center'> <span>end of document </span> <a id="call-mail" href="#">to ã¡ã¼ã«</a> </div> </div> </body> </html>
ãã¨ããã¼ã«ã«Webåããçºã«ãtest_hatebu.manifest ãã¡ã¤ã«ãåããã©ã«ãã«çªã£è¾¼ãã§ããã¾ãããã
CACHE MANIFEST # rev1 CACHE: lib/jquery.mobile-1.0a3.min.css lib/jquery.mobile-1.0a3.min.js lib/jquery-1.5.min.js lib/js_sprintf.js lib/images/ajax-loader.png lib/images/form-check-off.png lib/images/form-check-on.png lib/images/form-radio-off.png lib/images/form-radio-on.png lib/images/icon-search-black.png lib/images/icons-18-black.png lib/images/icons-18-white.png lib/images/icons-36-black.png lib/images/icons-36-white.png
ãªããlib/js_sprintf.js ãã¡ã¤ã«ã¯ãjQuery pluginã® http://plugins.jquery.com/project/printf ããã²ããããã³ã¼ããç½®ãã¦ãã¾ãã
åããã¦ã¿ã
WWWãµã¼ãã¼ã«é©å½ã«æ¾ãè¾¼ãã ãã¡ã¤ã«ããiPodã®Safariããåç
§ããã¨ã以ä¸ã®ç»é¢ãåºã¦æ¥ã¾ãã
(æ©å
ã¢ã¼ãã§ãã¡ããã¨åãã¦ããã®ãå¤ãã¾ããï¼)
åºæ¬çã«ããå¾ã§ãã«ãã§ãã¯ãä»ãã¾ãã£ã¦ãããããããã¯ããã¿ã«ããããto ã¡ã¼ã«ããã¿ã³ãæ¼ãã¨ããã§ãã¯ãä»ããURLãã¡ã¼ã«ã®æ¬æã«é©ç¨ãããã
ã¨ãã£ãæµãã§ãã
ä¸å¿ãªãã±ã¨ãã¦ããURLããã¿ã³ãæ¼ãã¨ãã¯ã¦ã¶ã¨ã³ããªã®Webãã¼ã¸ã«é£ãã§ããã¾ãã
ä¾ãã°ã2ã¤ã»ã©ãã¨ã³ããªã«å¯¾ãã¦ãå¾ã§ãããã§ãã¯ãã¾ãã
ããã§ããto ã¡ã¼ã«ããã¿ã³ãæ¼ãã¨ãã¡ã¼ã©ã¼ãèµ·åãã¦ããã§ãã¯ããURLãæ¬æã«é©ç¨ããã¾ãã
å¾ã¯ãã¡ã¼ã«ããã ãã§ãã
ç°¡åã§ããã
ã¡ãªã¿ã«ã1åç®ã®èªã¿è¾¼ã¿ã§ãã¨ã³ããªã®Webä½æã«åæ ããã2åç®ä»¥éã§æåããããããã°ãæ±ãã¦ãã¾ãã
ããã¨ããããåããã®ã§æãã¨ããæ´èã
æå¾ã«
å ¨ä½çã«æåããã«ã§ãéããã®ã§ããã¡ã£ã¨ã³ã³ãã¯ãã«ããããªããã¨æã£ã¦ãã¾ããç¹ã«ããå¾ã§ããURLããã¿ã³ã®ãã«ãã¨è¨ã£ããâ¦ããµã ã
ããããä»åã§2ã¤ã§ããããããã¼ã§ãããããããã¢ããªã±ã¼ã·ã§ã³ã®ããã«æ¯èãWebã½ãããåºæ¥ããªãã¦ãHTML5ã£ã¦ä¾¿å©ãªæè¡ã§ããã
ããã¾ã§ä¾¿å©ã«åãã¨ãªãã¨ãããããã¬ã©ã±ã¼ã¨å¼ã°ããæ¢åã®æºå¸¯ããHTML5ããµãã¼ãããã°è¯ãã®ã«ãã¨ãæã£ã¦ãã¾ãã¾ããã
Flash Liteãããã®ã§ããã£ã¨é«åº¦ãªéã³ãåºæ¥ãã®ã¯å¤ãã¾ãããHTML5ã¯æ´ã«æè¡ã®æ·å±
ãä½ãã®ã§ãéçºè
ã®è£¾éãåºããã¨æããã§ããããã
(ãã¼ããã¹ãã¼ããã©ã³åãããããæã£åãæ©ãã¨æããã ãã©ãªã)