OneRing @ OSCamp 2010
Upcoming SlideShare
Loading in...5
×
 

OneRing @ OSCamp 2010

on

  • 9,194 views

在 OpenSourceCamp + CommunityOne Beijing 2010 (http://beijing2010.opensourcecamp.org/) 上的演讲

在 OpenSourceCamp + CommunityOne Beijing 2010 (http://beijing2010.opensourcecamp.org/) 上的演讲

Statistics

Views

Total Views
9,194
Views on SlideShare
6,567
Embed Views
2,627

Actions

Likes
28
Downloads
146
Comments
2

21 Embeds 2,627

http://code-opensocial.googleusercontent.com 2457
http:// 26
http://co 26
https://code-opensocial.googleusercontent.com 21
http://cod 20
http://c 18
http://code 17
http://code-o 8
http://code- 8
url_unknown 5
https://twitter.com 5
http://code-op 3
http://paper.li 3
http://code-ope 2
http://code-opensocial.goo 2
http://code-opens 1
http://static.slidesharecdn.com 1
http://code-opensocial.googleuserconte 1
http://code-opensocial.googleusercontent.co 1
http://code-opensocial.goog 1
http://www.onlydoo.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • 很有应用前景的Onering,通过HTML5+CSS及JS制作桌面应用,学习周期短,开发效率高,可大量重复使用来自网页UI的设计做桌面程序,可重用的成熟的组件也比较多
    Are you sure you want to
    Your message goes here
    Processing…
  • 虽然没能来现场,不过SLIDE做的很好,清晰明了,Onering肯定比AIR及Silverlight方便多了
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

OneRing @ OSCamp 2010 OneRing @ OSCamp 2010 Presentation Transcript

  • Web OneRing One ring to rule them all, one ring to find them, One ring to bring them all and in the darkness bind them.
  • OneRing OneRing HTML5+CSS3 Javascript web http://code.google.com/p/onering-desktop/ License: LGPL
  • AIR / Silverlight / XUL Runner?
  • Yes ( ) HTML+CSS+JS
  • No sandbox
  • MFC / GTK+ / Qt / wxWidgets?
  • Yes Javascript API
  • No Control Event HTML+CSS+JS
  • webOS / Chrome OS?
  • No
  • demo
  • OneRing? web
  • Web HT CSS JS ML HTTP
  • :1 HT CSS JS ML HTTP App Launcher
  • :2 HT CSS JS ML HTTP (IE) App Launcher
  • IE6 must DIE!
  • :3 HT CSS JS Web ML Kit HTTP WebKit App Launcher
  • API
  • :4 HT CSS JS Web ML Kit HTTP onering.js WebKit App Launcher
  • annoying
  • :5 HT CSS JS Web ML Kit call function call back onering.js WebKit callback App Launcher
  • class init: def GET(self): web.header('Content-Type', 'application/json') return json.dumps({'width': 400, 'height': 300, 'url': '/'}) class index: def GET(self): web.header('Content-Type', 'text/html') return """<html> <head><script type="text/javascript" src="onering://onering/onering.js"></ script></head> <body> <p>Hello, world!</p> <button onclick="javascript:ONERING.exit()">Exit</button> </body></html>""" app = web.application(urls, globals()) if __name__ == '__main__': onering.register_wsgi_app("demo", app.wsgifunc()) onering.loop("demo")
  • JavaScript onering.js ajax/pubsub App OS Backend
  • C API DLL
  • C API typedef void (*onering_app_func_t) ( const char* method, const char* path, const char* body,    /*OUT*/ const char** response, int* response_len); int onering_register_app(const char* appname, onering_app_func_t app_func); int onering_loop(const char* appname);
  • Python Binding register_wsgi_app(appname, wsgiapp) loop(appname)
  • QtWebKit
  • Dispatch Url To App Backend GET onering://myapp/test ↓ (via NetworkAccessManager) app_func = registered_app_funcs.lookup("myapp"); app_func("GET", "/test", NULL, &response, &response_len);
  • onering.js frame->addToJavaScriptWindowObject("_OneRing", jsapi) ONERING.Window.prototype.hide = function() {     return _OneRing.Window_hide(); }
  • onering.js Is Served By An OneRing App onering://onering/onering.js
  • onering.js Is Served By An OneRing App onering://onering/onering.js void onering_app(const char* method, const char* path, const char* body, const char **response, int *response_len) {         if (strcmp(method, "GET") == 0 && strcmp(path, "/onering.js") == 0) {                 *response = onering_js.constData();                 *response_len = onering_js.size();         } else {                 // TODO: 404                 *response = "";                 *response_len = 0;         } }
  • Native GUI HTML5 Web OS RIA
  • Native GUI HTML5 Web OS RIA OneRing
  • Join US C++ / Qt / WebKit / Javascript / Python / Documenter / User / Tester / Code Reviewer http://code.google.com/p/onering-desktop/
  • Thanks & Q & A http://www.douban.com/people/hongqn/ hongqn@douban.com twitter: @hongqn