Skip to content
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

Quality guidelines for samples #334

Open
bart-vmware opened this issue Jun 20, 2024 · 1 comment
Open

Quality guidelines for samples #334

bart-vmware opened this issue Jun 20, 2024 · 1 comment

Comments

@bart-vmware
Copy link
Member

bart-vmware commented Jun 20, 2024

As we're updating samples for Steeltoe v4, please keep the following guidelines in mind:

  • Start from the standard .NET 8 project templates, add comments for Steeltoe/sample-specific changes.
    • Suffix project names with "Web" for web-based clients, suffix with "ServiceApi" for APIs and microservices (applies only when multiple apps interact).
    • Don't delete parts from the standard project templates that aren't strictly needed for the sample. The goal is for readers to recognize the boilerplate code. Removing parts raises the question of whether the sample is incompatible with the boilerplate.
  • Consider adding non-web-based projects, such as WorkerService/Desktop/Blazor where it makes sense.
  • Enable nullable reference types and prefer modern C# syntax, such as records and primary constructors.
  • All samples should have the Steeltoe.Samples.[AppName] code namespace prefix, in subdirectory [AppName] (do not repeat the category, such as connectors/management/discovery/etc).
  • In manifest.yml, app name should end with "-sample", service should start with sample, so any running orphaned instances in CF are easy to recognize.
  • Consider adding integration tests, if feasible, and add status badges to /README.md.
  • Consider adding random-route: true to manifest files.
  • Run code-cleanup (you can sync style settings from Steeltoe using /tools/sync-DotSettings/sync-DotSettings.ps1).
  • Don't forget to describe how to use the sample in a README.md.

Bonus points:

  • Use modern features, such as minimal APIs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant