-
Notifications
You must be signed in to change notification settings - Fork 39
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
DOC:Best practices or Cases #237
Comments
Hey, I think we currently have noting from the project regarding best practices like where to apply the feature flags in the code or at which granularity. Regarding the SDKs, generally they should be working with frameworks of that language out of the box. |
Basically, everything @lukas-reining says! I would consider the current SDKs base/"low-level" SDKs. Removing if/elses and that kind of conditional logic is something I personally believe a lot of frameworks like the ones you mention are positioned well to handle, so instead of building our own, the goal is to build "framework SDKs" which use the base language SDK + $framework, for example:
A Spring SDK, etc would be a welcome addition, and probably would be relatively low effort as most framework SDKs are, since they can stand on the shoulders of the underlying language SDK (Java in that case). |
@beeme1mr @lukas-reining do you think we can make some documentation issue or something out of this? @freshchen certainly makes a good point, and though we are addressing it with things like the React SDK, Nest SDK, is there something more we should do? A blog post? Docs? Issues in GH maybe? |
Yes, I think we could create something like best practices, architecture styles and general recommendations. |
Yeah, that sounds good to me. I'll be out for a few days but if you could create a few issues, I can take a look when I get back. A best practices section would be very valuable in my opinion. |
@moredip's excellent article on Feature Flags can serve as a good starting point on what we should include: |
We currently maintain several getting started guides based on flagd [1]. And this section contains examples that use GO Gin [2] & Java spring boot [3] . However, as others have stated these are low-level SDK interactions where logic relies on if-else to perform conditional operations. When it comes to spring boot, its main focus is on configuring the runtime (along with other framework features). But the feature flags focus mainly on dynamic application logic which is different. With the current Java SDK and provider point of view, I am yet to see how a spring(or a gin integration) would look like other than for injecting a configured provider for business logic. [1] - https://openfeature.dev/docs/category/getting-started |
From @moredip's article, we could use routers to segregate different behavior based on flag value and execute a branch based on flag evaluation results. I've done it in the past to refactor complex flows and it was a great approach (turned out even better to clean up). I've sketched this in the past based on those ideas. It might be worth having a look |
Thanks for the answer. Searching for feature flag, I see almost all solutions. There is no more specific implementation case. My intuition tells me that the code will be filled with a lot of if else judgment logic of low-level SDK API, making the project difficult to read. And with what granularity to design the flag switch is very confusing. |
Thanks for the answer |
Hello, OpenFeatrue is very attractive, but it seems that it requires developers to hardcode a lot of if else, and I am not sure whether this will put a mental burden on developers. Are there any best practices or cases that you can provide? In addition, are there any plans to integrate with springboot, react, gin and other development frameworks in the future?
The text was updated successfully, but these errors were encountered: