
Ask HN: Which language do you prefer for back end development? - tiuPapa
Just based on the quality of tools available, not the quantity or specific language quirks.
======
git-pull
Python is the best.

I converted from PHP -> Python a long long time ago. But it was my first
programming language.

PHP and Laravel is excellent. In particular, Laravel developers come across as
very intelligent to me. In the end though, Python has multi-spectrum
dominance.

Post about Python's tools:
[https://news.ycombinator.com/item?id=15957273](https://news.ycombinator.com/item?id=15957273)

Python has Django
([https://www.djangoproject.com/](https://www.djangoproject.com/)). It's 90%
as good as Laravel. Which means it's very, very good.

But the thing with Python is it owns PHP when you're doing non-website stuff.
If you can be convinced to give up Laravel (it may be hard), Python is easily
the best choice.

Python has PEP standards PEP8 (code style) and PEP257 (code docs) long before
PHP PSR's became a thing.

Scraping. Normalizing data. Python can handle big data sets. Machine
Learning/AI.

Has documentation via Sphinx. Here's an example of one of my projects:
[https://cihai.git-pull.com](https://cihai.git-pull.com). Here's an example of
generated API docs: [https://cihai.git-
pull.com/en/latest/api.html](https://cihai.git-pull.com/en/latest/api.html).

The nature of being "Pythonic" spreads into open source code, and later into
teams, so the libraries you pull in have a familiar style.

OOP is implemented better in python. That rubs off onto the quality of the
libraries and how enjoyable they are to implement.

In my opinion, once you get a hang of Python, it's much easier to read than
PHP.

~~~
IpV8
I've done php, ruby, go, c++, c, java, javascript, and python and I must say I
prefer python the most for generic server side stuff. Super well organized and
documented. Just the right amount of abstraction. I like c++ for lower level
stuff, where python starts to fall off. Go is growing on me but its still so
much easier to be productive in C++ in most realistic situations. I use C only
when I can't use C++, which is rare.

------
quantummkv
PHP. Laravel is an absolute joy to work with. Everything is pretty much
intuitive with a lot of sane defaults that allows a new guy go get running
quickly with the codebase. And it integrates with pretty much everything.

When I really need to squeeze out performance, I simply switch to Phalcon.
Granted it needs some time to configure up due to its nature and it has less
community packages and integrations compared to Laravel but the performance
gains are absolutely worth it.

------
philippz
I prefer PHP because:

* rapid prototyping (You can write clean code but you don't have to)

* Incredible ecosystem

* Smart Frameworks: Laravel, Lumen

* The language is evolving (PHP7 etc.)

* Easy to learn and easy to use

------
Sevii
Java and Python are the two I have done the most with. They are pretty close,
but java doesn’t seem to have anything like Django. I have gotten paid a lot
more for Java work though.

------
albumdropped
I converted from PHP/Laravel to Go about two years ago. Performance is
amazing. Plays well with k8s. There are several good frameworks, but I'm, so
far, just using straight Go.

IoT integration is fabulous - see [https://gobot.io](https://gobot.io)

------
farnsworthy
Go/Ruby/whatever--tons of good options, and I still regularly see startups
posting PHP jobs (especially Laravel).

It's funny, because with so much happening in the front-end, the back-end
largely seems like a "solved" problem. (Even if that isn't strictly true, and
I expect the pendulum will eventually swing back, along with more efforts
aimed at complete integration.)

------
randelramirez
C# and for web applications, there's ASP.NET (Core or ASP.NET MVC 4/5)

* Visual Studio for debugging * Unit Testing Tools * Package manager (Nuget, NPM integrated for front-end if your doing client-side development as well)

------
trcollinson
Ruby. There are quite a lot of fantastic and well maintained gems, great
tooling, easy to use, and a joy to develop in.

------
habyte
PHP is paying my bills aswell, but I prefer Node.js which has zillions of
open-source packages.

------
AlexAmee
First of all, I don't think there is anything out there that could beat Java +
IntelliJ + Spring boot.

It does not matter if you use WebStorm, Clion, Rider ?, one must admit that
IntelliJ is a Java IDE at its heart.

It's very hard to describe how amazing the tooling is because you cannot
describe a color to blind people. This is not meant to be offensive.

There is one way I could at least try it. If you are using Vim/Emacs and
everything feels like 'flying', that feeling multiplied by 3.

That's what IntelliJ + Java is. If you then also install the Vim plugin, you
got the best of both worlds.

I did asp.net mvc with C# and VS, it's not even close. I did Rails a few
years, not comparable ... I tried to so many languages and frameworks, nothing
comes even close to IntelliJ+Java+Spring boot.

Since I'm already procrastinating, I'd like to kill a few myths about Java and
web development in Java.

1\. OMG XML. I cannot remember the last time I had to dive into XML.

2\. I can hit refresh and instantly see changes, can you do that in Java?

Yes, every modern web framework has hot-reload, you don't wait, you just save
and hit the browser reload button. It almost feels like a scripting language.

3\. How about ORM's and DB access in general ? We got the mother of all ORM's,
hibernate but if don't like ORM's there are great alternatives.

Jooq[0], which feels almost like SQL:

create.selectFrom(BOOK) .where(BOOK.PUBLISHED_IN.eq(2011))
.orderBy(BOOK.TITLE)

There is also Spring data JPA ( sits on top of hibernate ), which pushes the
abstraction to the limit. Imagine we got a User class with properties name,
age, gender.

You could just create a method like this:

User findByNameAndAge(String name, Integer age);

That's it, spring JPA[1] would automatically understand what you meant by
that, it would create the query for you.

The Spring framework in general has probably everything you would ever need in
a project, no matter how small or big it is. If for some weird reason, I'd
need a lib that tries to communicate with aliens, I'd probably look for it in
the Spring framework because someone probably already wrote that lib.

Security out of the box, you can configure it like you please. I must admit
that it's not as awesome as Rails Devise[2].

4\. But Java sucks !

Well you can use Kotlin if you really hate Java but let me ask you, when was
the last time you used Java?

What If I would tell you that the folks who are working on Java are smart
fucks who made many impossible things possible. If you know Java 5, many
things have changed.

memberNames.stream().filter((s) -> s.startsWith("A"))
.map(String::toUpperCase) .forEach(System.out::println);

Java now supports functional programming ( it's not like Scala but hey ...
it's alright )

Most likely the next update[3] will bring this:

var user = new User("john");

Real threading, raw power, amazing mature libs, huge eco system, this blows
every language or eco system out of the water.

I could talk for hours about how awesome Java is but I'll stop here.

If you are creating a single page application, take a look at Jhipster[4],
which combines Angular with Spring boot with many useful generators, it's a
out of the box solution with many options.

As a freelancer, I also must say that the pay is much better than let's say
PHP, Ruby or Python.

If one of my side projects gets traction, I can hire freelancer in a
heartbeat, Spring has > 40% market share, naturally there are many devs
available.

If you can't stand Spring, there are also many other great frameworks like
Play!, Dropwizard etc etc ...

[0] [https://www.jooq.org](https://www.jooq.org) [1]
[https://spring.io/guides/gs/accessing-data-
jpa/](https://spring.io/guides/gs/accessing-data-jpa/) [2]
[https://github.com/plataformatec/devise](https://github.com/plataformatec/devise)
[3] [http://openjdk.java.net/jeps/286](http://openjdk.java.net/jeps/286) [4]
[http://www.jhipster.tech](http://www.jhipster.tech)

------
ruairidhwm
PHP using Laravel. It's brilliant to work with.

I've been playing around with Node.js too and whilst it's an excellent tool, I
always find myself coming back to Laravel.

------
halfbrown
PHP pays most of my bills, too. Used to write a lot of Perl, too, but that's
fallen by the wayside. I'm integrating more Python and Node.js, but the lion's
share is still PHP.

------
534b44a
PHP is the backend language that currently pays my bills. PhpStorm and Xdebug
are mature enough, so are the frameworks such as Laravel.

------
SirLJ
I guess depends what you do, for my stock trading robots I chose Python, just
because of some of the financial libraries, (which I didn't use in the end)...
it has a shitty syntax, and any language would do in my case, but I am not a
developer so take my advice with a grain of salt: the end result is what
matters...

------
mindcrime
My default is Groovy, based on a myriad of different factors.

