Tools: Strongly-typed Model Generator

petrs@kentico.com[email protected] Eindhoven, NLMember, Administrator, Kentico Staff admin
edited February 2017 in Back-end Development

Talking of strongly-typed models, wouldn't it be nice to have an option of generating them?

If you've ever worked with e.g. MS Dynamics CRM you probably know what I'm talking about. They offer a tool called CrmSvcUtil.exe that allows you to generate proxy classes.

Now that the /types/ endpoint has been released, nothing's preventing us from generating the models programmatically. The endpoint exposes all metadata about content types stored in Kentico Deliver that we need.

Vision of such a code generator:

  • a command-line utility (to be able to hook it anywhere in my development workflow)
  • accepts the following parameters:
    • projectid
    • namespace
    • output (file name that corresponds with the namespace, by default)

Extra:

  • a custom generator that implements an interface can be injected via a parameter
  • allows outputting files per classes

Anything I've forgotten about?

Sign In or Register to comment.