Re: [Architecture] Sharing common SPA components within and between product(s)

2018-08-13 Thread Kasun Thennakoon
Hi Pahan, I think the idea is to share the components across the organization and prevent repeating same code(DRY), For example, if another product needs to implement a login component for their SPA app they can reuse the login component[1] which we have used in API Manager product.But as

Re: [Architecture] Sharing common SPA components within and between product(s)

2018-01-07 Thread Tanya Madurapperuma
Hi Kasun, I have few questions regarding the initial problem and suggested approaches. 1. Does the components that you are referring here, shared among any other react apps other than APIM apps ? 2. Do we expect any third parties to use these common components (outside WSO2 such as

Re: [Architecture] Sharing common SPA components within and between product(s)

2018-01-05 Thread Lasantha Samarakoon
@Kasun: I think it is better to keep these common components under separate directory within carbon-apimgt repository instead of moving them into a separate repo. I hope these common components are used within the apps resides in carbon-apimgt. If that's so what will be the consequences of keeping

Re: [Architecture] Sharing common SPA components within and between product(s)

2018-01-05 Thread Kasun Thennakoon
Hi Jo, Thanks for sharing yes blog post, Yes it's true , that moving only the common code sections will solve the problem partially. So IMHO to make the code sharing more useful, we have to: - Implement CI/CD with Travis-CI/Jenkins - For code standard checks use ESLint (IMO it's better if

Re: [Architecture] Sharing common SPA components within and between product(s)

2018-01-04 Thread Joseph Fonseka
Hi If we want to share components among projects/teams a natural approach is to create a component library which is a common practice with organizations working with React. But having a component library creates a another set of problems and following medium post [1] has good explanation of them.

Re: [Architecture] Sharing common SPA components within and between product(s)

2018-01-04 Thread Menaka Jayawardena
Hi, We also faced this issue while working on the App manager component for the IOT Server. We had to reuse some of the components in App publisher and Store and this approach (creating a separate npm repository) was the solution we were also thinking. +1 for the idea. Thanks and Regards, Menaka

Re: [Architecture] Sharing common SPA components within and between product(s)

2018-01-04 Thread Kasun Thennakoon
Hi Manuranga, We could share packages within the carbon-apimgt repo with npm link as a local module but if someone outside carbon-apimgt needs to get the common JS files, they have to clone the whole carbon-apimgt repo and run npm link. And also I have noticed that the symbolic link created by

Re: [Architecture] Sharing common SPA components within and between product(s)

2018-01-03 Thread Manuranga Perera
It is also possible to link two npm projects without pushing to central repo, see https://docs.npmjs.com/cli/link On Thu, Jan 4, 2018 at 12:00 PM, Kasun Thennakoon wrote: > Hi all, > > In API Manager 3.0.0 we have mainly 3 SPA applications which are > Publisher[1], Store[2],

[Architecture] Sharing common SPA components within and between product(s)

2018-01-03 Thread Kasun Thennakoon
Hi all, In API Manager 3.0.0 we have mainly 3 SPA applications which are Publisher[1], Store[2], and Admin[3] apps. We have structured the SPA apps in a way that, an App consists of 2 main elements, Data models and React components. Data models are used to fetch data from REST APIs and