Skip to content

cjdutoit/Standardly

Repository files navigation

The Standard - COMPLIANT

Banner

Standardly - Your 'The Standard' compliant code generator

What is it?

The Standardly Code Generator is a productivity tool to quickly generate code for standard things in the following catgegories: BROKERS, FOUNDATIONS, CONTROLLERS / EXPOSERS, ACCEPTANCE, BUILD and PROVISION.

Install instructions

Who can use it?

The productivity tool is recommended for experienced developers.

If you can't write this code yourself, please invest the time first, to understand what it does, how to write the unit tests, how the exception handling and validation works, the TDD check-in process, naming conventions and things as defined in The Standard

Any shortcuts will just set you back as you would need this knowledge and experience later to create other things like Processing and Orchestration Services that are not included in the Standardly.

What can it do?

Multi-Project Template

The Visual Studio Extension will provide a Multi-Project template that can be used to quickly setup a Solution with all the projects you would need. Simply search for Standardly or set the project filter to Standardly to find the project template.

image

Then add your Solution Name in the Project Name text box, check the "Place solution and projects in the same directory" to ensure the folder structure is correct and click on Create ...

image

... which will then create the following skeleton projects

image

These projects only have the bare minimum in terms of setup. We will use the Code Generator to add code for each...

Code Generator

The Code Generator support some configuration options that can be found in Visual Studio under TOOLS > OPTIONS > Standardly

image

The options help define some settings so that you would not need to repeatedly fill them out on the form.

  • General:

    • EditorConfig => Adds a .editorconfig file to ensure coding styles ins consistent. This will only be added if one does not exist and if the box is checked.
    • Gitignore => Adds a .gitignore file to the solution. This will only be added if one does not exist and if the box is checked.
    • Lincense => Adds a license file to the solution. This will only be added if one does not exist and if the box is checked.
    • Copyright => The copyright text. Default is MIT. This will also be used in the .editorconfig
    • Default Base Branch => The name of your base branch e.g. main / master
    • Display Name => The name to use in the copyright
    • GitHub Username => The username that will be used to create branches
  • Locations: Names that will be used to build a folder convention for storing the files within the project. This will help us adapt to potential changes in the future or this could also be used as a translation option for folder names if code needs to be scaffolded for a different language.

Generating Code

A new button is added to the context menu in Solution Explorer.

image

You can either click that button or use the keyboard shortcut Ctrl+Shift+F4 to get the the Code Generator.

  • Search for the template you want
  • Complete the required fields
  • Generate the code
  • Review the pull requests on GitHub

image

  • ProTip! If you want to scaffold code that follows on other code sets, you could tandem the branch creation process by changing the "Branch From" from main to the last create branch name i.e. if you created a broker you could use users/%username%/brokers-students-delete as the "Branch From" value. When you then generate code for a foundation service, users/%username%/foundations-students-add will then be branched of that instead of main

How can you help?

If you enjoy using the extension, please give it a rating on the Visual Studio Marketplace.

Should you encounter bugs or if you have feature requests, head on over to the GitHub repo to open an issue if one doesn't already exist.

Pull requests are also very welcome if you would like to help with bugs or new features that can benefit us all as a 'The Standard' community. Please see the documention for an overview of this project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages