Release Candidate 5
Pre-releaseState of the Rewrite
A new Release Candidate is available due to a breaking change, in a few addons only :
- Jwt : Helper & Service
- BasicAuth : Helper & Service (this is a new nuget package and is no longer part of the core)
- OpenID : Helper & Service
Why?
Last week, I was finalizing the code and documentation for the release. I wanted to create a showcase for a common real-world use case: supporting multiple authentication schemes based on criteria like (host, IP, etc.).
When I tried to implement the example, the design turned out to be… ugly. A complete failure ! And not a small one.
The upcoming v26 must have solid, bulletproof foundations and be easily extensible.
At that point, releasing was not an option. Something had to change. So I took a step back and looked at how other frameworks handle this. The result:
Thanks to this, my scenario is now handled in a clean, elegant, and powerful way. I’ll be shipping it in the templates NuGet package.
And there’s more : UseRouter(), UseEngine()
These two configuration methods allow you to easily override the Router and the Engine. Another building block for SimpleW’s extensibility.
I'm polishing the code a bit more and running tests, so I’ve postponed the release by another week. I don’t see any other parts of the code that require that level of rewriting, so I expect things to be calm. The release is planned for next week.
Read the updated documentation
feature / comparison
| Feature / Aspect | SimpleW v16 (old) | SimpleW v26 (new) |
|---|---|---|
| NET runtime | NET8 | NET8 but should consider NET9/NET10 for better perfs and RAM usage under heavy load (e.g: NET8 400Mo, NET9 100Mo, NET10 70Mo) |
| Core architecture | ✅ from scratch (custom, simple, clean) | |
| Code readability | ✅ | |
| Overall design philosophy | ✅ minimal, custom, fast | |
| Long-term maintainability | ✅ much easier | |
| Performance | ✅ (very high) | ✅ (very high) |
| Middleware | ❌ | ✅ |
| Modules | ❌ | ✅ |
| Extensibility | ✅ middleware, module, callback, subclass | |
| Response Builder | ✅(status, contentType, headers, body, cookies) | ✅ (status, contentType, contentLength, headers, body, cookies, compression) |
| Handler (Expression Tree) | ✅ sync ❌async | ✅ sync ✅ async + RequestAborted |
| Routing | ✅ (minimal, attribute, querystring, regexp, path, wildcard) | ✅ (minimal, attribute, querystring, path, wildcard, host) |
| Minimal API | ✅ | ✅ |
| Controllers | ✅ | ✅ |
| Custom attribute | ❌ | ✅ |
| SSL / HTTPS | ✅ (SslContext) | ✅ (SslContext, mutual authentication) |
| WebSocket | ✅ (full broadcast) | ✅ (smart broadcast using "rooms") |
| Server-Sent Events (SSE) | ✅ | ✅ (smart broadcast using "rooms") |
| Unix socket | ✅ | ✅ |
| Static files | ✅ (Cache, FileWatcher) | ✅ (Cache, FileWatcher, Last-Modified, Etag) |
| Cross-Origin Resource Sharing (CORS) | ✅ | ✅ |
| Body parsing (JSON) | ✅ | ✅ |
| Body parsing (form-urlencoded) | ✅ | ✅ |
| Body parsing (multipart/form-data) | ✅ | ✅ |
| Bag | ❌ | ✅ (share data between middleware) |
| Auth | ✅ Principal / Identity | |
| Custom JSON engine | ✅ | ✅ |
| HTTP pipelining | ❌ | ✅ |
| Content Range | ❌ | ✅ |
| Idle Timeout | ❌ | ✅ |
| Request Protection | ❌ | ✅(malformed) |
| Observability | ✅ (traces) & global to all processes | ✅ (traces, metrics, enrich) per SimpleWServer instance |
| Logging | ❌ | ✅ |
| Documentation | ✅ | ✅ simplew.net |
| Tests | ✅ | ✅ (more tests) |
| Support | ❌ | ✅ Discord |
| Addons | ❌ | ✅ BasicAuth, Chaos, Firewall, Hosting, Jwt, Latency, Log4net, OpenID, Razor, Swagger, LetsEncrypt, Templates, Serilog, Log4net |