Add enhanced API for Drules with dynamic fact management and action chaining#9
Add enhanced API for Drules with dynamic fact management and action chaining#9kasutu wants to merge 4 commits intodizitart:mainfrom
Conversation
There was a problem hiding this comment.
It would be prudent to mention this new feature at the very top of the README file also, where it defines what is drules. Also append the Feature section with the new features and similarly append the Usage section and add your fluent api usage there. My suggestion here would be to properly integrate the documentation of your changes into the existing sections and add new section if required.
There was a problem hiding this comment.
Could you please add tests for remaining logical operators, edge cases and error scenarios as well?
There was a problem hiding this comment.
Could you please change the file name to something like - fluent_api.dart?
| /// - Action chaining support | ||
| /// - First match policy per action key | ||
| /// - Easy dependency injection integration | ||
| class Drules { |
There was a problem hiding this comment.
Can we not integrate this fluent api into the existing RuleEngine class and leverage features like activation event subscription etc.?
There was a problem hiding this comment.
Change this file name accordingly with the new name of the file drules_enhanced.dart.
|
First of all many thanks for your first contribution and the time you have taken. Your api looks elegant and well documented. Please work on the above suggestions to make your changes more integrated with the existing api. Here are few more additional improvement suggestion to make it more robust and extensible. This include the changes in existing code also. If you want, you may address this in a separate PR(s) as well. Action Results & Error Handling
class ActionResult {
final String? actionKey;
// ...rest
}
Type Safety & Null Handling
Immutability Option
Extensibility
Testing Enhancements
Documentation & Examples
Performance
Resource Management
Edge Case Handling
|
|
There are tests failures. Please resolve those issues as well. |
|
Thanks for the review much appreciated! |
Introduce an enhanced API for Drules that supports dynamic fact management and action chaining, along with integration tests to validate various rule evaluations. This update enhances the OOP-friendliness and type safety of the API, making it suitable for modern Dart and Flutter applications.
closes #8