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.
- 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!
[1] https://blogs.msdn.microsoft.com/dotnet/2016/06/27/announcin...
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.
Googling found this: https://jonninja.github.io/node.kt/
If you use Kotlin, use the JVM - at least for now.
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...
- Static typing -- Type hints enable restriction of the dynamic typing behavior of default Python to mimic static types
- Type inference -- Not familiar with the particular behavior of type inference of Haskell, but yes.
- No JVM -- Definitely no JVM, but not particularly high performance so...there is that.
- Good pre-made web framework -- Lots of good ones, Python ecosystem is fairly rich in general, but ones I have used: Django, Pyramid, Flask, etc.
In case you want to investigate some:
- https://www.playframework.com
- http://projects.spring.io/spring-boot
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
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
I've already decided my next service/api will be in Rust.
Still is early days, but there's a lot of stuff too. Excited to see it develop further.
- 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.
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.
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.
Of course. Since all of those languages are Turing-Complete, this is trivially true.
Unless you have developers who are super excited about writing web services via BPF filters, Turing-completeness is not a meaningful way to compare programming languages; that is, that's not the reason why we have multiple programming languages in the world and why different people or projects prefer different ones.
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).
Odd that Golang was left out with it fitting that criteria... but I still stand by the assertion :)
Edit: I see, based on other comments, that Go wasn't part of the original lineup.
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.
Edit: I wrote this comment before Elixir was added to the poll.
Elixir is certainly my favorite to work with, so far.
Comment: As a follow up, it would be interesting to see which framework people use within the language.
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?
Java for not work (I want to move away from Java so I won't get sued by Oracle)
https://stormpath.com/blog/swift-on-the-server-today
Be aware that all of the frameworks are targeting Swift 3 right now, so it's a bit unstable until Swift 3 is officially released. But the ecosystem is going really strong =]
The backend is written in Pascal.
With the exception of the blog. That is written in Node.js. I did that as a way to learn Node.js. But as soon as I find some time I'll rewrite that in Pascal too.
I mean, it compiles into Javascript. It didn't take long before I realized that I could write an entire Node-based web app entirely in DS.
Much users. Very rich.
What pieces of advice do you offer so that this poor child may avoid the mistakes of his forebears?
Take two steps back and one can see the waves of hype roll through programming blogs, HN and reddit. 10 years ago people were arguing over ORMs. Then it was dependancy injection frameworks, then SQL vs NoSQL. Now there's JavaScript and it's various frameworks and libraries. THere's always so much hype about what to use that it's easy to lost in it and worry that if you aren't riding the trend wave, you'll drown. But most times it's easier just to float a while and watch from a short distance. Get done what you need to get done with what you currently know. Let the hype die down. Learning new things is a ton of fun. But they can be devilish to deploy in production. Don't feel like you have to use them.
Edit: I'm not saying DI frameworks, or ORMs or NoSQL (or even SQL) are bad in any way. Just that within each topic there was much arguing about what is "the best" or "proper" or whatever. Wait for that to cool off and die down before betting your next project on it.
Citing Alan Kay on the difficulties of keeping up with tech:
We are fortunate that most of what is "new" is more like "particular 'news'" rather than actually "new". From the standpoint of actual categorical change, things have been very slow the last 30 years or so.
I guess it depends on what time scale you are using to define computing history. JavaScript hasn't been 'new' for a long time.
I've been a web programmer for about 20yrs and have used ASP, ColdFusion, Java, C#, PHP, and JavaScript professionally and for me it is the language I enjoy using/writing the most. It continually surprises with new and more powerful innovations and implementations: from the early days of DHTML to AJAX, closures, Node, React, Tessel, etc.
I'm curious as to what more would have to be done with the language for it to graduate to 'real' language status.
Heck even NASA thinks it's good enough: https://vimeo.com/168064722