Live data from Hacker News

Open Source .NET libraries that make your life easier

thomasvm.github.io

91–100 of 116 posts

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

#92
Check out Akka.Net - http://getakka.net/

This is a port of the Akka framework from Java to the .Net platform. It's an actor model framework which works incredibly well for building highly concurrent and distributed applications. They just hit version 1.0 and are out of beta and are backed by a commercial company Petabridge.

Highly recommended.

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

#93
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…

> RestSharp makes talking to RESTful apis easier. Another interesting library for doing REST APIs is Refit: https://github.com/paulcbetts/refit

Damn, thanks for pointing me in that direction. It's exactly what I've been looking for.

Technically, I implemented some of that stuff myself because I needed REST client that would work with PCLs and be a bit 'nicer' to use than just juggling strings/routes everywhere, so using annotations and wrapping Microsoft's HttpClient was obvious and relatively easy way out.

Anyway, I'll probably just phase out my own solution and start using the library.

[EDIT]

After checking it out, RefitStubs.cs file seems a little bit clunky, but the library as a whole looks solid enough. I'll look further into it.

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

#94

Earlier quoted context omitted.

It's true. What I really would like is a micro-orm like Dapper with support for using LINQ to dynamically build queries. But I suppose this is essentially EF with AsNoTracking, which I have yet to play around with and test performance wise.

AsNoTracking makes the materialization indeed faster, but EF always has a cost associated with it, both for initial use (set up of the context etc, which is noticeable) as well as every other query after that (expression tree parsing etc, not as noticeable especially for recurring queries). I hope it's one of the pain points they will address and solve during their rewrite to EF7 at one point. That being said, my opi…

My testing showed that AsNoTracking is faster than dapper. But indeed the tests were purely focused on materialization and not query parsing: linq query parsing takes a lot of time, so with lots of predicates etc. you'll see much slower performance with EF compared to other ORMs with query systems other than Linq (except NHibernate, that's slow regardless)

See: https://github.com/FransBouma/RawDataAccessBencher

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

#96

With .NET going open source, I'd like to see what is out there for web services. Are there any linux-compatible .NET web servers/routers that I can use that have a similar feature set and performance to the Spray/Scala stack? C# or F#, but preferably F#. I've tried a couple (suave, nancy), but some simple benchmarks showed they were about half as scalable as spray.

In this case half as scalable really doesn't clarify what you mean. If I can through twice as many servers at the problem and it runs as fast, then to me it's just as scalable.

* Do you mean half the performance per connection? * Throughput falls off at half the connections? * Will start trailing off at half the number of servers?

In my mind there's a cost to development time, architecture thinking as well as developer cost to maintain/adapt/enhance. If you can throw more runtime resources at a problem, and that costs you a fraction of a man-year of labor over the next five years vs. taking longer to develop, or fewer developers skilled enough to make modifications, these are real concerns. It really depends on context.

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

#97
post #23

Earlier quoted context omitted.

> 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.

If you're in a position to use it, I much prefer Anotar with Fody https://github.com/Fody/Anotar Commons.Logging always felt clunky in comparison.

I prefer Timber myself https://github.com/cocowalla/Timber

In particular, it makes logging to the Windows event log much easier

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

#98
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…

Thanks for these. Adding a couple others: * EPPlus for reading or creating Excel spreadsheets without using Excel (such as on a server). http://epplus.codeplex.com/ * RTFConverter for parsing RTF. http://www.codeproject.com/Articles/27431/Writing-Your-Own-R... These are good enough to drive the decision to use C#/.NET for projects needing these capabilities.

I found SpreadsheetLight much more performant than EPPlus. http://spreadsheetlight.com/download/

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

#100
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…

Thanks for these. Adding a couple others: * EPPlus for reading or creating Excel spreadsheets without using Excel (such as on a server). http://epplus.codeplex.com/ * RTFConverter for parsing RTF. http://www.codeproject.com/Articles/27431/Writing-Your-Own-R... These are good enough to drive the decision to use C#/.NET for projects needing these capabilities.

I prefer DoddleReport for creating reports from a dynamic source to Excel, PDF, OpenExcell, txt or csv :)

They also have a great MVC integration

Post reply on HN