Hi everybody,

happy to report that the RpcNode json-rpc server based on node.js is
starting to work more or less stable. Of course, it is far from being
production-ready, that's why I don't make a release yet. 

But what really excites me is that I beginning to see the qooxdoo toolchain
cross the client-server divide. I have generated an API-Viewer app that
displays both the client and the server files:

http://cboulanger.users.sourceforge.net/qooxdoo-contrib/RpcNode/trunk/api/#rpcnode.demo.service.RpcTest

As you can see, the RpcNode demo is a qooxdoo application that inherits from
the RpcConsole (which I have showcased in my previous email). The demo
contains a "service" folder, in which the server-side rpc classes are
located. In addition, the server, an interface for service classes and an
exception class are on the server-side. They are normal qooxdoo classes with
all the bells and whistles of the oo-system and the doc-comments for the
API-Viewer. For example, here is the qooxdoo rpc test suite that is also
used in the RpcPhp contribution: 

http://qooxdoo-contrib.svn.sourceforge.net/viewvc/qooxdoo-contrib/trunk/qooxdoo-contrib/RpcNode/trunk/demo/default/source/class/rpcnode/demo/service/RpcTest.js?revision=20633&view=markup

Since nodes.js is a one-threaded, event-driven server, special care has to
be taken to make the rpc methods non-blocking. As you can see in the second
rpc class:

http://qooxdoo-contrib.svn.sourceforge.net/viewvc/qooxdoo-contrib/trunk/qooxdoo-contrib/RpcNode/trunk/demo/default/source/class/rpcnode/demo/service/NodeTest.js?revision=20633&view=markup

I am using the node-promise library which works with the concepts of
Promises/Deferred Results which works perfectly with the async nature of
node.js. I have already opened an enhancement request
(http://bugzilla.qooxdoo.org/show_bug.cgi?id=3999) to port the library to
qooxdoo.

Maybe it would be a good idea if the API viewer could have special icons for
server-side files or one could find a special name convention to be able to
easily differentiate the classes on the client and the server, although
there also might be classes (like those in qx-oo) which are used on both
sides of the wire. 

So much for today, hope you enjoy this!

C. 

-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/RpcNode-taking-shape-API-Viewer-for-server-classes-tp5424073p5424073.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to