Live data from Hacker News

Open Source .NET libraries that make your life easier

thomasvm.github.io

61–70 of 116 posts

Re: Open Source .NET libraries that make your life easier

#61
post #16

Surprised no one has mentioned Nancy: https://github.com/NancyFx/Nancy I can't imagine building APIs without it now.

I find NancyFX really interesting, but I can't really see a reason to stray away from Web API2 besides Mono support. Any specific reasons you prefer Nancy?

Mono support is important for us and I prefer the syntax. It's also handy to be able to serve up ancillary pages like documentation alongside the API.

Re: Open Source .NET libraries that make your life easier

#62
post #29

Hangfire looks great. I'm currently running all my jobs through Azure Scheduler. Would anyone know what the pros & cons are between these two job schedulers? Are there certain requirements or architectures that favor one or the other?

Perhaps this is obvious but if you aren't running your own server, your web app (and Hangfire along with it) can stop running during a period of inactivity. Obviously this is not a problem with Azure scheduler.

I use Hangfire and then simply have Azure Scheduler ping my site regularly.

Re: Open Source .NET libraries that make your life easier

#64
post #59

I've recently discovered Linq2Db. Works great for CRUD in conjunction with Dapper. https://github.com/linq2db/linq2db It also comes with handy T4 templates to generate models.

I've been using it for long time now. Very fast, light, and stable. Thanks Igor!!

Re: Open Source .NET libraries that make your life easier

#65
Some that I build (and use):

* albacore for cross platform builds with ruby https://github.com/Albacore/albacore/ C++.Net, VB, C#, F#

* suave.io http://suave.io F#

* logary for structured logging and metrics and health-checks http://logary.github.io/ C# and F#

* Chiron for F# JSON parsing

* logibit.hawk for F# API Hawk verification https://github.com/logibit/logibit.hawk/

* Http.fs instead of RestSharp for F#

* FsSql for ADO.Net interaction

Re: Open Source .NET libraries that make your life easier

#66
Some additional ones I haven't seen mentioned so far:

* FluentValidation: excellent validation library, keeps validation rules grouped together and easy to keep track of - https://github.com/JeremySkinner/FluentValidation

* AutoFixture: great for the "Arrange" phase of unit tests. Populates object graphs with test data, highly customizable. There's a bit of a learning curve. Pairs nicely with xUnit but can be used with any TDD library - https://github.com/AutoFixture/AutoFixture

* Shouldly: a different approach to unit test assertions using "Should" that I find more readable. Also had friendlier error messages when assertions failed - https://github.com/shouldly/shouldly

Shameless plug of my own library:

* Regextra: aims to solve some common regex related scenarios. Features a Passphrase Regex Builder to generate a pattern for passphrase criteria, and also supports named templates and a few utility methods - https://github.com/amageed/Regextra

Re: Open Source .NET libraries that make your life easier

#67
post #56

Earlier quoted context omitted.

Dapper is a really awesome library when you want to write complex queries (full of table hints, output clauses, merges and other advanced stuff), but don't want to write enormous amount of code for adding parameters and reading result sets.

Personally, I think it's great even for crud...It's an order of magnitude faster than things like EF/LINQ2SQL

I've also used BLToolkit, and it is pretty fast too, plus it has Linq support to build strongly-typed queries that sometimes better than raw SQL queries. But when it comes to table hints, Linq and other stuff does not help. So, it always depends :)

Re: Open Source .NET libraries that make your life easier

#68

TopShelf looks interesting, I have written quite a few Windows services over the years and there have always been lots of gaps in the MS offering.

It's definitely superior to hand rolling Windows services. We have something like 6 or 7 TopShelf-based services, a couple of which are self-hosted WebAPI endpoints. No problems or gotchas that I can remember, aside from slightly marginal documentation last time I looked.

Re: Open Source .NET libraries that make your life easier

#69
post #31

I used to use NLog for logging until I've discovered Serilog ( http://serilog.net/ ) - simple .NET logging with fully-structured events.

Serilog to me is a much more modern logging solution. Allows us to pipe logs to table storage/sqlserver/loggly/logentries/docdb/azure event hub ... its the backbone of our app - really just awesome

would you be interested in sharing your setup or pointers toward a good solution with Serilog? I found that something other than a basic setup requires a good chuck of effort to get going. For example, configuration (all code) and IOC.
Post reply on HN