Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Issue 1721042: Gadget-and-container JS framework (part 2) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 10 months ago by mhermanto
Modified:
15 years, 9 months ago
Reviewers:
Paul Lindner, dev-remailer
Base URL:
http://svn.apache.org/repos/asf/shindig/trunk/
Visibility:
Public.

Description

Shindig issue filed: https://issues.apache.org/jira/browse/SHINDIG-1369

Patch Set 1 : Updated patch. #

Patch Set 2 : Updated patch 2. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -93 lines) Patch
features/src/main/javascript/features/container/container.js View 1 12 chunks +29 lines, -36 lines 0 comments Download
features/src/main/javascript/features/container/gadget_holder.js View 5 chunks +14 lines, -6 lines 0 comments Download
features/src/main/javascript/features/container/gadget_site.js View 1 6 chunks +13 lines, -10 lines 0 comments Download
features/src/main/javascript/features/container/init.js View 1 3 chunks +13 lines, -9 lines 0 comments Download
features/src/main/javascript/features/container/service.js View 1 4 chunks +121 lines, -14 lines 0 comments Download
features/src/main/javascript/features/container/util.js View 3 chunks +5 lines, -18 lines 0 comments Download

Messages

Total messages: 9
mhermanto
Updated patch.
15 years, 10 months ago (2010-06-16 23:11:53 UTC) #1
Paul Lindner
The osapi endpoints should auto configure when we have the GadgetsHandler installed. Not sure if ...
15 years, 10 months ago (2010-06-17 00:57:47 UTC) #2
mhermanto
I don't follow. What do you mean by auto-configure? Please elaborate. On Wed, Jun 16, ...
15 years, 10 months ago (2010-06-17 01:23:19 UTC) #3
Paul Lindner
gadgets.config code is working now for container javascript. At the end of this request: http://localhost:8080/gadgets/js/osapi.js?c=1 ...
15 years, 10 months ago (2010-06-17 01:27:42 UTC) #4
mhermanto
Ok. Neat way to register OSAPI methods. I have something working, but I will update ...
15 years, 10 months ago (2010-06-17 20:58:20 UTC) #5
mhermanto
Thinking back on why we had our own implementation of OSAPI is because we want ...
15 years, 10 months ago (2010-06-17 22:10:14 UTC) #6
Paul Lindner
The default osapi feature pulls in jsonrpctransport and gadgetsrpctransport. I assume that #1 is json-rpc ...
15 years, 10 months ago (2010-06-17 22:55:16 UTC) #7
mhermanto
Updated patch 2.
15 years, 10 months ago (2010-06-18 01:25:48 UTC) #8
mhermanto
15 years, 10 months ago (2010-06-18 01:27:59 UTC) #9
On Thu, Jun 17, 2010 at 3:55 PM, Paul Lindner <lindner@inuus.com> wrote:

> The default osapi feature pulls in jsonrpctransport and
> gadgetsrpctransport.
>
> I assume that #1 is json-rpc and #2 and #3 use gadgets.rpc to communicate
> with an iframe and/or parent.
>
> Yes, and yes.


> There's also a third possibility -- jsonp.  I haven't written that
> transport yet...  Also, for #1 you can also use CORS if you're running on
> different domains..
>

I've maintained a simple caching for gadgets metadata, in service.js,
despite no caching mechanism in osapi. This is needed for gadgets
preloading, via container.preloadGadgets() and site.navigateTo().

I've re-uploaded a new patch. Hopefully, it addressed what you meant. Please
re-review. Thanks!


> On Thu, Jun 17, 2010 at 3:10 PM, Michael Hermanto <mhermanto@gmail.com>wrote:
>
>> Thinking back on why we had our own implementation of OSAPI is because we
>> want to support different transports, depending on the setup in which the
>> request is made:
>> 1) first-party mode, container host == api host, where we just call
>> gadgest.io.makeNonProxiedRequest().
>> 2) 3rd party mode, otherwise, where we create a separate/invisible iframe
>> to allow cross-domain XHR.
>> 3) parent mode. I only saw this in comment.
>>
>> Do we already support handling for these different setups, in OSAPI, to
>> make successful XHR calls?
>>
>>
>> On Thu, Jun 17, 2010 at 1:52 PM, Michael Hermanto <mhermanto@gmail.com>wrote:
>>
>>> Ok. Neat way to register OSAPI methods. I have something working, but I
>>> will update the code review when it's ready. Will let you know. Thanks Paul.
>>>
>>>
>>> On Wed, Jun 16, 2010 at 6:27 PM, Paul Lindner <lindner@inuus.com> wrote:
>>>
>>>> gadgets.config code is working now for container javascript.  At the end
>>>> of this request:
>>>>
>>>> http://localhost:8080/gadgets/js/osapi.js?c=1
>>>>
>>>> You have osapi.services and gadgets.metadata
>>>>
>>>>
>>>> gadgets.config.init(
>>>> {"shindig.auth":{"authToken":"-1:-1:*::*:0:default"},
>>>>  "osapi":{"endPoints":["http://%host%/rpc"]},
>>>> "osapi.services":{"gadgets.rpc":["container.listMethods"],"http://
>>>>
%host%/rpc":["samplecontainer.update","activities.supportedFields","activities.update","activities.delete","gadgets.metadata","activities.get","http.put","activitystreams.create","messages.modify","appdata.get","messages.get","system.listMethods","cache.invalidate","samplecontainer.get","people.supportedFields","http.head","http.delete","messages.create","people.get","activitystreams.get","activitystreams.update","messages.delete","appdata.update","http.post","activities.create","samplecontainer.create","http.get","appdata.delete","appdata.create","activitystreams.delete","gadgets.supportedFields","activitystreams.supportedFields"]},
>>>>
>>>>
"rpc":{"parentRelayUrl":"/container/rpc_relay.html","useLegacyProtocol":false},
>>>> "core.io
>>>>
":{"proxyUrl":"//%host%/gadgets/proxy?container=default&refresh=%refresh%&url=%url%%rewriteMime%","jsonProxyUrl":"//%host%/gadgets/makeRequest"}});
>>>>
>>>>
>>>>
>>>> On Wed, Jun 16, 2010 at 6:23 PM, Michael Hermanto
<mhermanto@gmail.com>wrote:
>>>>
>>>>> I don't follow. What do you mean by auto-configure? Please elaborate.
>>>>>
>>>>>
>>>>> On Wed, Jun 16, 2010 at 5:57 PM, <lindner@inuus.com> wrote:
>>>>>
>>>>>> The osapi endpoints should auto configure when we have the
>>>>>> GadgetsHandler installed.  Not sure if that means some of the osapi
>>>>>> code
>>>>>> can be removed...
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://codereview.appspot.com/1721042/show
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b