JSON+OSGi

OSGi联盟的主席Peter做了这么个小东西,原理非常的简单,在现在传统的使用ajax的方式多为通过js直接调用Spring中的bean,那么peter做的这个小东西就变成了js直接调用OSGi中的service,基本上没有什么难度,只是玩了一把ajax的东西,估计是peter以前对这块接触的少,peter把他做的这个东西放到他的Nokia E70上跑  .....
这是他对他那个demo的技术结构的图示:
webdemo.png
Sudoku Bundle是演示用的demo,webrpc Bundle就是可以拿来复用的bundle了,它引用了OSGi HttpService,同时在内部使用了JSON将返回给客户端的对象进行了转化。
在使用webrpc Bundle的情况下,js只需要发起这样的service的调用就可以了:
http://localhost/rpc/sudoku/newGame?0=simple
sudoku表示需要调用的service,newGame表示调用的service的方法,?后面的就是给方法的参数了。
感兴趣的话大家可以去OBR中下载这个Bundle:
http://bundles.osgi.org/Main/Repository?cmd=browse&keywords=webrpc&submit=search
或者去看看blog:
http://www.osgi.org/blog/2006/09/osgi-uis-and-web.html
或者直接看demo:
http://bundles.osgi.org/Main/Repository?cmd=browse&keywords=webrpc&submit=search
呵呵,正准备在自己的产品中引入ajax这块,不过我准备继续使用自己较为熟悉的dwr,dwr+OSGi

posted on 2006-09-27 16:19 BlueDavy 阅读(2595) 评论(1)  编辑  收藏 所属分类: OSGi、SOA、SCA

评论

# re: JSON+OSGi 2009-04-12 19:06 chichi

Hello all, please can I find an english or french translation to this article..I didn't understand anything! :)
lot of thanks  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 

公告

 









feedsky
抓虾
google reader
鲜果

导航

<2006年9月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

统计

随笔分类

随笔档案

文章档案

Blogger's

搜索

最新评论

阅读排行榜

评论排行榜