▲ | ocean_moist 5 hours ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I mean I think there is a philosophical divide. Go is very minimalist in terms of external dependencies. Those that are their are very good in my experience. The builtins are just the right amount of opinionated imo. I concede that that statement was grounded in my preference for Go's take on external dependencies. I also generally am writing REST APIs and doing simple "enterprisey" stuff. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | whartung 5 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Well, that was a conscious choice of the JDK devs when they went down the path of removing things. Raw Java is Pretty Close to being "out of the box" OK for "REST, enterprisey" stuff. The built in HTTP server is usable and functional. Of course TLS is built in. JDBC is built in (need a driver). While XML is built in, JSON is not. Logging is built in. JMX for monitoring is built in (lots of things can talk to JMX). Are these all "top tier" feature rich implementations? No. But they're completely usable. With some thin veneers you can make them richer and more friendly. I've been using my own trivial Logger wrapper for years (mostly to support varargs). If you're willing to take a bit of a step, JAX-RS on Java SE works. That "single" dependency just knocks it out of the park in terms of "enterprisey" REST services. No container, no "micro profile", just JAX-RS (but you still need a JSON library). JAX-RS really elevates the game. It'll even run on the stock HTTP server. Add "just one more" with JPA, and you get not just the whole ORM, you also get a "free" database connection pool (otherwise, an OTS connection pool would be a nice addition). All bottled up into a simple deployable jar, no dependencies outside of a compatible JDK. No dockers, no containers, just a jar and a JDK, a JDK that can be installed anywhere (just set JAVA_HOME and put the .../bin on your path). Drag and drop. systemd fixed the need for crafty service scripts -- it can just run the jar. JAX-RS Jersey, JPA EclipseLink, Jackson (for JSON), and the JDK is just crazy capable tool set. You can also do MVC web stuff with Jersey. Jersey comes with Validation as well. The HK2 runtime will let you do your own injection if that's your thing (not as nice as CDI, but it's "free" with Jersey). But, alone, (plus Jackson), the JDK will let you do anything you want, just need to write some routing logic. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | coin 5 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Go is too minimalist in my opinion. It’s like time warping back to 2005. You want enums, nope. You want functional constructs (map, filter), nope. You want string array contains, nope. It can feel very limiting coming from newer languages designed in the last 10 years. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|