TL;DR
Nancy v0.8.0 is out, loads of cool new features such as static content (so you *finally* don’t have to do it yourself :-P), basic authentication support, and CSRF protection, and enhancements to things like error handling (with fancy pants error pages) and the test framework. We also have a fantastic new logo by Nicolas Garfinkiel (codetothepeople.blogspot.com), and a new website – so go check out the Nancy site now 🙂
The plan..
Once v0.7.1 was out of the way the plan was simple – work on diagnostics, hopefully interfacing with the guys from Glimpse, and get v0.8.0 – the “diagnostics release” out within 6 weeks or so. But things didn’t go entirely to plan…
A very nice problem to have..
We knew Nancy was getting a bit of a following, but we didn’t anticipate the level, and the quality, of the community contributions. We received lots of feedback, lots of great suggestions, and lots and lots of pull requests – before we knew it v0.8.0 was already looking pretty feature rich, without the diagnostics work we intended to be the core part of it, and time was tick tick ticking by. So, after a certain Mark Rendle started referring to this release as our “Duke Nukem Forever” release, we decided people had waiting long enough for an update and we “re-scoped” v0.8.0 so we could release the growing list of improvements sooner rather than later.
Taking a look at a GitHub comparison it shows v0.8.0 consisting of:
- 186 commits
- 226 files changed / updated
- 19 different contributors
So, what *is* in v0.8.0?
You can see the commits that went into v0.8.0 in the GitHub comparison, or take a look at the issue list for a list of features / bug fixes, but some of the highlights are:
- Static content conventions – now static content is supported out of the box with pluggable conventions for which files are server from where.
- CSRF protection – currently only supported in Razor, Spark and SSVE, but it’s now possible to validate “tokens” (with or without a timeout) to protect your site against CSRF vulnerabilities. There’s a sample of this in the main ASPNet demo project.
- The view cache should now be disabled in debug mode properly (yay!)
- A new exception handling pipeline and built in error pages.
- Basic authentication (as a new Nuget)
- Protocol Buffers de/serialization support (as a new Nuget)
- An awesome new logo (see below)
Logo and website
Thanks to the efforts of Nicolas Garfinkiel (codetothepeople.blogspot.com) Nancy now has an awesome new logo – many thanks to Nicolas for the speed he put this together, and for putting up with Andreas and myself nitpicking so much 😉 You can see the new logo in “action” in the updated favicon, and on our newly launched Nancy site – go check it out!
Please note that we did have a redirect on that site, so if you get redirected to github you might have to press ctrl+enter (seems to work in Chrome) or clear your cache or restart your browser or something .. sorry 🙂
Thanks
So, a big thank you to everyone who contributed to this release – comments/suggestions, bug reports, fixes, features and even just giving kudos on Twitter – it’s all very much appreciated.
Now.. onwards and upwards to v0.9.0!
P.S. Andreas and I have recently recorded a Herding Code episode – so keep an eye (or ear) out for that.
[…] Nancy v0.8.0 – Best Laid Plans.. – Steven Robbins announces the release of Nancy v0.8.0, a .NET framework similar to Sinatra. This new release brings a significant number of new features along side bugfixes and tweaks. This release has taken the team longer than planned, mainly due to the strong community uptake […]
I’m just getting started with Nancy and really like what I see so far. This new version tripped me up a bit last night though. 🙂 I had previously cloned the main repo from Github a couple weeks ago (so I guess that must have been the 0.7 codebase). But just last night I created a new empty web project and added Nancy, Nancy.Hosting.Aspnet and Nancy.Viewengines.Razor via nuget.
One of the first things I tried to do was reference some static files from a Razor template, following the same pattern shown in the demos. For example I had Get routes setup like this:
[Get[“/style/{file}”] = x => { return Reponse.AsCss(“Content/” + (string)x.file); };
But with Nancy 0.8 that seems to always return a 404, even though I could set a breakpoint and see the route being hit with the right file name. When I saw your post, I updated my copy of the main repo and saw the updated examples just directly referencing the static files.
I was wondering though, is there a reason the old method doesn’t work anymore? Are the AsCss, AsJs, AsImage methods deprecated now? Thanks!
I have to say, my first tought was about nancy that “oh god, yet another…?” – but after reading some posts I realized that’s a great thing. So thank you and do not forget the good marketing:)