Hi Tanya,

1) Are we really generating gadgets, though the wizard or generating JSONs?
(I personally don't like the former, as we have discussed before)

2) If we are generating, which files are dynamic generated Vs. which files
are copies? I think it should be possible to figure out by looking at files.

On Tue, Jun 7, 2016 at 5:41 AM, Tanya Madurapperuma <ta...@wso2.com> wrote:

> Hi all,
>
> During an offline discussion with Jerad following modification were
> suggested regarding the directory structure of the extension model. All
> these changes are subjected to js and css file locations.
>
> *Chart template structure*
>
> |── line-chart
>   │   ├── css
>   │   │   └── line-chart.css
>   │   └── js
>   │       ├── d3.min.js
>   │       ├── vega.js
>   │       └── VizGrammar.min.js
>    |── config.json
>   ├── api.js
>
>
> *Changes to the existing model*
>
>    - rename index.js to api.js
>    - rename chart-libs folder to js
>    - have a css folder in the same level
>
>
> *Generated gadget structure*
>
> └── test_gadget
> │       │       ├── conf.json
> │       │       ├── css
> │       │       │   └── line-chart.css
> │       │       ├── gadget-controller.jag
> │       │       ├── gadget.json
> │       │       ├── index.png
> │       │       ├── index.xml
> │       │       └── js
> │       │           ├── core
> │       │           │   ├── gadget-core.js
> │       │           │   ├── line-chart-api.js
> │       │           │   └── provider-api.js
> │       │           ├── d3.min.js
> │       │           ├── vega.js
> │       │           └── VizGrammar.min.js
>
>
> *Changes to the existing model*
>
>    - Instead of the *chart-libs* folder inside *js* folder, have a *core 
> *folder
>    inside *js *folder and place chart specific js files in js folder
>
>
> *Folder structure for storing common libs*
>
> portal
>       |── gadget-commons
>
>    ├── css
>    │   └── common.css
>    └── js
>        └── common.js
>
>
> *Changes to the existing model*
>
>    - Now we have common libs inside portal/libs/common-chart-libs/
>
> *chart config.json*
>
> "common": {
>         "js": ["common"],
>         "css": ["common"]
>     },
>     "chart": {
>         "js": ["d3.min", "vega", "VizGrammar.min"],
>         "css": ["line-chart"]
>     }
>
> *existing config.json*
>
> "common-libs" : ["wso2gadgets","chart-utils"],
> "chart-libs" : ["d3.min","vega","VizGrammar.min"]
>
> I think this model is cleaner and intuitive than the exiting model.
> AFAIK existing wizard is only used for IOT analytics. If there are no
> concerns from them shall we move to this new model?
>
> @ Suho, Dunith : WDYT ? Will this incur lot of changes from IOT side?
> Appreciate your input.
>
> Thanks,
> Tanya
>
> --
> Tanya Madurapperuma
>
> Senior Software Engineer,
> WSO2 Inc. : wso2.com
> Mobile : +94718184439
> Blog : http://tanyamadurapperuma.blogspot.com
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
With regards,
*Manu*ranga Perera.

phone : 071 7 70 20 50
mail : m...@wso2.com
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to