-
Notifications
You must be signed in to change notification settings - Fork 57
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
docs: [FC-0074] add comparison table between the framework and forking openedx #617
Conversation
Thanks for the pull request, @mariajgrimaldi! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
| **Disadvantages** | - Can increase complexity in debugging and maintenance because it adds more processing layers. | - Separation from the core makes long-term maintenance challenging. | | ||
| | - Limited by existing events and filters available in the Open edX ecosystem. | - High maintenance burden for upgrades and compatibility. | | ||
| | - Might increase complexity in plugins for highly customized features. | - Requires deep understanding of the platform to modify it correctly. | | ||
| | - Might introduce an edx-platform dependency into plugins, mainly when using filters. | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might introduce an edx-platform dependency into plugins, mainly when using filters.
What does this mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When implementing new features in plugins, even though you could be using an extension point which provides enough data about what's being extended, e.g., the enrollment filter provides the user
, course_key
, and enrollment mode
, we might want to perform operations with the data like getting the course overview
object that inevitably results in importing edx-platform code into the plugin. This is an antipattern, and it's strongly not recommended, but there's no current alternative for doing that kind of operation (this might be solved by learning core in the long term). Is this too specific to add here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this sound as a summary / a little bit more detail & clarity?
| | - Might introduce an edx-platform dependency into plugins, mainly when using filters. | | | |
| | - Although it is not recommended to do so, a plugin might introduce an edx-platform dependency, mainly when using filters, when there is no alternative for getting certain types of data. | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Thank you. I implemented the suggestion here: d4266da
| | - Easier to maintain long-term due to backward compatibility and versioning policies. | | | ||
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Disadvantages** | - Can increase complexity in debugging and maintenance because it adds more processing layers. | - Separation from the core makes long-term maintenance challenging. | | ||
| | - Limited by existing events and filters available in the Open edX ecosystem. | - High maintenance burden for upgrades and compatibility. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a note that it is possible to add additional events/filters into the upstream?
| | - Might increase complexity in plugins for highly customized features. | - Requires deep understanding of the platform to modify it correctly. | | ||
| | - Might introduce an edx-platform dependency into plugins, mainly when using filters. | | | ||
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Performance Impact** | Medium to high, as events and filters execute within the caller process. Although events are designed so | High, as changes directly impact the Open edX platform (edx-platform or other IDAs) and may require additional testing, monitoring,| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what "high" impact means - does this mean that performance will be worse no matter which you choose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmm. I think both the framework and forking could behave similarly under this category cause this mainly depends on how performant the solution is, which could be directly embedded into the code or extended using a plugin. I do think we could get more performant code by implementing more contained solutions through extension points, but that doesn't necessarily mean that choosing this approach improves performance.
I will remove this row and move the it may require additional testing... from the fork column to the implementation effort row.
| **Performance Impact** | Medium to high, as events and filters execute within the caller process. Although events are designed so | High, as changes directly impact the Open edX platform (edx-platform or other IDAs) and may require additional testing, monitoring,| | ||
| | receivers can trigger asynchronous tasks for improved performance. | and performance considerations of new added code and for the integration itself. | | ||
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Community Compatibility** | High, as the community encourage reusable implementations and the contribution of new extension points. | Low, as changes in forks are usually highly customized not designed for others to reuse. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Community Compatibility** | High, as the community encourage reusable implementations and the contribution of new extension points. | Low, as changes in forks are usually highly customized not designed for others to reuse. | | |
| **Community Compatibility** | High, as the community encourages reusable implementations and the contribution of new extension points. | Low, as changes in forks are usually highly customized and not designed for others to reuse. | |
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Community Compatibility** | High, as the community encourage reusable implementations and the contribution of new extension points. | Low, as changes in forks are usually highly customized not designed for others to reuse. | | ||
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Implementation Effort** | Low to medium, depending on the complexity of the receiver logic and filter pipelines. | High, as modifications require expertise in the platform and increase technical debt. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Implementation Effort** | Low to medium, depending on the complexity of the receiver logic and filter pipelines. | High, as modifications require expertise in the platform and increase technical debt. | | |
| **Implementation Effort** | Low to medium, depending on the complexity of the receiver logic and filter pipelines. | High, as modifications require expertise in the platform and increases technical debt. | |
9942b58
to
b8d7719
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a table of pros and cons is difficult as it is very opinionated. I do think the information within is very accurate. And I commend the work put into this.
Left some comments that reflect my opinion in specific lines. None of them are blocking.
The Framework vs Forking the Open edX Platform | ||
********************************************** | ||
|
||
The Hooks Extension Framework is designed to provide a stable and maintainable way to extend the Open edX platform without modifying its core. This approach is in contrast to forking the platform, which involves creating a separate version that diverges from the core codebase. Here is a comparison table of the two approaches: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach is in contrast to forking -> sounds a bit weird to me.
How about: This approach stands in opposition to the practice of forking ... ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds better, yes. Thank you!
| | **Open edX Events and Filters** | **Forking** | | ||
+====================================================================+===============================================================================================================+====================================================================================================================================+ | ||
| **Purpose** | Allow extending functionality of the Open edX platform without modifying the | Modify the code directly to meet specific needs. | | ||
| | core codebase but by leveraging plugins and configurations. | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | core codebase but by leveraging plugins and configurations. | | | |
| | core codebase by leveraging plugins and configurations. | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I completely missed that.
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Advantages** | - More decoupled implementations. | - Full control of the platform behavior. | | ||
| | - Decreased maintenance burden of the platform, maintenance efforts are centered on plugins. | - No restrictions from what can be changed. | | ||
| | - Enables reusable and configurable behavior across the platform. | - Suitable for highly customized use cases. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | - Enables reusable and configurable behavior across the platform. | - Suitable for highly customized use cases. | | |
| | - Enables reusable and configurable behavior across the platform. | - Suitable for extremely customized use cases. | |
I think that hooks framework already allows for high customization. IMHO the modification must be extreme to warrant forking where hooks can do it. The more regular reason is when the platform does not support hooks in the place you want to customize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another point in this line would be:
Enables reusable and configurable behavior across the platform
I think is worth splitting in two:
- Enables reusable behavior across the ecosystem and community.
- Enables configurable behavior across the platform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that hooks framework already allows for high customization. IMHO the modification must be extreme to warrant forking where hooks can do it. The more regular reason is when the platform does not support hooks in the place you want to customize.
I agree. I added a note suggesting to look into how the framework can help before forking: 67bd6f7#diff-01d0bcd5d9113aaa8a7f3fde94c7e5ca100265eebebbad867dbf4de21123d451R193
I also split the sentence you mentioned into two for more clarity: 67bd6f7#diff-01d0bcd5d9113aaa8a7f3fde94c7e5ca100265eebebbad867dbf4de21123d451R172-R173
| | - Enables reusable and configurable behavior across the platform. | - Suitable for highly customized use cases. | | ||
| | - Easier to maintain long-term due to backward compatibility and versioning policies. | | | ||
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Disadvantages** | - Can increase complexity in debugging and maintenance because it adds more processing layers. | - Separation from the core makes long-term maintenance challenging. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should call it "separation from the upstream project" because core has a different meaning here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's more clear. Thank you.
67bd6f7#diff-01d0bcd5d9113aaa8a7f3fde94c7e5ca100265eebebbad867dbf4de21123d451R177
| **Disadvantages** | - Can increase complexity in debugging and maintenance because it adds more processing layers. | - Separation from the core makes long-term maintenance challenging. | | ||
| | - Limited by existing events and filters available in the Open edX ecosystem, although new events and | - High maintenance burden for upgrades and compatibility. | | ||
| | filters can be proposed and added to the framework. | - Requires manual integration with the Open edX platform for each new release. | | ||
| | - Might increase complexity in plugins for highly customized features. | - Requires deep understanding of the platform to modify it correctly. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires deep understanding of the platform to modify it correctly
I would argue that modifying correctly means using the open-closed principle which is not being used if the road was a fork.
I would list however the "not being able to reuse by the community" as part of the disadvantages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aso a disadvantage of fork:
- difficult to test in isolation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue that modifying correctly means using the open-closed principle which is not being used if the road was a fork.
I removed the "correctly" from the sentence. I do think that to modify the platform, you need a deep understanding of the components you'd be modifying, mainly because of the implications of the changes. But one can argue that you'd need the same to add new extension points, so I'll drop the line altogether.
I would list however the "not being able to reuse by the community" as part of the disadvantages.
Added! Thanks 67bd6f7#diff-01d0bcd5d9113aaa8a7f3fde94c7e5ca100265eebebbad867dbf4de21123d451R181
| | - Although it is not recommended to do so, a plugin developer might introduce an edx-platform dependency, | | | ||
| | mainly when using filters, when there is no alternative for getting certain types of data. | | | ||
+--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| **Community Compatibility** | High, as the community encourages reusable implementations and the contribution of new extension points. | Low, as changes in forks are usually highly customized not designed for others to reuse. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Low, as changes in forks are usually highly customized not designed for others to reuse.
And discoverability is low. Most probably no one will ever know "you did that".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a note about discoverability here: 67bd6f7#diff-01d0bcd5d9113aaa8a7f3fde94c7e5ca100265eebebbad867dbf4de21123d451R185
* Address wording suggestion "in contrast of forking" * Remove extra but * Change high -> extreme to suggest that only extreme cases should warrant a fork for new features / behaviors * Split sentence reusable / configurable into two * Remove "correctly" from deep understanding sentence * Add test disadvantage for fork * Add test advantage for fork * Add discoverability note * Suggest looking into the framework before forking
@felipemontoya @sarina: thank you for the review! Felipe, I think I addressed all of your comments with these two commits: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing all the comments. Lgtm
Thank you all! @sarina: merge when you're ready :) |
Description
This PR adds a comparison table between extending the platform using events/filters and modifying it directly in a fork.