We need a script to generate the structure for new services #731

Closed
opened 2026-05-05 07:40:38 +00:00 by a22erigr · 5 comments
Collaborator

Description

After the update to Service structure we should implement a script to automatically create the "skeleton" of a new service. This should be done to standardize the creation of services.

What should be done

  • The script should ask for the name of the service to be created
    • If possible verify that the name follows the naming standard
  • The file structure of the service should be crated.
    bild
  • The script should also initialize dotnet
  • Create the file that the folders will contain
    • IMPORTANT: Use the provided service name when creating the files.
      • Ex LayoutService
        bild
  • If possible the files should be populated with the the boilerplate code.
  • Example
    bild
    bild
    bild
    bild
## Description After the update to Service structure we should implement a script to automatically create the "skeleton" of a new service. This should be done to standardize the creation of services. ## What should be done + The script should ask for the name of the service to be created + If possible verify that the name follows the naming standard + The file structure of the service should be crated. ![bild](/attachments/7e86e46b-4602-4632-81a8-cf80707ee51e) + The script should also initialize dotnet + Create the file that the folders will contain + IMPORTANT: Use the provided service name when creating the files. + Ex **Layout**Service ![bild](/attachments/a9d416f0-0f5a-4f12-a884-7ce17d4cae9e) + If possible the files should be populated with the the boilerplate code. + Example ![bild](/attachments/b8025196-491b-4a76-bcf5-109417a716af) ![bild](/attachments/fabba458-4f6e-4774-96a4-6ec5b97f0b41) ![bild](/attachments/c13e7cd2-21df-4619-99c7-aa29b6c766b8) ![bild](/attachments/60140e8c-ce1b-42af-97aa-09d41bee69bf)
150 KiB
171 KiB
441 KiB
33 KiB
85 KiB
766 KiB
Collaborator

Its definitely possible, but before starting I just want some things more clear:

  • Do we want to create the Tests folder as well and link those to the newly created Service?
  • Do we want to create other files as well, like generateMockup and readMockup?
  • Should we copy an existing service in our codebase, like tempService, or should we clone another repo to do the same, or should the script do everything from scratch (it is possible but will require more lines)?

Also, what is If possible verify that the name follows the naming standard? Naming standard of what exactly?

Its definitely possible, but before starting I just want some things more clear: - Do we want to create the Tests folder as well and link those to the newly created Service? - Do we want to create other files as well, like generateMockup and readMockup? - Should we copy an existing service in our codebase, like tempService, or should we clone another repo to do the same, or should the script do everything from scratch (it is possible but will require more lines)? Also, what is _If possible verify that the name follows the naming standard_? Naming standard of what exactly?
Author
Collaborator
  • The test folder should be crated and linked.
  • Do we want to create other files as well, like generateMockup and readMockup? Not in scope
  • This or should the script do everything from scratch (it is possible but will require more lines)?
+ The test folder should be crated and linked. + Do we want to create other files as well, like generateMockup and readMockup? Not in scope + This or should the script do everything from scratch (it is possible but will require more lines)?
Collaborator

The current script creates all files (at least for Windows) but a problem right now is the use of capitalization in C#. The folder structure we are using is camelCase, but C# wants all of it's things to use Pascal. Batch does not have a function to capitalize letters.

Some suggestions to solve this is to just not use camelCase, write a custom functions to do this manually, or use a program/extensions that allows this. Bash does not have this issue

The current script creates all files (at least for Windows) but a problem right now is the use of capitalization in C#. The folder structure we are using is camelCase, but C# wants all of it's things to use Pascal. Batch does not have a function to capitalize letters. Some suggestions to solve this is to just not use camelCase, write a custom functions to do this manually, or use a program/extensions that allows this. Bash does not have this issue
Collaborator

Good insight! As this was meant as a "quality of life" implementation to help in the creation of future services and not something factually necessary, makes it feel wrong to change our current standard just to implement it. I would say if we can't use the script to do it then we just make a detailed wiki of how a service should be implemented.
If we can do it with an custom fuction(no extentions) then it would be fine, but if the issue gets to complex then just go the wiki route.

Good insight! As this was meant as a "quality of life" implementation to help in the creation of future services and not something factually necessary, makes it feel wrong to change our current standard just to implement it. I would say if we can't use the script to do it then we just make a detailed wiki of how a service should be implemented. If we can do it with an custom fuction(no extentions) then it would be fine, but if the issue gets to complex then just go the wiki route.
Collaborator

Agreed, we shouldn't change existing stuff (it's too late for that anyway). I can definitely make something of my own that conforms to the Wiki and is Windows specific, just wanted to check what the leaders thought about this.

Agreed, we shouldn't change existing stuff (it's too late for that anyway). I can definitely make something of my own that conforms to the Wiki and is Windows specific, just wanted to check what the leaders thought about this.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#731
No description provided.