.Net Code Generation
Welcome to kiss!® by Cove Bay Software Limited. Hybrid .NET Code Generation (C# & VB.NET) and SQL Script Management for the real world.
.Net template driven Code Generation from a Database Data Model (MS SQL Server and MySQL).
kiss!® is a .NET Development Code Generation Manager, a companion for Microsoft Visual Studio. kiss!® generates Object Relational Mapping (ORM) Data Access and Business Logic Layers including Create, Read, Update & Delete (CRUD) SQL Scripts and Web Services (ASP.NET & WCF) from a Data Model Database. Once all generation has been done kiss!® acts as a Script & Code File Manager. SQL Scripts can be Concatenated and Executed against a SQL Server or MySQL Test Database.
kiss!® generates both SQL and Code (C# & VB.Net).
C# demo application:
kiss!® generates SQL ALTER Scripts for the most frequent development actions: Add (Table & Field), Drop (Table & Field), Rename (Table & Field) and Change Field Data Type.
kiss!® has Templates to generate the following in C# and VB.NET:
- Business Logic Layer (BLL, BLO) delivering Object Relational Mapping (ORM).
- Convert Class.
- Data Access Layer (DAL, DAO) delivering Object Relational Mapping (ORM).
- Domain Objects (DO).
- Field Enumerations.
- Domain Object Manager Objects (MO).
- Table Enumerations.
- Transfer Objects (TO).
- User Defined Templates.
- Value Objects (VO) also known as Data Transfer Objects (DTO) or Plain Old CLR Objects (POCO).
- Web Services (WS, WCF & WCFRJSON) for ASP.NET, WCF and WCF RESTful JSON.
- WCF Interfaces.
The following Stored Procedures are generated with the supplied SQL Templates and are wrapped by the Data Access Layer, Business Logic Layer, Web Services (ASP.Net) & WCF Services:
- Insert: Insert a record.
- InsertOutputIdentity: Insert a record and have the Auto IDENTITY returned.
- SelectID: Select a record by the Primary Key.
- SelectAll: Select all records from the table.
- SelectAllOrderByPrimaryKey: Select all records from the table ordered by the Primary Key.
- Update: Update a record by the Primary Key.
- Delete: Delete a record by the Primary Key.
- SelectByForeignKey: Select all records from the table by any of the Foreign Keys if applicable.
- DeleteByForeignKey: Delete all records from the table by any of the Foreign Keys if applicable.
Existing Stored Procedures and Views now have DAL, BLL, Value Objects and Web Services generated for them.
Web Service Config Files and XSD Export Files can also now be gnerated.
Example Class Diagrams from Generated Code:
Iterative Development Cycle overview:
- Adjust Data Model Database: Changes to the Data Model are implemented in the Data Model Database.
- Synchronise kiss!: Changes in the Data Model Database must be synchronised in kiss! by Synchronising the Data Model and Validating Table Manifests. ALTER SQL Scripts can be generated for common actions Add (Table & Field), Drop (Table & Field), Rename (Table & Field) and Change Field Data Type.
- Validate Table Manifest(s): Check Table Manifests shown in red for fields to be added to Data Model.
- Generate Code & SQL: When kiss! has finished synchronising new Code & SQL can be generated to take account of the Data Model.
- Execute SQL on Test Database: When Code & SQL have been generated SQL (both generated and manual SQL scripts) can be tested against the Test Database.