[ 
https://issues.apache.org/jira/browse/SHINDIG-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620212#action_12620212
 ] 

Chris Chabot commented on SHINDIG-492:
--------------------------------------

Ah well i now understand where the confusion comes from.

The tabs, resizing etc are all gadget side feature libraries, they have no 
'container' code.That's why initially i thought you were talking about gadget 
features.. the /gadgets/rpc?c=1 bit is identical (and 'static') in both 
versions too, Take a look at any of the sample or live containers, and you'll 
see that exact same file being included everywhere.

The container only has the 'rpc' code, and the RPC mechanism hooks the gadget 
calls that require a container page action (such as setting a title, or 
resizing an iframe) to the container javascript (which isn't included in the 
features btw, you have to make that your self, see 
http://code.google.com/p/partuza/source/browse/trunk/html/js/container.js for 
an container sided example of these functionalities)

The negotiation is done purely on the gadget side, and is initiated by the 
gadget <Require feature="foo> xml statements, and then the feature dependencies 
(and the core* features) are added to that set, and a JavaScript blob is 
generated  from that dependency graph.

Both java and php use the same feature libraries, the same physical files, and 
parse them with exactly the same logic (else there would be some 
inconsistencies between the two implementations), and their completely 
identical in what they do and support.

If you want to know exactly how this works i'd suggest taking a look at the 
following files <shindig/php/>:
./src/gadgets/FeatureSpec.php
./src/gadgets/GadgetFeature.php
./src/gadgets/GadgetFeatureFactory.php
./src/gadgets/GadgetFeatureRegistry.php
./src/gadgets/JsFeatureLoader.php
./src/gadgets/JsLibraryFeatureFactory.php

I'm afraid either you looked at the ning contributed old PHP code (that was 
removed once we got the 'real' php implementation since it was more a proof of 
concept then a gadget server implementation), or your confusing the generic 
feature dep chain resolving with 'container side code', in which case it is 
still present in both versions.

Anyhow, as i stated a few times before, both implementations are completely 
identical in their functioning, believe me i know since i wrote all of the php 
code involved, and the source is there if you want to check how it works... so 
lets close this long thread before we over-spam the mailing list :)

> Config option "container_config" is ignored
> -------------------------------------------
>
>                 Key: SHINDIG-492
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-492
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (PHP)
>            Reporter: Artemy Tregubenko
>            Assignee: Chris Chabot
>            Priority: Minor
>
> Config file has option "container_config", which allows to use some other 
> config file instead of container.js. However when GadgetContext creates 
> ContainerConfig instance in instanceContainerConfig method, it uses 
> "container_path" option for initialization, thus javascript options are 
> always loaded from /shindig/config/container.js file. This file can be 
> overwritten during shindig update, thus it's not a good idea to customize it, 
> so there's no good way to customize javascript options. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to