.Net Program Source Code Generator TCDesigner
 

Developer Information: Features 

Architecture


Most projects will have, at a minimum, three layers:

  • Data Access
  • Business
  • User Interface

The amount of code in any one layer will depend on the complexity of your schema, your business rules, and the user interface. For a system with a relatively simple user interface (like web pages) and not overly complex business rules, the Data Access layer can easily account for 60% of the code. For the sample Northwind database, TCDesigner generates approximately 16K lines of code!

TCDesigner Standard Edition generates most, if not all, of the code you will need for the Data Access layer. All code for this layer will reside in two namespaces, which will be unique to your project. Generally, however, this will involve a namespace containing “Base” classes and a namespace for “Data Access” classes.

Together, these two namespaces will contain all the code you need to support the “CRUD” functionality for your project. Additionally, the generated code will provide for excellent error handling to deal with potential run-time issues involving database access.

Coding Style

Many aspects of a program go into making up the "style". Here are just a few things we would like you to know about the code TCDesginer generates:

  • Naming conventions - Industry standard naming conventions are used throughout.
  • Comments - Both XML comments and regular program comments enhance maintainability.
  • Object naming - Common-sense naming makes objects easy to recognize and work with.
  • White space and indentation - Makes for easy-to-read program code.

XML Comments

Your system can be self-documenting if you take advantage of XML comments. Every method and property can, and should, have XML comments. Various tools are freely available that extract your comments and produce excellent technical documentation. We like the open source program NDoc.

Knowing that most developers procrastinate on this issue, we’ve made sure that all code generated by TCDesigner is fully XML commented. It’s more than just the obligatory phrases to stop the release mode compiler warnings too. The comments TCDesigner adds to your generated classes, methods, and properties are of high quality and include references to related subjects.

Click
here to see more information about XML comments.

Stored Procedures

Admittedly, it's a fairly simple exercise to generate the T-SQL needed for stored procedures. TCDesigner generates good quality T-SQL that is properly formatted and indented for readability, and commented. Additionally, your SQL Server stored procedures can be encrypted - making in nearly impossible for malicious persons to see the statments making up your stored procs.

Strong-typed data objects


TCDesigner uses custom classes, inherited from the collections class, for data access. One custom data access object is created for each schema item. Properties are created to access the individual column values.

There are several advantages of using custom data access objects over datasets:

  • The first is that they do not carry all the baggage of a dataset. This means your application will perform better.
  • Secondly, they are strongly typed. Since your table columns are properties of the data access object, you will be able to use all the power and convenience of Visual Studio’s design-time features to help you code. Any coding mistakes are caught early on, by the compiler, not at run-time by the users.



Regeneration

If your database design is complete, use TCDesigner to generate your project’s foundation layers, and then switch off to Visual Studio.

Most new development involves some changes to the schema – even after programming has begun. In this case, TCDesigner may be used to completely or partially regenerate your layers.

If you have made changes to any of the generated code, you will have the option to avoid over writing those classes. On the other hand – if no customization to the generated code has occurred, then simply regenerate everthing.


©2004 Program Solutions LLC. All rights reserved. Terms of Use | Privacy Statement
TCDesigner