+1 for the second approach.

On Thu, Sep 20, 2018 at 5:33 PM, Ruwini Wijesiri <ruw...@wso2.com> wrote:

> Hi All,
>
> The widget generation wizard enables user to create widgets by configuring
> a data source and publisher information.
>
> We have a requirement to enable user to create a autocomplete search bar
> using the widget generation wizard. The user will specify a column of the
> configured data source and the search bar will list down it's content. The
> value(s) selected using this widget will be published to its subscribers.
>
> There are 2 approaches to implement this;
>
> *1. Include the autocomplete in react-vizgrammar *
>
> *Drawbacks:*
>
>
>    - All components available in react-vizgrammar are charts, since an
>          autocomplete isn't a chart, putting it in react-vizgrammar seems 
> like a
>          misfit.
>          - The autocomplete is implemented using material-ui 1.5.0 and
>          this requires react 16.3.0 or above. Currently, react-vizgrammar is 
> on
>          react 16.0.0, therefore react versions needs to be bumped. An 
> upgrade may
>          cause issues in the existing implementation.
>
> *2. Generalize the implementation universal-widget and introduce 2 new
> modules to handle each type.*
>
>
>
> *-parent-renderer*
>
>
> *-vizgrammar-renderer**-search-renderer*
>
>
> Current implementation of universal widget can be refactored as above,
> where the '*parent-renderer*' will contain the implementations common to
> all widgets such as publisher configuration creation, '
> *vizgrammar-renderer*' contain implementation specific to rendering
> vizgrammar charts and '*search-renderer*' contain implementation specific
> to rendering the search bar.
>
>
> *Drawbacks:*
>
>
>    - Not backward compatible. The existing dashboards identifies the
>          widget generation wizard by the name universal widget. Renaming 
> universal
>          widget to '*parent-renderer' *will either require migration
>          scripts to replace term universal widget with '*vizgrammar-renderer'
>          or 'search-renderer' or this will need to be handled at dashboard 
> level.*
>
>
> I think its better to handle this at the dashboard level by making "
*UniversalWidget*" a reserved word and replacing it with
"*vizgrammar-renderer"
*in the Dashboard json before passing it to Golden Layout. So that
customers don't need to bother about any additional migration effort.

Thanks,
Tanya

> IMO i think the second approach would be better since;
>
>    - Adding an autocomplete select along with charts seems a misfit
>    - Scalable, can facilitate future introductions of other types of
>    widgets into the widget generation wizard.
>
>
> Any thoughts on these 2 approaches or any other approach is highly
> appreciated.
>
> Thanks,
> Regards,
> Ruwini
>
> Ruwini Wijesiri
> Software Engineer,
> WSO2 Inc.
>
> Mobile : +94716133480
>
> <http://wso2.com/signature>
>



-- 
*Tanya Madurapperuma* | Associate Technical Lead| WSO2 Inc.
(m) +94718184439 | (e) ta...@wso2.com

<http://wso2.com/signature>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to