-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DISCUSSION][Tech Debt] - Fully Dynamic and Scalable Segment Integration #17
Comments
Just made PR#18 to work around this, Please check and test. I've tested it and I hope you'll be interested. @danielgomezrico |
Thanks for the suggestion, I will open ideas in threads:
It worries to me that we need to keep all of them in sync, and also how we serialize that we send to each platform so each one could use an enum and not just a string and maybe have some human errors because of that |
Another question:
|
|
That's the thing, Im not sure whats the best way to have an Do you have any other flutter library as an example that accepts enums and translate them on each platform? Just to have a reference? |
@danielgomezrico I have no reference to it. This is just to simplify the existing implementation. Because the current implementation causes more boilerplate and is not really needed. |
It is not that easy to merge a breaking change At this moment because there are other PRs adding more integrations, and then they will break because of this change, like this one: We can take advantage that we have more integrations to see if having multiple of them this change does remove boilerplate or not, WDYT? |
I think we don't need to worry about the breaking changes, those PR should be refactored after PR #18 merged. We need improvement before we are going further. Anw, I've been using this branch with regards to new integrations and availability of other providers https://github.com/sribuu/flutter-segment/tree/sribuu-crm. |
To continue the conversation, I found one integration that requires more information than just a enabled/disabled status to be enabled: let optlyLogger = OPTLYLoggerDefault(logLevel: .error)
optlyManager = OPTLYManager.instance(builderBlock: { (builder) in
builder?.projectId = "<YOUR_PROJECT_ID>"
builder?.logger = optlyLogger
})
optlyManager?.initialize(callback: { (error, optlyClient) in
// Optimizely is now up and running. You can now configure any experiments, etc.
})
configuration.use(SEGOptimizelyXIntegrationFactory.instance(withOptimizely: optlyManager)) Docs: https://cocoapods.org/pods/Segment-Optimizely-X It says to me that moving towards this approach will not cover all the cases, and maybe we should have something like a |
@ariefwijaya what you are currently proposing from the engineering and architecture point of view is a really good and interesting stuff, it's really good to have such interesting contributions. Still has some nuts to tighten but it's indeed a really starting point to take into consideration. |
Agreed, that one is not the only one. Those are more integration that requires more information than just enabled/disabled status. So, yes we need to have a config class for each integrations as I said before for e.g
Then, we need to have an abstract configuration class to extend for every plugin that needs it |
Thanks @cdmunoz, for thoughtful feedback. I agreed with you, we need to consider more for this big change |
@ariefwijaya Hi, I've resigned from this organization. Could you please remove my name from the description? 😉 👍 I'm clearing out my desk. |
Hello, @danielgomezrico @pastuxso
just brainstorming, why don't we use this Integration Attribute as an array of enumeration or object list? It will be more clean, scalable and avoid breaking changes. I mean like, instead of using
amplitudeIntegrationEnabled
,mixpanelIntegrationEnabled
. We can try usingintegrationList : [IntegrationType.mixpanel, IntegrationType.amplitude]
or even use an object listintegrationList : [AmplitudeIntegrationClass(enabled:true,param1:"value",param2:"value"),...]
wdyt all?
The text was updated successfully, but these errors were encountered: