JasperFx / wolverine

Supercharged .NET server side development!
https://wolverinefx.net
MIT License
1.17k stars 128 forks source link

Wolverine 3.0 Plans #902

Open jeremydmiller opened 1 month ago

jeremydmiller commented 1 month ago

Long story short, I think this suddenly became a much higher priority issue for me due to some problems at a JasperFx client. The migration from 2.0 to 3.0 should be as easy as possible

The major arching proposed changes:

haefele commented 1 month ago

I can imagine that it's a big amount of work, but ever considered leaning more onto the IOptions stuff for WolverineOptions? The IWolverineExtension interface seems extremely similar to IConfigureOptions from IOptions. (Similar thing in Marten with IConfigureMarten)

Also for example the app.MapWolverineEndpoints(config => { /* Do something with the config */ }); feels a bit out of place. More "in line with .NET stuff" would be a pair of services.AddWolverineEndpoints(config => ...) and app.MapWolverineEndpoints() methods.

jeremydmiller commented 1 month ago

I'd call the first a very low priority. A lot of Wolverine is descended from an older (failed) framework and was put in place long before stuff like IOptions got into .NET.

As for the 2nd, I don't have a huge opinion, but an Add syntax instead of Map is fine. I did that mostly to be consistent with Minimal API. I don't want both the services.AddWolverineEndpoints() and app.MapWolverineEndpoints() though. I loathe that clumsiness with .NET web application setup. Guess we'll have to when Lamar goes away though. Bleck.

haefele commented 1 month ago

Just got another idea: Maybe with 3.0 we can also change DocumentAttribute.Required to be true by default - I think that's more intuitive.