[Feature Suggestion] Sort Markets #73
MohammadSianaki
started this conversation in
Ideas
Replies: 1 comment
-
@MohammadSianaki Great idea! Do you like to work on this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I suggest the addition of a sorting feature, allowing users to arrange markets either by price or by name, in both ascending and descending order. This enhancement would greatly improve the user experience.
Technical Considerations:
Strategy Design Pattern: We can utilize the Strategy design pattern, where each sorting strategy (e.g., by price, by name) is encapsulated in its own class. These sorting strategy classes should adhere to a common interface, allowing easy integration into the sorting system.
Pluggable Architecture: Design the sorting system to be pluggable, allowing new sorting strategies to be added as separate modules without touching the core sorting logic. This promotes the idea of extending the system without modifying existing code.
Unit Testing: Ensure that each sorting strategy is independently testable. Write unit tests for each strategy to validate their correctness. This will prevent regressions when new strategies are added.
Beta Was this translation helpful? Give feedback.
All reactions