Grapevine 5.0 Beta 0
Scott Offen
Grapevine CreatorThe first beta version of Grapevine 5.0 was uploaded to NuGet.org today, December 25, 2020.
#
A Complete RewriteA huge thank you to everyone who has downloaded and used Grapevine over the years, and especially those who have provided feedback and code to make the project better.
That said, Grapevine 5 is a complete rewrite from top to bottom. The primary goal has always been that it must be simple to implement, without compromising on functionality or performance. The new Grapevine 5 is async from the receipt of the request to the sending of the response, which makes it blazing fast. It has a cleaner and more flexible logging mechanism, and supports dependency injection in routes. It can be easily extended to meet specific needs, and you can even wholesale replace any part with your own implementation.
#
Things To KnowA new major version naturally brings with it breaking changes. In the case of Grapevine 5, it (as Jonathan Coulton might say) breaks everything in the nicest way.
If you have used a previous version of Grapevine, here is a quick summary of some thing you should know going in, in no particular order.
- Target Frameworks: netstandard2.0, netstandard 2.1, and net5.0
- Symbols package is also up on NuGet, for easier debugging during development
- I've removed the Grapevine.Client, at least for now (recommend using
IHttpClientFactory
) - The single URI restriction has been removed, so you can listen on multiple ports!
- Everything you need in the library is now in the Grapevine namespace
- Grapevine is async all the way through the stack
- This beta does not contain an
IContentFolder
(formerlyIPublicFolder
) implementation - There are built in extension for adding CORS (
IRestServer.UseCorsPolicy()
) and correlation ids (IRestServer.UseCorrelationId()
) - Standards based dependency injection (using
Microsoft.Extensions.DependencyInjection
) and logging (usingMicrosoft.Extensions.Logging
) RestResource
attributed classes are no longer required to have parameterless constructor (see above)
#
Code Samplewarning
The RestServer.DeveloperConfiguration
extension method used on line 12 is only available in this beta. It will be replaced with more elegant solution for start up and configuration.
Of course, you'll need some routes to go along with that...