
Ask HN: ASP.Net Core or Rails? - zanicib
Hello HN. I&#x27;m struggling to choose between ASP.Net Core and Rails.
I want to develop web services for my iOS app. What would be better?
Thanks!
======
spriggan3
TLDR; it will be great ... in 6 month.

Wait a bit until the RTM, right now it's a mess, but in 6 month frankly, you
can consider starting new projects with asp.net core.

I successfully wrote an app with asp.net core, mvc6 , entity framework (ORM)
backed by Postgresql from scratch on Linux and deployed it on Heroku (with
Mono, I wasn't able to run all my dependencies with CoreCLR). The app was
fairly complex, with a big DB schema, it wasn't a toy and I did it in a week
(without the tests).

It worked great and was pretty fast, I used the RC1 release though, the RC2
has a completely different tool chain so everything breaks. But aside from
breaking API, great experience. C# is great.

Frankly, no question, for me it's a replacement for PHP+Symfony, Rails and
Java on the long run. I initially wanted to move to Go but I wont, I prefer to
take a small hit in term of performances and use a good language, rather than
having optimal performances with a language I fight every second.

------
danielvf
I used .NET Core for an application. It was the worst experience I've ever had
with a framework in seventeen years. We had switch off it about four months
in.

Performance was terrible, critical strange bugs were everywhere, and
documentation was awful. But most importantly they would completely change
important APIs every month. I'd have update almost every file in my project.
And they would change the same API again the next month...

Rails, Django, Sinatra, Express, all started with a clear vision of what they
wanted to be. This made all the little details support the frameworks big
idea. You could use prerelease and beta versions and be fine.

.NET Core, though, hasn't decided yet whether it wants to be baboon or a
firetruck.

~~~
pionar
Wait, you're complaining about things that are so because it was a very early
preview version?

You should never rely on early versions of something for critical, production
projects without recognizing the risk.

~~~
tacos
It was labelled Release Candidate 1. They really did make a mess of this one.

~~~
cmdkeen
And it was a valid Release Candidate, they could have gone live with it. A
bigger strategic decision was made to take various concepts from it and apply
them to .Net in general not just web specific things. At the same time it gave
the ASP team more time to tidy things up and be more consistent in terms of
new patterns in a few places.

Microsoft was open very quickly that they were making big changes and that RC1
was going to look very different from 1.0. There has been some chaos but it
means we are all going to end up with a 1.0 release that is much better,
rather than getting a breaking 2.0 release in short order afterwards.

It should never be assumed that a Release Candidate is going to make it into
production, especially from an enterprise software vendor launching a new
product. If the lasting legacy of this is more people taking that on board
then that will be a good thing.

~~~
spriggan3
> And it was a valid Release Candidate

I think they messed up calling it a RC1 and leaving it as it is for so long.
People started writing drivers and what not and were confident that the stack
wouldn't change too much, now they are going to wait the official release
(i.e. at least a year) because the trust is broken. They should have called it
a beta and not let it live for like a year. You don't do that.

> It should never be assumed that a Release Candidate is going to make it into
> production

Of course, but release candidate also means that there wont be any significant
change in the tooling or philosophy. RC2 has completely different tooling and
the code is completely incompatible. It doesn't build up trust.

------
sebiw
Use Rails 5 Release Candidate. Rails has everything you need to develop a web
service / API for a mobile app.

Also, there is a new API-only mode in Rails 5 which could come in handy for
your case (API development):
[http://edgeguides.rubyonrails.org/api_app.html](http://edgeguides.rubyonrails.org/api_app.html)

------
shubb
Typically with ASP.Net, you will be writing a lot of your logic in a compiled,
typed language (even if the types are mostly inferred). That removes one class
of run time error from your application.

On the other hand, for the next year at least, non-IIS hosting for ASP is
second class. You can host sites on Linux, but there will be gaps. When you
upgrade the site, do you need to turn that server on and off again, or it
manage the change in excusables automatically?

The opensource library scene for .net is not as good as for some other
languages.

Finally, Microsoft has a plan for making money out of ASP.Net Core, and if it
seems like a route to run ASP applications somewhere that isn't Azure, we are
missing something.

------
amcdnl
Stay away from .NET Core! we've had nothing but issues and they can't even
figure out what they want to do, they keep adding/removing/changing and
renaming the api all the time.

~~~
insulanian
What issues did you have?

~~~
merb
The docs are outdated: [http://docs.asp.net/en/latest/getting-
started/index.html](http://docs.asp.net/en/latest/getting-started/index.html)

~~~
frogfuzion
I would probably use this instead:
[https://dotnet.github.io/](https://dotnet.github.io/)

~~~
merb
[https://dotnet.github.io/docs/](https://dotnet.github.io/docs/) open it and
click on: "Web application" and than check where you've been redirected to.

------
nedsma
Use the tech you feel the most comfortable/productive to accomplish the task
now. It if it's .NET, go with the standard .NET, don't provoke new issues with
.NET Core. Test and see how your app will be doing. In three/six months re-
evaluate your decision and come up with an improvement you shall be doing
next. Perfection needs time.

------
bbody
Are you or your team building this? If so, which one are you more familiar
with? Choose that one.

------
kerryritter
Been a .net MVC developer for 5 years. Lots of problems with Core right now
(RC1 is pretty stable but lots has changed since then, so it is a bit of an
uphill battle).

I would suggest looking into Django and Django REST Framework. I'm loving
using it in my off-time. I'm personally not a fan of Ruby, so I wanted to
through my personal suggestion out there.

------
cptskippy
I prefer C# to Ruby but .NET Core is still a Release Candidate and it's a v1
product. So in terms of support, documentation, stability, etc you'll probably
be better off with Ruby.

If you're considering deploying to Windows/Azure then .NET Core is a little
more temping but otherwise...

------
BuckRogers
Too early for .Net Core. Not ready. RoR is what you want. If you have to learn
RoR still then maybe that changes the story. Say you know C# and not Ruby-
then you could just build your backend on standard .Net and move to .Net Core
when it makes sense.

~~~
patates
That made sense to me and after a web search, found a blog post in MSDN[1]
which summarizes the API compatibility situation.

[1]:
[https://blogs.msdn.microsoft.com/dotnet/2016/02/10/porting-t...](https://blogs.msdn.microsoft.com/dotnet/2016/02/10/porting-
to-net-core/)

------
chvid
AFAIK developing/deploying asp.net on macosx/unix is still a second class
experience.

I would go with rails or alternatively Java with jax-rs if you want something
somewhat similar to .net.

~~~
dizzy3gg
With Visual Studio code and the latest rc2 betas its now becoming comparable
(minus Visual Studio)

EDIT: typo.

------
j_s
The author of JSON.NET has decided to "wait until there is documentation". I
found out about this when another library author linked to this issue as his
reason for not creating a NuGet package for .NET Core:

[https://github.com/JamesNK/Newtonsoft.Json/issues/618](https://github.com/JamesNK/Newtonsoft.Json/issues/618)

------
mindcrash
If your goal is to build robust, mature web services the Java (Java and the
friendly neighbours Scala and Clojure) and .NET (C# and the friendly neighbour
F#) ecosystems are very hard to beat.

Hell, if you're choosing the latter get yourself an Azure description, build a
new Mobile Services host and off you go -- Everything you would ever want is
included out of the box (including client to server datasync), you only need
to figure out what storage and other services you want to use (e.g.
Microsoft's PN service for easy crossplatform notifications) and bring along
your business logic.

------
romanovcode
Unless you are willing to wait for 1.0 release of ASP.NET Core (which will
probably happen in the end of summer) go for Rails. It's not done yet and not
working properly on Linux.

------
dizzy3gg
dotnet rc2 is close to release but I wouldn't treat it as an rc. rc1 and rc2
changes are considerable and I'd expect more changes whilst they figure out
the rest.

------
NicoJuicy
If you want to use .Net, .Net 4.6 is very stable.

For production use, wait a while to use .Net Core.. It's awesome, but not
there yet.

------
tacos
What is the nature of your data? Is it highly structured, do you want to
enforce a robust schema, is it financial? What language are you developing the
client in? What other services (if any) are you talking to on the backend?
From the client?

Why .NET Core instead of just .NET? Is Linux hosting of the backend a
requirement?

~~~
i336_
What's .NET on Linux like in production at the moment?

~~~
tacos
It's okay. When .NET core RC 2 ships in the next few days, "good." After Azure
and AWS ship compliant SDKs and the rest of the ecosystem wakes up, "great."

------
insulanian
Ironically this just landed in my inbox:
[https://medium.com/@deathdisco/today-i-accept-that-rails-
is-...](https://medium.com/@deathdisco/today-i-accept-that-rails-is-yesterday-
s-software-b5af35c9af39)

------
out_of_protocol
1) Phoenix (basically very railsy w/o some rails' downsides) 2) Rails. Still
good choice

------
brightball
Elixir and Phoenix

