JasperFx / wolverine

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

Wolverine 3.0 Plans #902

Closed jeremydmiller closed 3 months ago

jeremydmiller commented 5 months 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 5 months 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 5 months 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 5 months 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.

jeremydmiller commented 3 months ago

I'm closing this discussion for now. @haefele If you'd like, open a new issue for the [Document] thing? I'm not that enthusiastic, but let's see if anyone else has opinions