top | item 11994452

Poll: What Programming Language Do You Use for Server Side Web Development?

198 points| bokenator | 9 years ago

123 comments

order
[+] rajangdavis|9 years ago|reply
I have been working with PHP steadily over the last year, and, coming from a Rails background (learned it at General Assembly), I used to hate the "ugly" syntax, weird method calls, and strictness of PHP (missing a semicolon can be damnable offense in the eyes of the compiler). Ruby to me seemed a lot more flexible, but over time, after hacking at PHP, I have come to appreciate it as a language that gets the job done.

My preference is still with Ruby on Rails; however, I have been thinking of using a more lightweight framework like Sinatra. I am still impressed with how flexible and expressive Ruby can be. Alongside bash, it has really become one of my favorite languages to work with particularly for scraping/writing automations.

Would love to get into Node, but the idea of javascript on the back-end hurts my head. All I have used Node for is for basic utilities like uglify-js and minifier. Been hacking on Angular and Mithril on the front end, I love javascript as a front end language, but still haven't wrapped my head around Node. Javascript isn't too far off syntax-wise from PHP, but my struggle with Node is how to organize the codebase as well as understanding a clean separation of concerns when it comes to front-end and back-end code.

Might be off topic, but I am really excited to see how the GraalVM is going to impact languages like Javascript and Ruby.

[+] zingermc|9 years ago|reply
I haven't found a web server language to my liking yet. Maybe I'm too picky, but I'd like to satisfy all of these requirements:

- Static typing -- I want to eliminate as many runtime bugs as I can

- Type inference -- Like in SML and Haskell

- No JVM -- Personal preference, but I'd rather not pull in this monster if I don't have to.

- Good pre-made web framework -- I've briefly looked at OCaml but the web frameworks seem disappointing. Tell me if I'm wrong!

[+] outworlder|9 years ago|reply
What about Rust?

It has static typing, limited type inference (function parameters need their types declared - by design - will infer otherwise), no JVM, and has several web frameworks. Not sure if any of them would be considered "good" by your definition, but check it out: https://github.com/flosse/rust-web-framework-comparison

[+] frankpf|9 years ago|reply
Check out Ur/Web[1].

It's a functional, pure and statically typed language inspired by Haskell. It claims that programs that compile successfully cannot:

- Suffer from any kinds of code-injection attacks

- Return invalid HTML

- Contain dead intra-application links

- Have mismatches between HTML forms and the fields expected by their handlers

- Include client-side code that makes incorrect assumptions about the "AJAX"-style services that the remote web server provides

- Attempt invalid SQL queries

- Use improper marshaling or unmarshaling in communication with SQL databases or between

[1]: http://www.impredicative.com/ur/

[+] montyedwards|9 years ago|reply
Rust has:

- Static typing

- Type inference (and pattern matching)

- No dependency on JVM, .NET, or BEAM

But the number of web frameworks, etc. for Rust sucks compared to that of older languages like Go. Go 1.0 was released in early 2012 and Rust 1.0 in May 2015.

Rust is more verbose than Go, but Go's FFI to functions written in C isn't as efficient and since "cgo isn't go", I'm not sure cgo covered by Go 1.0 compatibility guarantee.

