You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation for dynamics/rules +tracks is tedious and requires the app developer to modify several files and duplicate logic both frontend and backend. This does not scale.
A proposed solution here has been to use a DSL (domain specific language) that will simplify these statements and making it reusable both backend and frontend.
This issue is used to document thoughts and questions that arise during the workshop.
Painpoints
Duplication of logic frontend + backend
Logic spread out over several files + locations
Data in hidden fields are sent with the xml data
validation - is the field hidden?
Considerations
Intellisense on dynamic statements
Overview of dynamics
In scope
Find suitable syntax (or reuse) that can solve our needs for dynamics/calculation independent of javascript + c#
Can be used for trakcs (at page level)
Document architectural choice
Identify challenges that needs to be solved
POC
Out of scope
Additional Information
A possible candidate that has been mentioned is DMN FEEL (friendly enough expression language). This has libraries to evaluate such statements, a simple example is js-feel (no longer considered a viable option)
Relevant default functions we support must be supported in both c# and javascript. This enables us to generate lists of hidden fields for validation + remove "dead" form data that is hidden when the user submits.
This will enable us to both run dynamics trivially on the frontend + backend to solve the mentioned painpoints, as well as solving the maintainability hell illustrated in the picture below:
For the app developer, this will now look something like this (things might change):
This is also easier to both read and understand, and you have a clear understanding of when this field is hidden just by looking at one single file.
For more complex functions not covered by our default functions we can also reuse the concept of shadowFields that are being worked on in the other workshop track. Simply do the necessary logic backend and store if a given field should be hidden as a shadow field. Then setup hidden with a simple boolean check against the given shadow field.
Questions for the way forward
Backward compability for the existing features?
CalculatePageOrder
Current dynamics
Setting up dynamics the old way in studio
New major version?
Thoughts
When should dynamics for layouts run?
Alt 1: at the same time as components, then update layoutOrder and hidden fields
Alt 2: components are run as is, but layouts have their own trigger (maybe at nextPage?)
Seems to cause issues, we need to have a single point of truth in our global state for prev for instance.
Seems to be just easier to run these at the same time and update states accordingly.
Tasks
App frontend
Oppsett for implemetasjoner av nye basis-funksjoner (starte med en?)
Description
The current implementation for dynamics/rules +tracks is tedious and requires the app developer to modify several files and duplicate logic both frontend and backend. This does not scale.
Some of the concerns from Finanstilsynet has been documented in a github gist: https://gist.github.com/simendsjo/37581b29c8ad62ed83934ac41cff58a5
A proposed solution here has been to use a DSL (domain specific language) that will simplify these statements and making it reusable both backend and frontend.
This issue is used to document thoughts and questions that arise during the workshop.
Painpoints
Considerations
In scope
Out of scope
Additional Information
A possible candidate that has been mentioned is DMN FEEL (friendly enough expression language). This has libraries to evaluate such statements, a simple example is js-feel(no longer considered a viable option)Solution
Nice-to-have/simple DSL variant:
See the example above. Minor changes may come.
Functions we must support:
Relevant default functions we support must be supported in both c# and javascript. This enables us to generate lists of hidden fields for validation + remove "dead" form data that is hidden when the user submits.
This will enable us to both run dynamics trivially on the frontend + backend to solve the mentioned painpoints, as well as solving the maintainability hell illustrated in the picture below:
For the app developer, this will now look something like this (things might change):
This is also easier to both read and understand, and you have a clear understanding of when this field is hidden just by looking at one single file.
For more complex functions not covered by our default functions we can also reuse the concept of
shadowFields
that are being worked on in the other workshop track. Simply do the necessary logic backend and store if a given field should be hidden as a shadow field. Then setuphidden
with a simple boolean check against the given shadow field.Questions for the way forward
Thoughts
layoutOrder
andhidden
fieldsSeems to be just easier to run these at the same time and update states accordingly.
Tasks
The text was updated successfully, but these errors were encountered: