Live data from Hacker News

Why we choose Java instead of a polyglot stack

product.hubspot.com

91–100 of 155 posts

Re: Why we choose Java instead of a polyglot stack

#91
Has anything happened in Java to correct the fundamental issues raised in Steve Yegge's 2006 opus Execution in the Kingdom of Nouns[1]?

I last used Java two years ago, writing an Android app, and at the time I think Yegge's critique still stood. Not to mention the fact that it was a colossal amount of typing and boilerplate in order to do anything.

We're using Go at the current place, and I'm loving it. Android development in Go would be a sheer joy.

[1] http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom...

Re: Why we choose Java instead of a polyglot stack

#93
post #66

It did not seem to really address the issue of polyglot very much (given it is in the HN title) rather than just promoting the virtues of Java. One of the strengths of the JVM is the ecosystem of JVM languages that has evolved. You can stick with the JVM and get many of the benefits mentioned while still being polyglot. In particular you can throw in a dynamic language (Groovy, JRuby, Jython) alongside the Java core…

> Groovy, in particular, is 100% bidirectionally compatible with Java and has close enough syntax that a developer team well versed in Java will pick it up quickly.

Groovy's only close to the Java 1.7 syntax. Java 1.8 uses the -> symbol in a completely incompatible way to Groovy.

And the most common use case for Groovy, i.e. Gradle, only uses some DSL syntax which is totally unlike anything you've seen in Java. There's no overlap at all.

Re: Why we choose Java instead of a polyglot stack

#94
post #83
post #79

So, Java guys, what do you recommend if someone wants to have a Rails-like experience where programmer time is more valuable than 'web scale' performance? Say, also that I don't want to have to pay oodles of money for some server with a terabyte of memory to hold the application. Honest question - I haven't kept up with what's happening in Java land, and am curious what you'd recommend for that kind of side-project t…

There is [Grails]( https://grails.org/ ) which I honestly did not use so I can't comment on it but people seem to like it. It is Groovy based though. The most common framework nowadays is Spring and its ilk (including Spring MVC and its friends). BUT there is Spring Boot which is basically a meta framework which takes an opinionated "sensible defaults for all the stuff" approach and you can get a project working with…

> I can't comment on it but people seem to like it

Not sure how many Grails 2.x systems out there have been upgraded to Grails 3.x, or how many new Grails systems have been started in version 3.x. I don't think it's many though, which suggests a general decline in Grails use.

Re: Why we choose Java instead of a polyglot stack

#95
post #19

I agree that Java is the best programming language to write web services in right now. But I have to admit that the most threatening counter-argument to using Java in 2016 is that Scala is, to all appearances, a strictly better language. It's similar to Java and does everything Java does, but better- it has type inference, it does away with primitive types and arrays, it has compiler-checked string interpolation, it…

On the contrary Scala is baroque, its syntax is not following any known pattern. For example if I want to write a recursive function I have to indicate my return parameter type otherwise not. It doesn't matter whether you come from a C background or a Java background...or any background because of this: > def addInt( a:Int, b:Int ) : Int = { > var sum:Int = 0 > sum = a + b > return sum > } You have to relearn how a f…

Could just write `def add(a: Int, b: Int) = a + b`.

Not sure what the var/return business is about; have you even used Scala?

Re: Why we choose Java instead of a polyglot stack

#96
post #9

Earlier quoted context omitted.

The blog post mentioned "modern java frameworks", can you specify which ones you're using?

Is there a guide to modern java frameworks and their use? I left java a while back when "EE" was full of shit.

This is a good place to start: https://github.com/cxxr/better-java

Re: Why we choose Java instead of a polyglot stack

#97
post #79

So, Java guys, what do you recommend if someone wants to have a Rails-like experience where programmer time is more valuable than 'web scale' performance? Say, also that I don't want to have to pay oodles of money for some server with a terabyte of memory to hold the application. Honest question - I haven't kept up with what's happening in Java land, and am curious what you'd recommend for that kind of side-project t…

For a side project I've deployed some simple endpoints to Heroku and used Spark (http://sparkjava.com/). Spark is a Java Sinatra clone rather than full Rails.

That said, not sure I'd pick it for simple side-projects. Part of the benefit here is how it works for a large dev team, with a large codebase, etc.

Re: Why we choose Java instead of a polyglot stack

#98

Earlier quoted context omitted.

I've done a lot of Java, and I'd say the stereotypes didn't come from nowhere (XML is great! Enjoy using XML for dependency injection and configuration!). Not to mention the lack of expressivity of the language causing the proliferation of FactoryBeans. The other issue is that the "IE effect": the language stopped evolving for years. In the meantime, Microsoft launched C#, and Java is only catching up now in terms of…

That's why I think Kotlin is going to clean up. It's a language specifically designed to be commercially successful by providing you with a better Java. For instance this line of code: data class Person(var name: String, val age: Int) compiles down to a JavaBean with getName/setName type methods, a getAge but no setAge (val is immutable), an equals, a hashCode, a toString and a few other useful methods as well like c…

Can you override the autogenerated setters and getters in Kotlin?

Re: Why we choose Java instead of a polyglot stack

#99

If you're not picking the JVM in 2016 to build your core services and web applications then you're making a mistake that is going to cost you time and money either upfront in building things that already exist or later down the road when you start to need more performance and your RoR application isn't cutting it anymore. Say what you will about Java the language (I agree it's not particularly "sexy") but the JVM is…

I keep wondering how Java compares to Go these days. I'm not advocating Go, just wondering how much of an advantage Java has for server-side "web applications and services" for new businesses that are the usual small to medium scale with a single-digit number of developers and no legacy vs giant enterprise scale.

It just sounds as though the advantages of Java help large, complex systems of services and developers more than they help the vastly more numerous small-med systems.

Can someone with experience comment, because I'd like to understand the options a bit better.

Re: Why we choose Java instead of a polyglot stack

#100
post #83
post #79

So, Java guys, what do you recommend if someone wants to have a Rails-like experience where programmer time is more valuable than 'web scale' performance? Say, also that I don't want to have to pay oodles of money for some server with a terabyte of memory to hold the application. Honest question - I haven't kept up with what's happening in Java land, and am curious what you'd recommend for that kind of side-project t…

There is [Grails]( https://grails.org/ ) which I honestly did not use so I can't comment on it but people seem to like it. It is Groovy based though. The most common framework nowadays is Spring and its ilk (including Spring MVC and its friends). BUT there is Spring Boot which is basically a meta framework which takes an opinionated "sensible defaults for all the stuff" approach and you can get a project working with…

I'll put a second vote for Spring Boot. You're right that when the magic fails it can get a little complicated. However, I've found Spring documentation to be very good. Also, once you understand a little of how it's put together it becomes pretty easy to selectively replace whatever piece of the magic with your own custom version.
Post reply on HN