Replies: 4 comments 8 replies
-
Sounds Interesting. Could you attach some screenshots of the application? Wondering is there is a way to make it a CLI tool or a VS extension? If no, we can still proceed with WPF. We can probably add it under the repository/code-generator folder. Since we are doing all the scaffolding part, is it also possible to add migrations for the newly added entity automatically? I think it should be possible. Let me know. Cool work by the way. Be ready to write in some documentation at fullstackhero.net for this :p Thanks |
Beta Was this translation helpful? Give feedback.
-
Thank you for such a work. I was planning to make such an application when I learned the structure of the project by examining the articles on Mukesh's blog. We had been working for four years to migrate our projects to the web. But we haven't been able to create the infrastructure we want yet. Mukesh showed me a new way out. I feel very lucky to have found him. Thank you for everything Mukesh. You can add a section within the Master/Detail tables in your project. When tables and link fields are selected, you can create related files. This will be very helpful for novices like me. I wish you success. |
Beta Was this translation helpful? Give feedback.
-
hi @trihugger, Regards. |
Beta Was this translation helpful? Give feedback.
-
Hi @trihugger @iammukeshm |
Beta Was this translation helpful? Give feedback.
-
I had started writing this for BH, but since I've been focusing on this and it makes it far more streamlined anyway, I've ported it to DN.Webapi.
The idea is having a source code generator that we can customize to our needs to quickly launch a new feature and get a large amount of the code scaffolded for us.
The project is now 90% there, and I wanted to know if you had any interest in adding into the repository. If yes, we might want to put it in a different trunk while we get it to a test or rc quality.
Here's a quick overview of how it works:
4.1 Adding the constructor and update method to the data model file
4.2 Adding the permissions to the permissions.cs file
4.3 Create the dtos and supporting files, List Filter, Create/Update Request, and Create/Update validators, etc.
4.4 Create the interface and implementation for the service class.
4.5 Create Controller
4.6 Update localization
4.7 Add table definition to the Application Db Context
The project is a WPF app with a window that allows to select the data model from a list and then follows a workflow to generate the templates.
Added options to generate all files or pick one by one, and to backup all files or select which to backup as you go.
The project is structured into two folders the CodeGeneratorEngine and the files templates.
The Code Generation Engine is devided into to an EngineFunctions class, a static class of reusable methods to support the creation of the files, and the Code Generator Engine responsable to all the data model operations within the template file.
The template folder has a generic blank template to create new templates as future needs arise, and a template to all the files it currently generates. Its composed of a constructor where all the template settings are made, a code generation method where the file structure is define, and a sample method to generate code that might require special logic and used only in that template.
Engine Functions class include a properties generator with parameters to meet most common cases, as well as in line properties method for cases like method functions or request pass-through. It also contains the functions used to append code to an existing file that does the validation if it exists and to override/replace or ignore.
I'm in the process of finalizing the testing and refactoring some of the functions for easy development.
What I would like to know is if you are interested in adding it to the project (Please don't feel that you have to say yes after all you might need to help support this :) ), and if so if you would like to push to main or on a separate trunk. As for timing I should have it all finalized this weekend and fully tested by next weekend.
Let me know if you are any questions, thoughts, suggestions, or concerns and what your preference is.
Thank you,
Jeff
Beta Was this translation helpful? Give feedback.
All reactions