why is code generation usefuL?

persistent Schedule, budget and resource constraints

Faced with never-ending constraints and challenges, creative developers and tool builders have long sought ways to templatize frequently use snippets or use frameworks that provide common “plumbing code”. While this can save time in the immediate term, over time they often generate quality issues, technical debt and rigid, hard to manage code.

many have tried.

many tools available, each with limitations

Historically, code generating tool kits have had two significant drawbacks which limit their long-term adoption/usefulness. These include: 1) limited template authoring flexibility and 2) a dependence on bundled run-time code, libraries and/or reflection. These tool kits limit your team to building code the way that the automation vendor intended when they built it.

a better way of generating code.

codefactory provides many capabilities in a single platform

The more structured your chosen Solution Architecture design is – the more that CodeFactory can automate away the basic ‘plumbing’ code of your solution leaving only the business logic left to actually be hand-coded.

First, CodeFactory for Visual Studio, is the run-time client that can be used to generate most of the .NET code artifacts associated with the various non-business logic portions of many applications. This is the engine of our solution. Automation templates exist outside of, and are consumed by, the run-time client. These automation commands can be arbitrary, and are really only limited by the imagination and time restraints of the CodeFactory template author.  For most scenarios however, 'plumbing code' (ie. code that is not business logic) will be automated out.  Actions like building a webservice from a POCO application entity object and its associated repository classes or a different command that is used to automatically register any qualifying classes within an entire project into service location.  Other options might be to insert Exception handling in a logic class, or a specific logging pattern. CodeFactory does not require you to bundle run time libraries or alter your code or in any way to take advantage of its features. By generating code 100% at >design time< we eliminate the performance overhead of reflection and even support the ability to version different automation templates per solution or team depending on your needs.

Second, CodeFactory SDK supports designers that want to author their own automation templates. the many creative code automation ideas for automation will emerge from the creator community and evolve over time. We want to enable community-driven CodeFactory automation template authoring. In practice this means that a team that makes use of CodeFactory can generate an automation template that is included within their .NET Solution as a file (allowing for later versioning or updating of the template if so desired).  This template loads the customized automation commands into Visual Studio Solution Explorer for use by your development staff. 

Lastly, the CodeFactory Community Platform, is the open-source ecosystem combined with the shared guidance, documentation and reference solutions on GitHub. This enables developers to author and share their creations with the CodeFactory community.

[place holder - clean/remove]

  • Green-field Scenario

  • Refactor Scenario

  • Access to standard & community-sourced factory templates

  • Design-time code interaction eliminates dependency on run-time reflection

  • CodeFactory Commands are context aware and accessed via Solution Explorer

  • Factory Authoring Always Free with CodeFactory SDK

  • CodeFactory with Roslyn compiler presents source code as a real-time data model

  • Real-time source code search engine via Roslyn

  • Source code generation & formatting with T4 or other adapters

  • Flexible source code injection, manipulation & removal into C# files, classes, structures. 

  • Create interactive dialogs within Visual Studio to manage factory options.


Mastodon