Skip to content

Switch service frameworks to code generation #732

@Kaliumhexacyanoferrat

Description

@Kaliumhexacyanoferrat

As an user of the web service frameworks (such as ServiceResource, Inline or Controller) I would like the framework not to use reflection, so that I can benefit from improved performance and AoT compatibility.

Add an iterative code generator that will analyze the code for usages of Inline , Controller or ServiceResource and generates handlers that will be returned in their Build() method instead of the reflection based current one.

Probably use a shared library at runtime to provide features such as serialization during runtime, so this can be unit-tested and maintained more easily.

Acceptance criteria

  • The API of the web service frameworks does not change
  • Dynamic instance generation (e.g. in a foreach loop) and scope capturing works as expected
  • There is no dynamic evaluation of things at runtime (e.g. routing or parameters)
  • General features (such as serialization or formatters) are shared as they are today
  • Dependent modules can still discover operations (e.g. OpenAPI)
  • The functionality is documented, so developers can add their own frameworks if they want
  • Existing acceptance tests still pass

Metadata

Metadata

Labels

enhancementNew feature or requestpriorityHigh-priority feature on our roadmap

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions