tag:blogger.com,1999:blog-86454939116554044582008-04-15T13:54:33.391+08:00The RoLLing cOdeFreeWizardnoreply@blogger.comBlogger10125tag:blogger.com,1999:blog-8645493911655404458.post-10472199830827340172008-04-06T14:39:00.003+08:002008-04-06T17:36:31.187+08:00A new player to the desktop RIA playground?With the release of <a href="http://www.google.com/talk/labsedition/">GTalk Lab Ed</a>, an desltop version of <a href="http://talkgadget.google.com/talkgadget/popout">GTalk Gadget</a>, Google has showed up its achievement of <a href="http://webkit.org/">WebKit</a> engine embedding. After Adobe AIR, Mozilla Prism and <a href="http://www.techcrunch.com/2008/03/01/microsoft-office-online-and-attacking-the-innovators-dilemma/">some announcement</a> from m$, the search giant maybe also silently joined the Desktop RIA game. Will the <a href="http://gears.google.com/">gears</a> finally become a <span class="a">Porsche? Let's guess...<br /></span>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-30111054470266303892008-02-02T18:56:00.000+08:002008-02-02T19:52:42.584+08:00Developer Platform Comparison: MySpace vs. Facebook<p><a href="http://myspace.cn/">MySpace China</a> has opened its <a href="http://developer.myspace.cn/community/">developer platform</a> to some beta testers. Similar to <a href="http://developers.facebook.com/">Facebook Platform</a>, the dev zone has a list of APIs, some language wrappers(only ActionScript for now) for the API and a test console. Detailed comparison follows:</p><table><tbody><tr><th></th><th>Facebook</th><th>MySpace</th></tr><tr><th>RESTful API</th><td>yes</td><td>yes (see below)</td></tr><tr><th>Query</th><td>FQL</td><td>n/a</td></tr><tr><th>Markup</th><td>FBML + FBJS</td><td>n/a</td></tr><tr><th>Test Console</th><td>yes</td><td>yes</td></tr><tr><th>Authentication</th><td>own protocol</td><td><a href="http://oauth.net/">OAuth</a></td></tr><tr><th>SDK</th><td><a href="http://wiki.developers.facebook.com/">15+</a></td><td>1 for now</td></tr></tbody></table><p>Generally, I appericiate their picking up of OAuth. But the number of objects and functions accessible via API is too much fewer than Facebook's. OpenSocial API to push activities is still on its way either.</p><p>Well, for MySpace, opening is a big step, but too early to give them a bravo.</p>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-20792544627731980762008-01-30T17:08:00.000+08:002008-01-30T17:31:52.790+08:00OAuth Core 1.0 Final in Chinese<blockquote>The OAuth protocol enables websites or applications (Consumers) to access Protected Resources from a web service (Service Provider) via an API, without requiring Users to disclose their Service Provider credentials to the Consumers. More generally, OAuth creates a freely-implementable and generic methodology for API authentication.</blockquote><br /><blockquote>OAuth协议致力于使网站和应用程序(统称为消费方)能够在无须用户透露其认证证书(译注:如登录密码)的情况下,通过API访问某个web服务(统称为服务提供方)的受保护资源。更一般地说,OAuth为API认证提供了一个可自由实现且通用的方法。</blockquote><br /><p><a href="http://oauth.net/core/1.0/">Official Document in English</a> / <a href="http://rollingcode.org/blog/f/oauth-core-1.0-final-cn.html">My Translation in Chinese</a> (中文版附录暂未翻译)</p>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-55406284254178408992008-01-14T15:31:00.000+08:002008-01-20T22:48:09.717+08:00Presentation about JiWai.de<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://rollingcode.org/blog/uploaded_images/jwarch-713410.png"><img style="cursor: pointer;" src="http://rollingcode.org/blog/uploaded_images/jwarch-713401.png" alt="" border="0" /></a><br /><p>A presentation about <a href="http://jiwai.de/">JiWai.de</a> was made by <a href="http://zixia.net/" target="_blank" title="zixia">zixia</a> and me last weekend at <a href="http://www.zeuux.org/" target="_blank" title="zeuux">ZEUUX</a>.</p><p>What I talked about was:</p><ul><li>JiWai.de gadgets, API and user-contributed apps;</li></ul><ul><li>How we use OSS to build and scale JiWai.de site;</li></ul><ul><li>The open standards we focus on. </li></ul><p>Download the slides(PDF, in Chinese) <a href="http://www.zeuux.org/pub/zeuux-monthly-2-200801-jiwai-arch.pdf" target="_blank" title="PDF">here</a>.</p>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-27255243456235277802007-12-24T15:27:00.000+08:002008-01-15T19:46:21.690+08:00Get Spread Toolkit and inotify-tools PHPizedJust very basic wrapping :)<br />Get them from Google Code SVN.<br /><span style="font-family: courier new;"></span><blockquote><span style="font-family: courier new;">svn checkout http://php-spread.googlecode.com/svn/trunk/ php-spread-read-only</span><br /><span style="font-family: courier new;">svn checkout http://php-inotifytools.googlecode.com/svn/trunk/ php-inotifytools-read-only</span><br /></blockquote>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-19439922385295824002007-11-12T20:51:00.000+08:002008-01-16T11:46:59.150+08:00File upload with URLRequest in AIR<p>A function to help upload without FileReference.upload() in AIR HTML/JS application.</p><p>Function Parameters:</p><blockquote>void PrepareMultipartRequest(<br />URLRequest request, ByteArray file_bytes,<br />string field_name = "file", string native_path = "C:\FILE",<br />object data_before = {}, object data_after = {}<br />);</blockquote><p>Sample JS Code:</p><p></p><blockquote> var request = new air.URLRequest('http://example.com/upload.php');<br />var loader = new air.URLLoader();<br />var file = new air.File('C:\\TEST.TXT'); //use file.browseForOpen() on ur wish<br />var stream = new air.FileStream();<br />var buf = new air.ByteArray();<br />var extra = {<br />"id": "abcd"<br />};<br />stream.open(file, air.FileMode.READ);<br />stream.readBytes(buf);<br />MultipartRequest(request, buf, 'myfile', file.nativePath, extra);<br />loader.load(request);</blockquote><p>Sample PHP Code:</p><blockquote> $id = $_POST['id'];<br />move_uploaded_file($_FILES['myfile']['tmp_name'], '/opt/blahblah');<br /></blockquote><p>Download: <a href="http://rollingcode.org/blog/f/multipart.js">multipart.js</a></p><p>Original code inspired from <a href="http://www.actionscript.org/forums/showpost.php3?p=636159&postcount=4">here</a>.</p>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-7674873292449983452007-11-11T15:32:00.000+08:002008-01-16T11:29:28.764+08:00"AIR crash"<p>The AIR(Adobe Integrated Runtime) 1.0b2 for win32 crashed on very simple js/html code.</p><p>Setting style.display of an iframe(or its container) element to none is dangerous, the workaround cound be setting style.visibility to hidden.</p><p>Get the crashing code here: <a href="http://rollingcode.org/blog/f/AIRb2CrashSample.air">AIRb2CrashSample.air</a>.</p><p>It's even my first AIR program. :|</p><p> </p>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-79320618046120583912007-10-24T09:19:00.000+08:002008-01-15T19:35:53.365+08:00Memcached hack from Sina guys<p>a BDB-backended memcached hack</p><p><a href="http://code.google.com/p/memcachedb/" target="_blank" title="memcachedb">http://code.google.com/p/memcachedb/</a></p><br /><p>similar to Tugela.</p><p>Supported memcache command</p><p> * get, set, add, replace<br /> * incr, decr<br /> * delete<br /> * stats<br /> * flush_all <br /><br />Private commands<br /><br /> * db_checkpoint<br /> * db_archive </p>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-3741738386334218972007-09-20T16:48:00.000+08:002008-01-15T19:31:58.919+08:00Cool features upcoming in memcached<p>Memcached is cool, KISS and powerful. After no-new-release-silence of months, I'm always expecting some new feature from it. Here are things I'm looking forward:</p><br /><ul><li>64 bit counter: patch available from Evan Miller</li><li>APPEND: patch available from Filipe Laborde</li><li>Binary wire protocol: patch and python/java client code available from Dustin Sallings</li><li>Atomic operation: patch available from Chris Goffinet</li><li>Mass deletion: have not seen the patch yet, but I believe it will not take too long...</li><li>Replication? Sounds cool, but a bit complex and not so useful IMHO.</li><li>Storage backend? Useful in certain cases, but not so necessary since we have Tugela and <a href="http://auriga.wearlab.de/~alb/nmdb/">NMDB</a>. Ofcoz the world will be more perfect if author of NMDB make a memcached-compatible interface.</li><li>Iterating keys/items? Useful or not? Certainly leads to abusing.</li></ul><p>For all memcached lovers, we should give our thanks to Facebook, who contributes patches and hosts hackathon. :)</p>FreeWizardnoreply@blogger.comtag:blogger.com,1999:blog-8645493911655404458.post-62821592583733807712007-08-24T01:14:00.000+08:002008-01-20T22:49:12.434+08:00Unofficial Facebook application for Douban<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://rollingcode.org/blog/uploaded_images/image6-772125.png"><img style="cursor: pointer;" src="http://rollingcode.org/blog/uploaded_images/image6-772123.png" alt="" border="0" /></a><br /><p>A Chinese F8 app was put online by me lately which would help ppl on <a href="http://www.facebook.com/">Facebook</a> to show off their <a href="http://douban.com/">Douban</a> collections.</p><p>200+ Facebook user enjoyed this small creation.</p><p><a href="http://www.facebook.com/apps/application.php?api_key=105fdf5d436e99641adfba4c8614bccb">Wanna a try?</a>(Facebook account required)<br /></p><p>For ppl interested with the TODO list in the maybe-near-maybe-far future:</p><ul><li><strike>FBML 1.1</strike></li><li>Display more items in collection </li><li>Profile action</li><li>Story line update</li><li><strike>Invite friends</strike></li><li>Collections in common with friends</li></ul> <p>For bugs and advices, visit <a href="http://www.facebook.com/board.php?uid=3191895434">here</a>.</p>FreeWizardnoreply@blogger.com