Hacker News new | past | comments | ask | show | jobs | submit login

In fact, Rails is one of the slowest of the major frameworks. Based on TechEmpower's composite benchmarks:

   1. drogon (C++)        92.3
   2. actix (Rust)        90.7
   3. asp.net core (C#)   83.7
       ~~ mind the gap ~~      
   4. gin (Go)            23.0
   5. spring (Java)       21.8
   6. phoenix (Elixir)     8.1
   7. express (Nodejs)     7.3
   8. laraval (PHP)        4.4
   9. rails (Ruby)         4.3
  10. django (Python)      3.2
https://www.techempower.com/benchmarks/#section=data-r21&tes...



I have no idea why people/companies don't pick asp.net core more often. The amount of headroom you have before bottlenecks is immense. It has world class tooling to boot too.


It's been a while since I did C#/dotnet but I imagine the ecosystem (i.e. Windows, SQL Server etc) in terms of cost and, shall we say, inflexibility, would be high in people's minds. That, and the kind of boilerplate required that means people don't start with Java nowadays either.

I moved from C# to Ruby, and along the way I read Design Patterns in Ruby[1] (which I highly recommend), and it went through several of the patterns I used to have to apply in C# to make it workable, and it would then show me they weren't needed in Ruby because of the structure of the language. Maybe C# has improved in these kind of things, but things like that matter when developers are also expensive and you want to crank out features.

[1] http://designpatternsinruby.com/


Speaking as a C# dev, IME most people are working off of severely outdated views of the .Net ecosystem. .Net has had first class support for Mac and Linux for a good 6-7 years now. Postgres support is every bit as good as SQL Server, and plenty of other db‘s can be used as well. All of the new projects I’ve started in the past 5 years have used Postgres db’s and deployed on Linux. If you don’t like boilerplate then I have good news, nowadays you can make a fully functional Asp.Net API with about 20 LOC.


So what is it then? Is there a quick-start for Asp.Net projects? Is there a canonical "make a blog"-type tutorial project? If I wanted to try making and deploying a couple tiny asp.net apps in order to learn the framework, is there a service that can easily host them like Heroku used to do?


Well bear in mind that Asp.Net is a large framework. The minimal approach I mentioned is for creating APIs [0] which you can use with whatever JS front end you please. If you don't want a JS front end Asp.Net has four different options for building web front ends [1].

The hosting question has me a little confused I guess. You don't need anything special to deploy or run modern .Net code? You can run your app anywhere that the Asp.Net Core runtime is supported [2]. Or bake your app into a container and run it anywhere that understands containers. MS has tutorials for deploying to Azure [3], but I honestly know nothing about it (Azure). Every place I've worked at that had cloud infrastructure has used AWS, and I've never needed to deploy a hobby app.

0: https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-...

1: https://learn.microsoft.com/en-us/aspnet/core/tutorials/choo...

2: https://dotnet.microsoft.com/en-us/download/dotnet/7.0

3: https://learn.microsoft.com/en-us/azure/app-service/quicksta...


> The hosting question has me a little confused I guess.

I'm not sure how much you've played with Node, Ruby, etc BE ecosystems but there are plenty of "just `git push` and watch you app automatically deploy" services out there that makes it really easy to get started playing around with the actual framework and not get bogged down in docker files or AWS configuration.. Maybe I'm spoiled, but I'm also... busy. And I'd like to be able to try out a framework first before I decide if I wanna invest a lot of time working on a full-fledged project with it and these sorts of tools are perfect for that

Thanks for the links


Do you not run your code locally when testing and evaluating things? I guess in my mind where and how an app is hosted is largely orthogonal to the choice language or framework.

Edit: Assuming a modern framework that can run basically anywhere. Something like old school .Net Framework that is essentially restricted to Windows and IIS would be a different story.


Kind of true, however I still mostly work on .NET Framework, because of third party stuff that might never be migrated to .NET Core.

When it does get migrating, surprising as it may be, many companies are more willing to move to another platform than keep it on .NET, as full rewrite is almost required anyway. Dependencies on missing APIs, COM wrappers and such.

It is quite different to use an ecosystem born and raised on UNIX, and one that only in the last 5 years kind of matured into UNIX.

Additionally there is the whole issue with politics in VS4Mac/VSCode versus VS for tooling, which makes anyone outside of Windows to shell out for Rider if we want the same level of tooling.


Completely agree with you.

Btw, regarding Postgres support: the guy maintaining the Postgres .NET drivers works for Microsoft on Entity Framework Core.

Regarding the boilerplate and the minimal hosting model and the minimal api… it starts to look like a nodejs express setup. Personally I think boilerplate was not that bad to begin with and saving a couple of lines of code (sometimes at the cost of legibility) is not worth it for me in a decent sized project.


Historically it was pricing of Windows IIS and that I'm a person completely enveloped by the Apple ecosystem.

Not sure if either of those points matter 8+ yrs on since I last looked, but I know I'm not the only developer who has these concepts burned into their soul.


Asp.net core is fully cross-platform and self-hosting, so you do not need to incur Windows/IIS licensing costs.

For this site's audience, I would recommend taking a long look at F# over C#. If you aren't aware of it, it's functional-first, OCaml-inspired, but you have access to all the Asp.net core framework you need (similar to accessing Java from Clojure). A batteries-included framework that seems popular is the "SAFE Stack"[0].

[0]https://safe-stack.github.io/docs/overview/


Given that game dev in Unity is also driven by C# I wouldn't actually be against picking it up as a web dev. But it's hard to find any beginner-friendly resources out there. Is there anything like Heroku, Vercel, Fly, etc that lets you really quick build and deploy a full-stack app? My path to learning a new framework and language is full of half-finished project ideas and this process of quick and easy iteration has proven really useful to me being able to learn something quickly

Genuinely curious if anyone out there has some wisdom to share about this since I know next to nothing about the ecosystem


You can get similiar process as Heroku (just push to github repo and everything automagically deploys) on Azure using App Services. The problem is there is no free tier anymore, although i didn't really look up exact prices. There are plenty of very basic tutorials in official Microsoft documentation, if you search for stuff like "how to deploy .Net core app on azure" you surely find some tutorials that go through whole process from scaffolding basic project to running it in the cloud.


confusing names


Microsoft highly games this benchmark for ASP.NET core. I’m not disputing it’s faster than Rails, but the actual real-life gap will be much smaller.


Almost every one does, if you look at a number of the implementations that are used for Techempower they're very very carefully created to provide optimal behaviour under the benchmarking. They work in ways that you wouldn't normally write stuff.

It makes for a really interesting value proposition for the benchmark.


It's a large set of benchmarks so I'd be really curious to hear how they can game it. Got any good readings?


This article was quite eye-opening: https://dusted.codes/how-fast-is-really-aspnet-core

Now please note, this only talks about what Microsoft is doing, maybe others do the same.

Edit: I saw the article does in fact look at other frameworks.

In the end, it just means these particular benchmarks are pretty much worthless for any kind of real-life comparison.


Thanks for sharing. From the article, even the worst of asp.net was often still outperforming Go and other major frameworks. And the versions explicitly pointed out as actually fairly realistic still placed in the 73-86 ranges. In addition, you could do the same exercise with gin, rails, etc and find a lot more variation (though rails and django do basically always suck in comparison)

It's interesting because even the maker of actix (Rust) was pretty explicit about their goal to optimize for these benchmarks. And it really worked to improve the perception of Rust for web dev applications.[0] The current leader is actually JUST which is a JavaScript based framework that's pretty much solely focused on these benchmarks.

I think the strategy for optimizing like this and sometimes even fudging numbers a bit is pretty standard for a new framework or platform trying to make a name for itself (ahembunahem).

Actix is new, JUST is more of an experiment, and tbh I've never even heard of drogon. But when it comes to frameworks like ASP.NET core, Laraval, Rails, Express, etc you can at least trust that they've been around for a long time and there are many proven examples of their application to both commercial and hobby projects. IMO the fact that ASP.NET has been around for so long yet can still top benchmarks like these is still a noteworthy feat. And its undeniable that Django, Rails, Laraval, etc are leagues behind in terms of performance

[0] https://www.arewewebyet.org/


> From the article, even the worst of asp.net was often still outperforming Go and other major frameworks.

Hmm no:

„the expensive Go implementation ranks 22nd overall in the TechEmpower Fortunes Benchmark with an equally impressive 381k requests/sec. Not quite as fast as the Java one but still more than 2x faster than the equivalent test in ASP.NET Core.“

But as said, in the end the whole discussion probably says more about the value of this benchmark than the value of the frameworks (also considering of course that pure performance is only one factor among many)


God ASP.Net is incredible. I mean it is what runs StackOverflow on "minimal" hardware.

I'm a Rails, Django guy and we run into exactly what you're talking about. The speed we can pump out features is fantastic in both, but once you get to a large number of objects, it's better to drop into pure sql/array handling.

This is mostly for data processing, background jobs where we need to work with >1k separate objects.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: