News for hackers. Stuff that matters.
Re:Ask HN: Why don't more web projects start with a JVM stack? by Juliate on Thursday February 04, 2016 @09:29AM (#11034082)
"Deployment is simple."

Not sure what to say. This is highly subjective and irrational anyway. And sad, hence.

Having spent some years in college programming in Java around 2000~2004, I was amazed by the then patterns-obsessed ludicrous verbosity of Java projects. Programming for the sake of writing so much text to accomplish so little.

Switched to Perl & PHP, which were, for Web-based projects we had, much more approachable and efficient (although somewhat ugly). Hopefully, Python & Ruby were growing too. And alternatives to XML happened too, thank God.

In the Web development sphere I worked in, Java projects always have felt to me like too... enterprise, under-specified, freezed, too much developer-focused, not enough thought out, although advertised as "the" technology of choice - so it was deceiving.

Whereas teams working with PHP (!) or Ruby felt like much more concerned about usability and efficiency, globally and were delivering better and faster. Perhaps because those teams were composed of people grasping the whole product stack (hosting, db, code, ui) at the same time, because the tools they had enabled them better to do so? Not sure.

Scala & Clojure look nice. Have to find a use case for these in my daily projects.

Re:Ask HN: Why don't more web projects start with a JVM stack? by ericfrederich on Thursday February 04, 2016 @12:49PM (#11035691)
"I was amazed by the then patterns-obsessed ludicrous verbosity of Java projects. Programming for the sake of writing so much text to accomplish so little."

Tell me you've seen this:

https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

Re:Ask HN: Why don't more web projects start with a JVM stack? by lewisl9029 on Thursday February 04, 2016 @03:25PM (#11036912)
Thanks for the link. That made my day. =)

Here's a more realistic comparison between classic Java OOP design vs the more data-oriented approach to design encouraged in functional languages like Clojure for a simple board game:

https://www.youtube.com/watch?v=Tb823aqgX_0

TL;DW:

The classic OOP design of the board game ended up with 22 classes, 11 interfaces, 1 enum in total, with 271 lines of pure skeleton code with no implementation of any game logic whatsoever. The class diagram can be seen here for a better sense of the complexity involved: https://youtu.be/Tb823aqgX_0?t=688

The data-oriented design had 31 functions, longest of which is 7 lines, with a grand total of 144 lines of code that implements the entirety of the game logic.

Re:Ask HN: Why don't more web projects start with a JVM stack? by Heliosmaster on Thursday February 04, 2016 @09:41AM (#11034148)
Anecdote: Deploying a single jar generated with lein uberjar for clojure project is really simple.
Re:Ask HN: Why don't more web projects start with a JVM stack? by mcroft on Thursday February 04, 2016 @10:05AM (#11034322)
Deployment with modern Java platforms/frameworks is simple. With Java EE you can create a runnable fat JAR just by running `mvn package` with WildFly Swarm. Spring Boot also has that capability and Payara Micro lets you deploy any existing WAR just by adding it as a command-line parameter.

Even a couple of years ago when this wasn't the case, it was still usually as simple as dropping your WAR in the autodeploy folder of your favourite app server (e.g. JBoss, WebLogic, GlassFish) - the main issue was that it was different for each app server even though it was (in theory) the same framework.

Re:Ask HN: Why don't more web projects start with a JVM stack? by ricardobeat on Thursday February 04, 2016 @10:21AM (#11034449)
How do you deploy that to a server, let's say Digital Ocean? What kind of http server, proxies? Who/what starts and supervises the processes?
Re:Ask HN: Why don't more web projects start with a JVM stack? by mcroft on Thursday February 04, 2016 @10:36AM (#11034567)
There are docker containers available for most of these. Spring Boot is made by Pivotal too, so has native CloudFoundry support if you want a PaaS. Docker is likely the most portable, but if you're happy writing an init.d start script or something you'd just need to call: java -jar /path/to/myapp.jar