Open nukulb opened 12 years ago
What about our requirement to have URI based APIs?
If we do qnx.callExtensionMethod using the RPC module, we still need to use executeJavaScript for rpc to function correctly. If using that is fine, then it is just creating a reusable channel for webworks APIs
@rcruz @jeffheifetz - @bryanhiggins will be working on this soon.
@bryanhiggins here are the list of things that will have to be done -
@rcruz @jeffheifetz - have I missed anything?
Looks complete to me. There is an example of using the rpc channel in webplatform repo on the ui-elements branch under /framework/test/integration/rpc.
From: Nukul Bhasin [mailto:notifications@github.com] Sent: Tuesday, October 02, 2012 06:01 AM To: blackberry/BB10-WebWorks-Framework BB10-WebWorks-Framework@noreply.github.com Cc: Rowell Cruz Subject: Re: [BB10-WebWorks-Framework] Move all WebWorks APIs to qnx.callExtension method and away from URI and executeJavaScript (#271)
@rcruzhttps://github.com/rcruz @jeffheifetzhttps://github.com/jeffheifetz - @bryanhigginshttps://github.com/bryanhiggins will be working on this soon.
@bryanhigginshttps://github.com/bryanhiggins here are the list of things that will have to be done -
@rcruzhttps://github.com/rcruz @jeffheifetzhttps://github.com/jeffheifetz - have I missed anything?
— Reply to this email directly or view it on GitHubhttps://github.com/blackberry/BB10-WebWorks-Framework/issues/271#issuecomment-9066043.
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Most of the logic in lib/request and lib/server are related to faking an XHR request. In the new world these can likely be combined and much of the complicated logic can be removed. We no longer really need to mock requests and responses.
good point.
I've looked into this and came up with the following implementation plan. Given my limited exposure to the codebase, I would appreciate any feedback.
1. Expose qnx object on the client webview: - add _webviewObj.allowQnxObject = true to lib/webview.js 2. Publish RPC channel in controllerWebView.js - controller.publishRemoteFunction - "client.remoteFunctionCall" - args[0] = URI - args[1] = params - invoke action on default plugin or extension (logic from server.js) 3. Switch client from XHR to RPC call - in window-webworks.js update RemoteFunctionCall - use window.qnx.getController().remoteExec - handle make calls and getting extensions 4. Clean up request/response mocking - remove server.js - strip request.js down to just whitelisting - remove getURIPrefix from utils.js
Looks good Bryan. Additionally you'll want to run _webviewObj.allowRpc = true.
From: bryanhiggins [mailto:notifications@github.com] Sent: Wednesday, October 03, 2012 05:09 PM To: blackberry/BB10-WebWorks-Framework BB10-WebWorks-Framework@noreply.github.com Cc: Rowell Cruz Subject: Re: [BB10-WebWorks-Framework] Move all WebWorks APIs to qnx.callExtension method and away from URI and executeJavaScript (#271)
I've looked into this and came up with the following implementation plan. Given my limited exposure to the codebase, I would appreciate any feedback.
— Reply to this email directly or view it on GitHubhttps://github.com/blackberry/BB10-WebWorks-Framework/issues/271#issuecomment-9122291.
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Bryan
lib/server (in most cases) is invoked using the exec method which means it gets routed to lib/default. Removing lib/server means you will need to reorganize things to route there on your own. One interesting fact is that lib/default returns HTML based errors that may no longer make sense in a non-xhr world.
@cdelcol @rcruz @jeffheifetz @pagey
This is not a decision but a discussion forum right now.
Obviously changes will be all over but we should see a significant improvement. As we move to obvious
@jeffheifetz as we move to letting people create webview we will have to now or eventually allow people to setGeometery on it for animation.
@pagey is doing a sensors API and should see improvement
@rcruz - you might need to separate your RPC module after all.