Hacker News new | ask | show | jobs
by josh-j 4805 days ago
Is the following a fair generalization?

Java should be the conservative choice for your web framework's language (rather than PHP). Scala, Clojure, Nodejs, Erlang, Lua, and Haskell should be in your list of workable yet "cool" languages (rather than Ruby or Python).

2 comments

I'd add the caveat that Java should be the conservative choice only if you are expecting it to matter that you can serve 200,000 simpleish (but nontrivial) requests per second. In the vast majority of cases, development speed and things other than raw framework performance will dominate as concerns. However, that is a non-zero niche.
I was considering other factors in that generalization, although they're implicit. E.g., a lot of the "cool" language frameworks I mentioned are comparable with the Java frameworks in speed, but Java has a considerably larger ecosystem and number of hirable developers (although I'm not sure if that translates well into web development). And I assume PHP is as verbose as Java from what I've heard from other people (I've never used PHP).

What language should be the conservative choice based on the many factors and ignoring the specific case for the general case?

PHP can be as verbose as you want it to be.

If you're using something like Symfony2, there'll be more abstractions and layers than using something like Silex - but they still don't come close to what Java looks like.

" And I assume PHP is as verbose as Java from what I've heard from other people (I've never used PHP)".

So you dont even know what you are talking about?

What do you think questions are for?
Some Java frameworks are not doing that well on all tests. So it is not a fair generalization. As for PHP vs Java , it is not really the point of the discussion , since raw php is doing very well.
The Java frameworks are generally doing very well (top quarter to top half), and the PHP frameworks are generally doing very poorly (bottom half). PHP-raw is doing well, but that's not heartening given how mature its frameworks should be (if we were talking about golang, I think that argument would be sound).
That's the point of PHP , you dont need a framework to do web development with PHP. PHP is merely a C Web dev DSL. Using a framework over a DSL makes no sense.
Of course it makes sense, because you're not writing C code - you're writing PHP.

A framework is simply a pre-packaged organization of your code. In the case of the mini php frameworks, they provide little more than a router.

I have worked on many projects - those with and without frameworks. I will choose code on a framework any day of the week.