OneRing @ OSCamp 2010

  • 8,498 views
Uploaded on

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

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

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

Views

Total Views
8,498
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
146
Comments
2
Likes
28

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 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.
  • 2. OneRing OneRing HTML5+CSS3 Javascript web http://code.google.com/p/onering-desktop/ License: LGPL
  • 3. AIR / Silverlight / XUL Runner?
  • 4. Yes ( ) HTML+CSS+JS
  • 5. No sandbox
  • 6. MFC / GTK+ / Qt / wxWidgets?
  • 7. Yes Javascript API
  • 8. No Control Event HTML+CSS+JS
  • 9. webOS / Chrome OS?
  • 10. No
  • 11. demo
  • 12. OneRing? web
  • 13. Web HT CSS JS ML HTTP
  • 14. :1 HT CSS JS ML HTTP App Launcher
  • 15. :2 HT CSS JS ML HTTP (IE) App Launcher
  • 16. IE6 must DIE!
  • 17. :3 HT CSS JS Web ML Kit HTTP WebKit App Launcher
  • 18. API
  • 19. :4 HT CSS JS Web ML Kit HTTP onering.js WebKit App Launcher
  • 20. annoying
  • 21. :5 HT CSS JS Web ML Kit call function call back onering.js WebKit callback App Launcher
  • 22. 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")
  • 23. JavaScript onering.js ajax/pubsub App OS Backend
  • 24. C API DLL
  • 25. 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);
  • 26. Python Binding register_wsgi_app(appname, wsgiapp) loop(appname)
  • 27. QtWebKit
  • 28. 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);
  • 29. onering.js frame->addToJavaScriptWindowObject("_OneRing", jsapi) ONERING.Window.prototype.hide = function() {     return _OneRing.Window_hide(); }
  • 30. onering.js Is Served By An OneRing App onering://onering/onering.js
  • 31. 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;         } }
  • 32. Native GUI HTML5 Web OS RIA
  • 33. Native GUI HTML5 Web OS RIA OneRing
  • 34. Join US C++ / Qt / WebKit / Javascript / Python / Documenter / User / Tester / Code Reviewer http://code.google.com/p/onering-desktop/
  • 35. Thanks & Q & A http://www.douban.com/people/hongqn/ hongqn@douban.com twitter: @hongqn