On the other hand, Go has tons of "batteries included" plus web frameworks so that is pretty awesome to have on stable platforms (I don't consider Windows a stable platform for Go and got burned several times, but Go works great on FreeBSD & Ubuntu.)

I suspect Go & Swift won't have robust reliability on Windows (compared to other platforms) but they'll be rock solid on the ones they favor. Rust may have better prospects regarding this, but Rust still too new this year for web server language -- wait until MIR is integrated and a couple more releases after that.

[+] eatonphil|9 years ago|reply
I will be revisiting OCaml sometime in the near future to write a more solid web framework for it (compared to OWebl). This time it will be based on FastCGI rather than doing the networking itself I think.

In the meantime, I'm more actively working on Ponyo for Standard ML right now. Take a look at the ponyo.org server[0] for a brief glance at what it can do today.

Check out the /r/sml wiki if you are trying to get started. And please join #sml on Freenode if you have any questions!

[0] https://github.com/eatonphil/ponyo/blob/master/site/server/s...

[+] cel1ne|9 years ago|reply
The nice thing about the JVM is that it's contained and has excellent monitoring and profiling tools.

Anyway: What about kotlin [0]?

* 100% java compatible * can compile to the JVM and javascript, so you should be able to run it with node.

[0]: https://kotlinlang.org/

Googling found this: https://jonninja.github.io/node.kt/

[+] supster|9 years ago|reply
I have very similar requirements, and I think within the next few years, Swift will fill this niche very well.
[+] yozhik|9 years ago|reply
I've just started using D for this sort of thing. It has web framework called Vibe.d (http://vibed.org/). I'm pretty happy with it, and it seems to satisfy all of your requirements. Note that I've only just started to use it, so I don't know how well it will hold up over time, but I'm enjoying it so far.
[+] rzhikharevich|9 years ago|reply
Doesn't Go fit these requirements?
[+] orclev|9 years ago|reply
There are a couple Haskell frameworks that might fit the bill. Yesod is a big one, although some take issue with its excessive use of Template Haskell. Others to look at would include Servant, and the very confusingly named rest framework.
[+] gshulegaard|9 years ago|reply
With type hints in Python 3.5+, does Python fit your list? Genuinely curious.
[+] WayneBro|9 years ago|reply
Maybe Typescript? (On Node.js obviously for server side).
[+] ShirsenduK|9 years ago|reply
You need Elixir with the Phoenix framework!
[+] zelon88|9 years ago|reply
PHP. It may be old, tricky to debug, and cumbersome to write long projects with but the ability to bounce in and out of logic on a simple, proven, well adopted stack that has plenty of knowledge-base and ready machines everywhere has it's advantages. Plus, I've heard a lot of developers knock PHP but I've yet to see a problem solved with Ruby or Python that couldn't have been solved with PHP.
[+] VeejayRampay|9 years ago|reply
That last sentence is pretty true of any combination of languages and it feels defensive.
[+] Joeri|9 years ago|reply
After about a decade programming PHP, I'm now mostly using java 8 (play framework), with some node.js thrown in on the side. I've found that PHP's benefits are also its downsides. The simplistic concurrency model where every request starts from a blank slate and has no asynchronicity is easy to understand, but difficult to optimize for performance. The large knowledge base is great for getting a solution, not so great for getting the right solution. The "just keep going" error handling philosophy is excellent for newbie programmers, but terrible for guaranteeing correct operation. The interpreted zero-build dev model is excellent for quick edit-reload cycles, not so great for large-scale refactorings where you want to know you've correctly adapted all uses of a core api.

Java has improved a lot from what I remember it used to be. Java 8's elimination of a lot of the boilerplate, coupled with the simplicity of the play framework, and activator's hot reloading of code for quick edit-reload cycles brings it on par with PHP as far as developer comfort is concerned, at least for me. In my experience java is nicer for large-scale web dev, while PHP is nicer for a quick side project. Node with javascript I would put more in the PHP camp than the Java camp. It is great for side projects, but scaling it up necessitates switching languages to something like typescript with a whole-project build, which takes away much of the "ease" that something like PHP or Node provides.

[+] jimbokun|9 years ago|reply
"Plus, I've heard a lot of developers knock PHP but I've yet to see a problem solved with Ruby or Python that couldn't have been solved with PHP."

Of course. Since all of those languages are Turing-Complete, this is trivially true.

[+] yulaow|9 years ago|reply
I still use PHP for a very simple reason: stable libraries and extremely well done documentation.

As a language and general features I prefer by far node.js... but i hate the total lack of decent-level documentation I found over the years.

[+] simonw|9 years ago|reply
"I've yet to see a problem solved with Ruby or Python that couldn't have been solved with PHP"

Scientific computing is extremely strong in Python - numpy, scipy, scikit-learn etc - and a lot of it makes use of language features that aren't present in PHP (at least as-of a few years ago, my PHP experience is rusty at this point).

[+] niroze|9 years ago|reply
Languages that are cool/hip/popular here will win.

Odd that Golang was left out with it fitting that criteria... but I still stand by the assertion :)

[+] aws_ls|9 years ago|reply
I saw it just now, so by now its already added and stands 6th most used (not bad for a relatively new language) for server side web development.

I like it a lot, have been using it since 2013. I bet its going to rise in usage.

A minor point regarding its name usage. We should always call it Golang on HN & comments etc or in searches, as 'Go' is such a common word. I always try to to a ctrl-f for golang. And I am sure many other gophers do.

[+] whatnotests|9 years ago|reply
"Go" is in the list. Perhaps you just missed it?

Edit: I see, based on other comments, that Go wasn't part of the original lineup.

[+] luisehk|9 years ago|reply
Python. Django or Flask depending on the projects' needs
[+] shadeless|9 years ago|reply
Elixir

Edit: I wrote this comment before Elixir was added to the poll.

[+] _qbjt|9 years ago|reply
Elixir and Ruby at work (previously Go as well). I have also done backend development in JavaScript, PHP, Python and Clojure.

Elixir is certainly my favorite to work with, so far.

[+] karmakaze|9 years ago|reply
Was Go phased out leaving Elixir/Ruby, or was that at a different company?
[+] shawndumas|9 years ago|reply
PSA: Don't forget to up-vote the poll itself.
[+] mej10|9 years ago|reply
The people using Haskell should write more blog posts about using it in production.
[+] projectramo|9 years ago|reply
PSA: Just upvote the poll up above, no need to add your comments in the comments below.

Comment: As a follow up, it would be interesting to see which framework people use within the language.

[+] mebassett|9 years ago|reply
I appreciated the lisp and clojure options; I use racket/typed racket - for no other reason than that it's a lot of fun.
[+] mindcrime|9 years ago|reply
Java and Groovy, mostly. More Groovy (via Grails) for web specific stuff, sometimes plain vanilla Java for backend services. Nothing is off the table though... I'll happily use Scala, C++, Haskell, Python, Rust, Go, or Intercal, if there's a good justification for it in a specific situation.
[+] niftich|9 years ago|reply
Now that Go has been added, I see a good amount of votes for Go.

Since we're talking about server-side web apps, I'm assuming this entails an HTTPS API endpoint, some datasource, and some business logic. What packages/libraries/toolkits to you use to build a (micro-)service such as this?

[+] brandon272|9 years ago|reply
PHP ... It's like a fine wine that gets better with age, really.