-
Notifications
You must be signed in to change notification settings - Fork 119
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
Structural output of domain layer #1728
Labels
Comments
jan-goral
changed the title
Design structural output for domain layer
Structural output from domain layer
Apr 22, 2021
jan-goral
changed the title
Structural output from domain layer
Structural output of domain layer
Apr 22, 2021
This was referenced Apr 26, 2021
This was referenced Apr 26, 2021
The commands grouped difficulty. Simple
Average
Dragon
|
This was referenced May 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Currently, flank is putting all output data directly to console, which is useful for command-line but not for different
types of UI like the desktop.
Goal
API
Steps
Output
interfacecli
command.logLn
occurrences without
function callHint
For step 2. If you have to add a new type that can be identified in the presentation layer as something that should be converted to the console log and you also have to decide where to place it, you can follow the rules:
Example
Based on
ListAndroidOrientations
Step 1
List<Orientation>
- test_runner/src/main/kotlin/ftl/domain/ListAndroidOrientations.kt#L16Step 2
List<Orientation>
is a generic type that is losing parameter type info in runtime, so it's necessary to create awrapping structure that could be resolved by type matching.
Add
Orientaton.Available
structure for representing list available orientations the specific platformStep 3
Extend using the
Output
interface.Step 4
Add out implementation to
AndroidOrientationsListCommand
Step 5
Replace
logLn
without
callStep 6
Consider the proper package for API structures to console output formatters - #1872
If issue #1872 isn't finished yet, place the formatters where you wish. This will be taken into account or refactored further.
Utils
The text was updated successfully, but these errors were encountered: