On Wed, Nov 3, 2010 at 18:12, Leandro Santiago <[email protected]>wrote:
> Hello to all. I've took a look on the rpcphp example to learn about the rpc
> mechanism in qooxdoo.
>
> My problem now is I need to use phprpc with the cakephp framework.
>
> With cakephp, which follow the MVC, each controller is mapped in a url, and
> its methods are also url. For example, the method
> NuController::listen($par1,$par2) has the url:
> http://site.com/project/nu/listen/par1/par2. Every class must be a valid
> and standardized name. But I can have controller methods without views, of
> course.
>
So it sounds like there is a CakePHP server that responds to requests from a
client based on these URLs. So the request is not JSON encoded (it's instead
encoded in the specific URL). How is the result returned? In what format? Is
it JSON or something else?
If you need or want to use CakePHP, then you probably do not want to use
RpcPHP. In fact, you don't likely want to use RPC at all, since that's a
JSON encoding of remote procedure calls, and you need something different.
I'd suggest that you look at the source code for qx.io.remote.Rpc which
makes extensive use of qx.io.remote.Request and associated classes, as the
underlying transport. Look at what Rpc does, and emulate that for whatever
format your server requires. Read up on qx.io.remote.Request and how it's
used. In fact, depending on how the results are returned by your server, it
may not even be necessary to write a replacement for Rpc, but rather use
Request directly from your code.
Derrell
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel