Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
112 stars 72 forks source link

Library of reusable code examples #7225

Open lvbachmann opened 2 years ago

lvbachmann commented 2 years ago

Is your feature request related to a problem? Please describe

Quite a few potential app devs are not competent enough to write/identify relevant C# and/or JS code themselves, but are competent enough to copy code examples into relevant files and modify it to fit their need. For quite a few common tasks in Altinn Studio, code examples doesn't exist or you would need to traverse all our documentation to find the examples.

Describe the solution you'd like

Some sort of code library available for users - either as a part of the documentation that's linked to from Studio Designer, or as part of Studio Designer itself.

Describe alternatives you've considered

Considerations

Expected output

altinnadmin commented 2 years ago

Such a library could also be shared on nuget, but we'd still need examples on how to use the library :-P

ivarne commented 2 years ago

A shared collection of recipes for different patterns, with links to apps that use them, would be really great. There are already a few examples in the docs, but they focus more on how to use a feature of altinn, than how to use multiple featurs to implement a requirement for an app.

If it makes sense for the receipts to use shared code in a nuget package (Altinn.App.Utils?) and if another package makes sense is a different question.

lvbachmann commented 2 years ago

Looking through our backlog, there are multiple issues related to having reusable standard regexes for some field types (e-mail, SSN, etc.). As we've now moved away from the assumption that all apps use our data modelling tool, this should probably be available for use in validations.