The RoLLing cOde

Rumor, crap and unoriginal | 谣言、扯淡、非原创

2008-04-06

A new player to the desktop RIA playground?

With the release of GTalk Lab Ed, an desltop version of GTalk Gadget, Google has showed up its achievement of WebKit engine embedding. After Adobe AIR, Mozilla Prism and some announcement from m$, the search giant maybe also silently joined the Desktop RIA game. Will the gears finally become a Porsche? Let's guess...

Labels: , , , , , ,

2008-02-02

Developer Platform Comparison: MySpace vs. Facebook

MySpace China has opened its developer platform to some beta testers. Similar to Facebook Platform, 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:

FacebookMySpace
RESTful APIyesyes (see below)
QueryFQLn/a
MarkupFBML + FBJSn/a
Test Consoleyesyes
Authenticationown protocolOAuth
SDK15+1 for now

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.

Well, for MySpace, opening is a big step, but too early to give them a bravo.

Labels: , , ,

2008-01-30

OAuth Core 1.0 Final in Chinese

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.

OAuth协议致力于使网站和应用程序(统称为消费方)能够在无须用户透露其认证证书(译注:如登录密码)的情况下,通过API访问某个web服务(统称为服务提供方)的受保护资源。更一般地说,OAuth为API认证提供了一个可自由实现且通用的方法。

Official Document in English / My Translation in Chinese (中文版附录暂未翻译)

Labels:

2008-01-14

Presentation about JiWai.de


A presentation about JiWai.de was made by zixia and me last weekend at ZEUUX.

What I talked about was:

  • JiWai.de gadgets, API and user-contributed apps;
  • How we use OSS to build and scale JiWai.de site;
  • The open standards we focus on.

Download the slides(PDF, in Chinese) here.

Labels: , , , ,

2007-12-24

Get Spread Toolkit and inotify-tools PHPized

Just very basic wrapping :)
Get them from Google Code SVN.
svn checkout http://php-spread.googlecode.com/svn/trunk/ php-spread-read-only
svn checkout http://php-inotifytools.googlecode.com/svn/trunk/ php-inotifytools-read-only

Labels: , ,

2007-11-12

File upload with URLRequest in AIR

A function to help upload without FileReference.upload() in AIR HTML/JS application.

Function Parameters:

void PrepareMultipartRequest(
URLRequest request, ByteArray file_bytes,
string field_name = "file", string native_path = "C:\FILE",
object data_before = {}, object data_after = {}
);

Sample JS Code:

var request = new air.URLRequest('http://example.com/upload.php');
var loader = new air.URLLoader();
var file = new air.File('C:\\TEST.TXT'); //use file.browseForOpen() on ur wish
var stream = new air.FileStream();
var buf = new air.ByteArray();
var extra = {
"id": "abcd"
};
stream.open(file, air.FileMode.READ);
stream.readBytes(buf);
MultipartRequest(request, buf, 'myfile', file.nativePath, extra);
loader.load(request);

Sample PHP Code:

$id = $_POST['id'];
move_uploaded_file($_FILES['myfile']['tmp_name'], '/opt/blahblah');

Download: multipart.js

Original code inspired from here.

Labels: ,

2007-11-11

"AIR crash"

The AIR(Adobe Integrated Runtime) 1.0b2 for win32 crashed on very simple js/html code.

Setting style.display of an iframe(or its container) element to none is dangerous, the workaround cound be setting style.visibility to hidden.

Get the crashing code here: AIRb2CrashSample.air.

It's even my first AIR program. :|

Labels: ,