-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
WIP Draft for new result format interface design #4313
base: master
Are you sure you want to change the base?
Conversation
Based on work in the ModernTimeline extension. https://github.com/ProfessionalWiki/ModernTimeline/tree/fe1ca3e2686752ab7e67f69586b4bfac0b91b459/src/ResultFacade No dedicated tests in this draft yet, though most code tested in ModernTimeline via integration and system tests.
this is somehting for @s7eph4n |
I like the approach. I am not sure though if I am a fan of that and-and-and-construct. One issue for me is that from their title it is not immediately obvious what those methods do. And generally, what's the advantage over just requiring four parameters? |
@s7eph4n this is a fluent interface which you'll have seen before in places such as PHPUnits mock builder. Positional parameter lists have the disadvantage that (a) they are positional, so swapping parameters breaks things and (b) they are not named so hard to understand without looking at the function definition. Also some advantages when dealing with optional parameter and adding new parameters. And some disadvantages in that the required parameters are less obvious. All the usual fluent interface + builder pattern stuff really. Naming can be changed and in the end how exactly the registry takes the info is an implementation detail. I'm much more interested in what info it takes. |
@mwjames thoughts? |
@mwjames It will be super cool if you could have a peep on this and comment. My general impression as a user is that result formats need kinda more love. This may be the way to .... |
Progress towards #125. This new interface will be an alternative to the existing one, not a replacement.
Based on work in the ModernTimeline extension.
No dedicated tests in this draft yet, though most code tested in
ModernTimeline via integration and system tests.
Design improvements over old ResultPrinter interface:
Example registration:
Example implementation:
TODO:
presentResult
PrintRequest
(global access and constructor parameters)