Live data from Hacker News

Open Source .NET libraries that make your life easier

thomasvm.github.io

21–30 of 116 posts

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

#22

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.

I've just rolled out a service using TopShelf having not used it previously. It really does simplify things. The best bit for me is being able to just hit F5 and having the thing run as a console application. No need to manually attach to processes for debugging.

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

#23
post #4

To add to the author's list: * I seem to install Json.net in every .NET project I create (json serializer - thanks James Newton-King!) * NLog for logging. It's fantastic. * Dapper is also excellent (Micro ORM) (and anything written by Marc Gravell is generally top-notch - see protobuf-net, miniprofiler, StackExchange.Redis) * Automapper, to avoid writing boilerplate code to convert between similarly shaped types (E.G…

> NLog for logging. It's fantastic.

I use NLog, but I access it through the Common.Logging facade. This is helpful when I need to bolt my code into an environment where NLog kind of sucks, like Xamarin.Android.

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

#24

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.

Once you use TopShelf you'll never go back! Honestly, debugging Windows Services are simple using TS.

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

#25
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?

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

#27
I have to say that for someone starting to transition to .net, this is a great post. Posts like these are what I expect from the Ruby/Python/Node/PHP communities but the lack of them and lack of good learning opportunities had made me hesitant to use .net in the past. Thanks a lot, you've just made me feel a whole lot better about the .net community as a whole.

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

#28
post #4

To add to the author's list: * I seem to install Json.net in every .NET project I create (json serializer - thanks James Newton-King!) * NLog for logging. It's fantastic. * Dapper is also excellent (Micro ORM) (and anything written by Marc Gravell is generally top-notch - see protobuf-net, miniprofiler, StackExchange.Redis) * Automapper, to avoid writing boilerplate code to convert between similarly shaped types (E.G…

How does Automapper compare to Entity Framework? We use Elmah instead of Nlog, which is also fine. Looks like NLog is a bit more flexible than Elmah is. But Elmah is KISS which is nice.

Entity Framework isn't really similar to any of the things I listed. I tried to only include components you might use as part of a larger system, rather than technology stack choices.

Dapper distills the converting database rows to objects. It's a micro ORM, which means it doesn't try to abstract SQL like a monolithic ORM (NHibernate, EntityFramework) would do. Example:

        public TagModel GetTag(long id)
        {
            using (var conn = m_connector.GetConnection())
            {
                return conn.Query("SELECT TOP 1 * FROM Tags WHERE Id = @Id", new { Id = id }).FirstOrDefault();
            }
        }

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

#30
post #4

To add to the author's list: * I seem to install Json.net in every .NET project I create (json serializer - thanks James Newton-King!) * NLog for logging. It's fantastic. * Dapper is also excellent (Micro ORM) (and anything written by Marc Gravell is generally top-notch - see protobuf-net, miniprofiler, StackExchange.Redis) * Automapper, to avoid writing boilerplate code to convert between similarly shaped types (E.G…

Was going to post Dapper, Automapper and RestSharp myself.

I use ELMAH for logging but I'll give NLog a look!

Post reply on HN