qlik-demo-team / qdt-components

React Components to be used with Angular 10, React 16 and Vue 2. Connects with the Capability API and Engine API.
MIT License
92 stars 50 forks source link

Extending qdt-components #60

Closed robcastle closed 4 years ago

robcastle commented 5 years ago

I'm looking for design advice related to extending qdt-components. I want to use the same pattern that qdt-components uses to get data for QdtPicasso (i.e. withHyperCube class), but I want to substitute my own charting library instead of picassso. My question is what is the best way to achieve my objective. Should I inherit from QdtPicasso or should I copy the QdtPicasso code into my project without inheriting or should I make a copy of qdt-components and put my extension code in there.

Or is there too much picasso specific code in withHyperCube to accomplish this without rewriting withHyperCube significantly

fkabinoff commented 5 years ago

So the idea behind withHypercube is that it can be used seperate of QdtPicasso. It's setup to handle updates and pagination. I tried to make it generic but I cant guarantee it'll be a perfect fit for all use cases. But my suggestion would definitely be to implement withHypercube in your own component. It's not exposed on the exported class, so you'd either have to fork and add a component to qdt-components (submit a pr if you do id be interested), or create a PR to expose withHypercube if you want and create a component outside of qdt-components. Sorry replying quickly on mobile device, hope that all makes sense.

On Wed, Feb 20, 2019, 10:25 AM robcastle notifications@github.com wrote:

I'm looking for design advice related to extending qdt-components. I want to use the same pattern that qdt-components uses to get data for QdtPicasso (i.e. withHyperCube class), but I want to substitute my own charting library instead of picassso. My question is what is the best way to achieve my objective. Should I inherit from QdtPicasso or should I copy the QdtPicasso code into my project without inheriting or should I make a copy of qdt-components and put my extension code in there.

Or is there too much picasso specific code in withHyperCube to accomplish this without rewriting withHyperCube significantly

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/qlik-demo-team/qdt-components/issues/60, or mute the thread https://github.com/notifications/unsubscribe-auth/AFaVA48MPeI4VmnQHWsXHxw9ZhiIQXEAks5vPWjtgaJpZM4bFeLI .

alangrn commented 5 years ago

I have used the above implementation and use fusionCharts as my charting library so it will work with a third party library.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Francis Kabinoff notifications@github.com Sent: Wednesday, February 20, 2019 3:41:33 PM To: qlik-demo-team/qdt-components Cc: Subscribed Subject: Re: [qlik-demo-team/qdt-components] Extending qdt-components (#60)

So the idea behind withHypercube is that it can be used seperate of QdtPicasso. It's setup to handle updates and pagination. I tried to make it generic but I cant guarantee it'll be a perfect fit for all use cases. But my suggestion would definitely be to implement withHypercube in your own component. It's not exposed on the exported class, so you'd either have to fork and add a component to qdt-components (submit a pr if you do id be interested), or create a PR to expose withHypercube if you want and create a component outside of qdt-components. Sorry replying quickly on mobile device, hope that all makes sense.

On Wed, Feb 20, 2019, 10:25 AM robcastle notifications@github.com wrote:

I'm looking for design advice related to extending qdt-components. I want to use the same pattern that qdt-components uses to get data for QdtPicasso (i.e. withHyperCube class), but I want to substitute my own charting library instead of picassso. My question is what is the best way to achieve my objective. Should I inherit from QdtPicasso or should I copy the QdtPicasso code into my project without inheriting or should I make a copy of qdt-components and put my extension code in there.

Or is there too much picasso specific code in withHyperCube to accomplish this without rewriting withHyperCube significantly

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/qlik-demo-team/qdt-components/issues/60, or mute the thread https://github.com/notifications/unsubscribe-auth/AFaVA48MPeI4VmnQHWsXHxw9ZhiIQXEAks5vPWjtgaJpZM4bFeLI .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fqlik-demo-team%2Fqdt-components%2Fissues%2F60%23issuecomment-465630704&data=02%7C01%7C%7C6151c3ecd15149d6f03b08d69749e543%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636862740962536842&sdata=nzuGuEW7V3iFp%2FkW6g3qlWEsHvwg3dwe3HWSAkLgmng%3D&reserved=0, or mute the threadhttps://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAG_pKTLlP_L9i5A2iVE5nQib68hSwjHYks5vPWytgaJpZM4bFeLI&data=02%7C01%7C%7C6151c3ecd15149d6f03b08d69749e543%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636862740962546853&sdata=G89OQf5mQz6%2BRp6TMOPcI8yE2192YdX7qORPOAhOXKs%3D&reserved=0.